summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-09-30 10:31:30 +0200
committerSlávek Banko <slavek.banko@axis.cz>2022-10-02 09:47:22 +0200
commitb5fdcbe3baf367c1aa8d2790b59507ef00b087a3 (patch)
tree24c1cf32ceb97cbbbca6d058fac376549ccce659
parent0f859a1c0312e824efd9e994dbec78e8466a3ff7 (diff)
downloadtde-packaging-b5fdcbe3baf367c1aa8d2790b59507ef00b087a3.tar.gz
tde-packaging-b5fdcbe3baf367c1aa8d2790b59507ef00b087a3.zip
DEB koffice-i18n: Switch to CMake build system.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit b8a1f2f5f3ff139d3d34b81b7ebb3eaa6df7163b)
-rw-r--r--debian/_base/applications/office/koffice-i18n/debian/control396
-rw-r--r--debian/_base/applications/office/koffice-i18n/debian/control-lang10
-rw-r--r--debian/_base/applications/office/koffice-i18n/debian/control-source6
-rw-r--r--debian/_base/applications/office/koffice-i18n/debian/debiandirs10
-rwxr-xr-xdebian/_base/applications/office/koffice-i18n/debian/rules189
-rw-r--r--ubuntu/_base/applications/office/koffice-i18n/debian/control396
-rw-r--r--ubuntu/_base/applications/office/koffice-i18n/debian/control-lang10
-rw-r--r--ubuntu/_base/applications/office/koffice-i18n/debian/control-source6
-rw-r--r--ubuntu/_base/applications/office/koffice-i18n/debian/debiandirs10
-rwxr-xr-xubuntu/_base/applications/office/koffice-i18n/debian/rules189
10 files changed, 292 insertions, 930 deletions
diff --git a/debian/_base/applications/office/koffice-i18n/debian/control b/debian/_base/applications/office/koffice-i18n/debian/control
index 8f7bb1a23..e30b5aae7 100644
--- a/debian/_base/applications/office/koffice-i18n/debian/control
+++ b/debian/_base/applications/office/koffice-i18n/debian/control
@@ -2,397 +2,15 @@ Source: koffice-i18n-trinity
Section: tde
Priority: optional
Maintainer: TDE Debian Team <team-debian@trinitydesktop.org>
-Uploaders: Ana Beatriz Guerrero Lopez <ana@debian.org>, Isaac Clerencia <isaac@debian.org>, Ben Burton <bab@debian.org>
-Build-Depends-Indep: tdelibs14-trinity-dev
-Build-Depends: debhelper (>= 9~), cdbs, quilt, automake, autoconf, libtool, libltdl-dev
-Standards-Version: 3.7.2
+Build-Depends: cdbs, debhelper (>= 9~), quilt, cmake-trinity, ninja-build, tdelibs14-trinity-dev
+Standards-Version: 3.8.4
-Package: koffice-i18n-bg-trinity
+Package: koffice-i18n-trinity
Architecture: all
Section: tde
-Recommends: tde-i18n-bg-trinity
+Recommends: tde-i18n-trinity
Suggests: koffice-trinity
Provides: koffice-i18n-trinity
-Description: Bulgarian (bg) translations for KOffice
- This package contains the Bulgarian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-ca-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ca-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Catalan (ca) translations for KOffice
- This package contains the Catalan translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-cs-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-cs-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Czech (cs) translations for KOffice
- This package contains the Czech translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-cy-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-cy-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Welsh (cy) translations for KOffice
- This package contains the Welsh translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-da-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-da-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Danish (da) translations for KOffice
- This package contains the Danish translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-de-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-de-trinity
-Suggests: koffice-trinity, openthesaurus-de-kword
-Provides: koffice-i18n-trinity
-Description: German (de) translations for KOffice
- This package contains the German translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-el-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-el-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Greek (el) translations for KOffice
- This package contains the greek translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-engb-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-engb-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: British English (en_GB) translations for KOffice
- This package contains the British English (en_GB) translations
- for all applications in the Trinity Office Suite.
-
-Package: koffice-i18n-es-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-es-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Spanish (es) translations for KOffice
- This package contains the Spanish translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-et-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-et-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Estonian (et) translations for KOffice
- This package contains the Estonian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-eu-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-eu-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Basque (eu) translations for KOffice
- This package contains the Basque translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-fa-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-fa-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Farsi (fa) translations for KOffice
- This package contains the Farsi translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-fi-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-fi-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Finnish (fi) translations for KOffice
- This package contains the Finnish translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-fr-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-fr-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: French (fr) translations for KOffice
- This package contains the French translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-ga-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ga-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Irish Gaelic (ga) translations for KOffice
- This package contains the Irish Gaelic translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-gl-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-gl-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Galician (gl) translations for KOffice
- This package contains the Galician translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-hu-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-hu-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Hungarian (hu) translations for KOffice
- This package contains the Hungarian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-it-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-it-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Italian (it) translations for KOffice
- This package contains the Italian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-ja-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ja-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Japanese (ja) translations for KOffice
- This package contains the Japanese translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-km-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-km-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Khmer (km) translations for KOffice
- This package contains the Khmer translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-lv-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-lv-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Latvian (lv) translations for KOffice
- This package contains the Latvian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-ms-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ms-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Malay (ms) translations for KOffice
- This package contains the Malay translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-nb-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-nb-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Norwegian Bookmal (nb) translations for KOffice
- This package contains the Norwegian Bookmal translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-nds-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-nds-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Low Saxon (nds) translations for KOffice
- This package contains the Low Saxon translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-ne-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ne-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Nepali (ne) translations for KOffice
- This package contains the Nepali translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-nl-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-nl-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Dutch (nl) translations for KOffice
- This package contains the Dutch translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-pl-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-pl-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Polish (pl) translations for KOffice
- This package contains the Polish translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-pt-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-pt-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Portuguese (pt) translations for KOffice
- This package contains the Portuguese translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-ptbr-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ptbr-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Brazilian Portuguese (pt_BR) translations for KOffice
- This package contains the Brazilian Portuguese translations for all
- applications in the Trinity Office Suite.
-
-Package: koffice-i18n-ru-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ru-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Russian (ru) translations for KOffice
- This package contains the Russian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-sk-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-sk-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Slovak (sk) translations for KOffice
- This package contains the Slovak translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-sl-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-sl-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Slovenian (sl) translations for KOffice
- This package contains the Slovenian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-sr-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-sr-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Serbian (sr) translations for KOffice
- This package contains the Serbian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-srlatin-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-srlatin-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Latin Serbian (sr@Latn) translations for KOffice
- This package contains the Latin Serbian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-sv-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-sv-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Swedish (sv) translations for KOffice
- This package contains the Swedish translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-tr-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-tr-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Turkish (tr) translations for KOffice
- This package contains the Turkish translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-uk-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-uk-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Ukrainian (uk) translations for KOffice
- This package contains the Ukrainian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-zhcn-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-zhcn-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Chinese Simplified (zh_CN) translations for KOffice
- This package contains the Chinese Simplified translations for all
- applications in the Trinity Office Suite.
-
-Package: koffice-i18n-zhtw-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-zhtw-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Chinese Traditional (zh_TW) translations for KOffice
- This package contains the Chinese Traditional translations for all
- applications in the Trinity Office Suite.
+Description: All languages (all) internationalized (i18n) files for KOffice
+ This package contains the All languages (all) internationalized (i18n)
+ files for all applications in Trinity Office Suite.
diff --git a/debian/_base/applications/office/koffice-i18n/debian/control-lang b/debian/_base/applications/office/koffice-i18n/debian/control-lang
new file mode 100644
index 000000000..f75b7d747
--- /dev/null
+++ b/debian/_base/applications/office/koffice-i18n/debian/control-lang
@@ -0,0 +1,10 @@
+
+Package: koffice-i18n-@pkg_lang@-trinity
+Architecture: all
+Section: tde
+Recommends: tde-i18n-@pkg_lang@-trinity
+Suggests: koffice-trinity
+Provides: koffice-i18n-trinity
+Description: @lang_desc@ (@lang@) internationalized (i18n) files for KOffice
+ This package contains the @lang_desc@ (@lang@) internationalized (i18n)
+ files for all applications in Trinity Office Suite.
diff --git a/debian/_base/applications/office/koffice-i18n/debian/control-source b/debian/_base/applications/office/koffice-i18n/debian/control-source
new file mode 100644
index 000000000..c1a3a089b
--- /dev/null
+++ b/debian/_base/applications/office/koffice-i18n/debian/control-source
@@ -0,0 +1,6 @@
+Source: koffice-i18n-trinity
+Section: tde
+Priority: optional
+Maintainer: TDE Debian Team <team-debian@trinitydesktop.org>
+Build-Depends: cdbs, debhelper (>= 9~), quilt, cmake-trinity, ninja-build, tdelibs14-trinity-dev
+Standards-Version: 3.8.4
diff --git a/debian/_base/applications/office/koffice-i18n/debian/debiandirs b/debian/_base/applications/office/koffice-i18n/debian/debiandirs
deleted file mode 100644
index 90247b9a0..000000000
--- a/debian/_base/applications/office/koffice-i18n/debian/debiandirs
+++ /dev/null
@@ -1,10 +0,0 @@
-export kde_prefix=/opt/trinity
-export sysconfdir=/etc
-export kde_includedir=/opt/trinity/include/tde
-export infodir=/opt/trinity/share/info
-export mandir=/opt/trinity/share/man
-export qtdir=/opt/trinity/share/qt3
-export kde_cgidir=/opt/trinity/lib/cgi-bin
-export kde_confdir=/etc/trinity
-export kde_htmldir=/opt/trinity/share/doc/tde/HTML
-configkde=--disable-debug --disable-rpath --prefix=$(kde_prefix) --sysconfdir=$(sysconfdir) --includedir=$(kde_includedir) --infodir=$(infodir) --mandir=$(mandir) --with-qt-dir=$(qtdir)
diff --git a/debian/_base/applications/office/koffice-i18n/debian/rules b/debian/_base/applications/office/koffice-i18n/debian/rules
index 8fb58ece9..a9ca115a3 100755
--- a/debian/_base/applications/office/koffice-i18n/debian/rules
+++ b/debian/_base/applications/office/koffice-i18n/debian/rules
@@ -3,11 +3,36 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+I18N_DIR_PREFIX := koffice-i18n
+I18N_DEST_PREFIX := $(I18N_DIR_PREFIX)
+I18N_DIR_PAT := $(I18N_DIR_PREFIX)-%
+I18N_DIRS := $(wildcard $(I18N_DIR_PREFIX)-*)
+
+# Stamps and support variables
+cur_lang = $(word 2,$(subst __, ,$@))
+cur_lang_target = $(subst @,_,$(cur_lang))
+cur_lang_dir = $(patsubst %,$(I18N_DIR_PREFIX)-%,$(cur_lang))
+cur_pkg_lang = $(subst _,,$(subst @,,$(subst @latn,latin,$(shell echo $(cur_lang) | tr '[:upper:]' '[:lower:]'))))
+cur_pkg = $(I18N_DEST_PREFIX)-$(cur_pkg_lang)-trinity
+
+STAMP_BUILD := $(patsubst $(I18N_DIR_PAT),debian/stamp__%__build,$(I18N_DIRS))
+I18N_INSTALL := $(patsubst $(I18N_DIR_PAT),install__%,$(I18N_DIRS))
+I18N_CLEAN := $(patsubst $(I18N_DIR_PAT),clean__%,$(I18N_DIRS))
+
+DEB_BUILD_PARALLEL ?= true
+
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
DEB_PARALLEL_JOBS ?= $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
DEB_MAKE_PARALLEL ?= $(and $(DEB_BUILD_PARALLEL),$(DEB_PARALLEL_JOBS),-j$(DEB_PARALLEL_JOBS))
+ifneq "$(wildcard /usr/bin/ninja)" ""
+MAKE = ninja -v
+DEB_MAKE_ENVVARS += DESTDIR=$(DEB_DESTDIR)
+DEB_MAKE_INSTALL_TARGET = install
+DEB_CMAKE_NORMAL_ARGS += -GNinja
+endif
+
# The default gzip compressor has been changed in dpkg >= 1.17.0.
deb_default_compress = $(shell LANG=C dpkg-deb --version | head -n1 | \
sed -e "s|.*version ||" -e "s| .*||" | \
@@ -18,91 +43,123 @@ DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
&& echo xz || echo bzip2)
endif
-languages = `ls -1d *i18n*`
+DEB_CMAKE_EXTRA_FLAGS := \
+ -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \
+ -DCMAKE_INSTALL_PREFIX="/opt/trinity" \
+ -DCONFIG_INSTALL_DIR="/etc/trinity" \
+ -DSYSCONF_INSTALL_DIR="/etc/trinity" \
+ -DXDG_MENU_INSTALL_DIR="/etc/xdg/menus" \
+ -DCMAKE_VERBOSE_MAKEFILE="ON" \
+ -DBUILD_ALL="ON"
+
-build-stamp:
+build::
dh_testdir
+ dh_prep
+
+ifneq "$(wildcard /usr/bin/ninja)" ""
+
+build:: debian/stamp__build
+
+debian/stamp__build:
+ [ -d build ] || \
+ mkdir build
+ cd build && \
+ cmake .. $(DEB_CMAKE_NORMAL_ARGS) $(DEB_CMAKE_EXTRA_FLAGS) && \
+ $(MAKE) $(DEB_MAKE_PARALLEL)
+ touch $@
+
+else
+
+build:: $(STAMP_BUILD)
+
+$(STAMP_BUILD):
+ # Building the '$(cur_lang)' language ...
+ [ -d $(cur_lang_dir)/build ] || \
+ mkdir $(cur_lang_dir)/build
+ [ -e $(cur_lang_dir)/CMakeLists.txt ] || \
+ ln -s ../template/commonCMakeLists.txt $(cur_lang_dir)/CMakeLists.txt
+ cd $(cur_lang_dir)/build && \
+ cmake .. $(DEB_CMAKE_NORMAL_ARGS) $(DEB_CMAKE_EXTRA_FLAGS) && \
+ $(MAKE) $(DEB_MAKE_PARALLEL)
+ touch $@
- # Regenerate build system
-ifneq "$(wildcard /usr/share/libtool/ltmain.sh)" ""
- cp -f /usr/share/libtool/ltmain.sh admin/ltmain.sh
-endif
-ifneq "$(wildcard /usr/share/libtool/config/ltmain.sh)" ""
- cp -f /usr/share/libtool/config/ltmain.sh admin/ltmain.sh
endif
-ifneq "$(wildcard /usr/share/libtool/build-aux/ltmain.sh)" ""
- cp -f /usr/share/libtool/build-aux/ltmain.sh admin/ltmain.sh
+
+install::
+ dh_testdir
+ dh_testroot
+
+install:: $(I18N_INSTALL)
+ dh_testdir
+ cat debian/control-source > debian/control
+ find debian -name "control-lang-*" | LANG=C sort | xargs -r cat >> debian/control
+
+$(I18N_INSTALL): build
+ifneq "$(wildcard /usr/bin/ninja)" ""
+ [ ! -e $(cur_lang_dir)/CMakeLists.txt ] || \
+ DESTDIR=$(CURDIR)/debian/$(cur_pkg) $(MAKE) -C build install-$(cur_lang_target)
+else
+ cd $(cur_lang_dir)/build && \
+ DESTDIR=$(CURDIR)/debian/$(cur_pkg) $(MAKE) install $(DEB_MAKE_PARALLEL)
endif
- cp -f /usr/share/aclocal/libtool.m4 admin/libtool.m4.in
-
- #Configure languages.
- -for i in $(languages); do \
- cd $$i && \
- autoreconf && automake -f && $(MAKE) -f ../admin/Makefile.common && \
- ./configure $(configkde); \
- $(MAKE) $(DEB_MAKE_PARALLEL); \
- cd ..; \
- done
-
- touch build-stamp
-
-build: build-stamp
--include debian/debiandirs
-
-clean:
- dh_clean
+ sed -e "s|@lang@|$(cur_lang)|g" \
+ -e "s|@pkg_lang@|$(cur_pkg_lang)|g" \
+ -e "s|@lang_desc@|$$(sed -n '/^\[$(cur_lang)\]/,/^\[/s#^Name=##p' /opt/trinity/share/locale/all_languages)|" \
+ < debian/control-lang > debian/control-lang-$(cur_pkg_lang); \
+
+ifneq "$(wildcard /usr/bin/ninja)" ""
+
+clean: debian-clean
+
+else
+
+clean: $(I18N_CLEAN) debian-clean
+
+$(I18N_CLEAN):
dh_testdir
-
- # Remove all language directories.
- rm -rf build-stamp
- rm -rf debian/*18n*
+ rm -rf $(cur_lang_dir)/build
+
+endif
-binary-indep: build
+debian-clean:
dh_testdir
+ rm -rf build
+ rm -rf debian/$(I18N_DEST_PREFIX)-*
+ rm -f debian/stamp__*
+ rm -f debian/control-lang-*
+ cat debian/control-source > debian/control
+ sed -e "s|@lang@|all|g" \
+ -e "s|-@pkg_lang@||g" \
+ -e "s|@lang_desc@|All languages|" \
+ < debian/control-lang >> debian/control
+ dh_clean
+
+
+binary-arch: build
dh_testroot
- dh_clean -k
-
- -for i in $(languages); do \
- ( \
- cd $$i && \
- echo $$(install_dir) && \
- $(MAKE) install DESTDIR=`pwd`/../debian/$$i-trinity $(DEB_MAKE_PARALLEL); \
- cd .. \
- ) \
- done
-
-
- mkdir debian/koffice-i18n-engb-trinity
- cp -aR debian/koffice-i18n-en_GB-trinity/* debian/koffice-i18n-engb-trinity/
-
- mkdir debian/koffice-i18n-ptbr-trinity
- cp -aR debian/koffice-i18n-pt_BR-trinity/* debian/koffice-i18n-ptbr-trinity/
-
- mkdir debian/koffice-i18n-srlatin-trinity
- cp -aR debian/koffice-i18n-sr@Latn-trinity/* debian/koffice-i18n-srlatin-trinity/
-
- mkdir debian/koffice-i18n-zhcn-trinity
- cp -aR debian/koffice-i18n-zh_CN-trinity/* debian/koffice-i18n-zhcn-trinity/
-
- mkdir debian/koffice-i18n-zhtw-trinity
- cp -aR debian/koffice-i18n-zh_TW-trinity/* debian/koffice-i18n-zhtw-trinity/
-
-
- #Removing duplicate kdgantt.mo files.
- -rm -f `find . -name "kdgantt.mo"`
+ dh_testdir
+
+binary-indep: build install
+ dh_testroot
+ dh_testdir
dh_installdocs
dh_installmenu
dh_installchangelogs
dh_strip
- dh_link
+ $(if $(wildcard /usr/bin/dh_strip_nondeterminism),\
+ dh_strip_nondeterminism)
dh_compress -X.docbook -X.css -X-license -X.dcl -X.bz2
dh_fixperms
dh_installdeb
+ dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb $(DEB_DH_BUILDDEB_ARGS)
-binary: binary-indep
-.PHONY: binary binary-indep clean
+# Below here is fairly generic really
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean build install $(I18N_INSTALL)
diff --git a/ubuntu/_base/applications/office/koffice-i18n/debian/control b/ubuntu/_base/applications/office/koffice-i18n/debian/control
index 8f7bb1a23..e30b5aae7 100644
--- a/ubuntu/_base/applications/office/koffice-i18n/debian/control
+++ b/ubuntu/_base/applications/office/koffice-i18n/debian/control
@@ -2,397 +2,15 @@ Source: koffice-i18n-trinity
Section: tde
Priority: optional
Maintainer: TDE Debian Team <team-debian@trinitydesktop.org>
-Uploaders: Ana Beatriz Guerrero Lopez <ana@debian.org>, Isaac Clerencia <isaac@debian.org>, Ben Burton <bab@debian.org>
-Build-Depends-Indep: tdelibs14-trinity-dev
-Build-Depends: debhelper (>= 9~), cdbs, quilt, automake, autoconf, libtool, libltdl-dev
-Standards-Version: 3.7.2
+Build-Depends: cdbs, debhelper (>= 9~), quilt, cmake-trinity, ninja-build, tdelibs14-trinity-dev
+Standards-Version: 3.8.4
-Package: koffice-i18n-bg-trinity
+Package: koffice-i18n-trinity
Architecture: all
Section: tde
-Recommends: tde-i18n-bg-trinity
+Recommends: tde-i18n-trinity
Suggests: koffice-trinity
Provides: koffice-i18n-trinity
-Description: Bulgarian (bg) translations for KOffice
- This package contains the Bulgarian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-ca-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ca-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Catalan (ca) translations for KOffice
- This package contains the Catalan translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-cs-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-cs-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Czech (cs) translations for KOffice
- This package contains the Czech translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-cy-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-cy-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Welsh (cy) translations for KOffice
- This package contains the Welsh translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-da-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-da-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Danish (da) translations for KOffice
- This package contains the Danish translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-de-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-de-trinity
-Suggests: koffice-trinity, openthesaurus-de-kword
-Provides: koffice-i18n-trinity
-Description: German (de) translations for KOffice
- This package contains the German translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-el-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-el-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Greek (el) translations for KOffice
- This package contains the greek translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-engb-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-engb-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: British English (en_GB) translations for KOffice
- This package contains the British English (en_GB) translations
- for all applications in the Trinity Office Suite.
-
-Package: koffice-i18n-es-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-es-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Spanish (es) translations for KOffice
- This package contains the Spanish translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-et-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-et-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Estonian (et) translations for KOffice
- This package contains the Estonian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-eu-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-eu-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Basque (eu) translations for KOffice
- This package contains the Basque translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-fa-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-fa-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Farsi (fa) translations for KOffice
- This package contains the Farsi translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-fi-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-fi-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Finnish (fi) translations for KOffice
- This package contains the Finnish translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-fr-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-fr-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: French (fr) translations for KOffice
- This package contains the French translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-ga-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ga-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Irish Gaelic (ga) translations for KOffice
- This package contains the Irish Gaelic translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-gl-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-gl-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Galician (gl) translations for KOffice
- This package contains the Galician translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-hu-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-hu-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Hungarian (hu) translations for KOffice
- This package contains the Hungarian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-it-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-it-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Italian (it) translations for KOffice
- This package contains the Italian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-ja-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ja-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Japanese (ja) translations for KOffice
- This package contains the Japanese translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-km-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-km-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Khmer (km) translations for KOffice
- This package contains the Khmer translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-lv-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-lv-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Latvian (lv) translations for KOffice
- This package contains the Latvian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-ms-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ms-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Malay (ms) translations for KOffice
- This package contains the Malay translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-nb-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-nb-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Norwegian Bookmal (nb) translations for KOffice
- This package contains the Norwegian Bookmal translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-nds-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-nds-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Low Saxon (nds) translations for KOffice
- This package contains the Low Saxon translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-ne-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ne-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Nepali (ne) translations for KOffice
- This package contains the Nepali translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-nl-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-nl-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Dutch (nl) translations for KOffice
- This package contains the Dutch translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-pl-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-pl-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Polish (pl) translations for KOffice
- This package contains the Polish translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-pt-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-pt-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Portuguese (pt) translations for KOffice
- This package contains the Portuguese translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-ptbr-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ptbr-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Brazilian Portuguese (pt_BR) translations for KOffice
- This package contains the Brazilian Portuguese translations for all
- applications in the Trinity Office Suite.
-
-Package: koffice-i18n-ru-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-ru-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Russian (ru) translations for KOffice
- This package contains the Russian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-sk-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-sk-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Slovak (sk) translations for KOffice
- This package contains the Slovak translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-sl-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-sl-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Slovenian (sl) translations for KOffice
- This package contains the Slovenian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-sr-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-sr-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Serbian (sr) translations for KOffice
- This package contains the Serbian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-srlatin-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-srlatin-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Latin Serbian (sr@Latn) translations for KOffice
- This package contains the Latin Serbian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-sv-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-sv-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Swedish (sv) translations for KOffice
- This package contains the Swedish translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-tr-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-tr-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Turkish (tr) translations for KOffice
- This package contains the Turkish translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-uk-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-uk-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Ukrainian (uk) translations for KOffice
- This package contains the Ukrainian translations for all applications
- in the Trinity Office Suite.
-
-Package: koffice-i18n-zhcn-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-zhcn-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Chinese Simplified (zh_CN) translations for KOffice
- This package contains the Chinese Simplified translations for all
- applications in the Trinity Office Suite.
-
-Package: koffice-i18n-zhtw-trinity
-Architecture: all
-Section: tde
-Recommends: tde-i18n-zhtw-trinity
-Suggests: koffice-trinity
-Provides: koffice-i18n-trinity
-Description: Chinese Traditional (zh_TW) translations for KOffice
- This package contains the Chinese Traditional translations for all
- applications in the Trinity Office Suite.
+Description: All languages (all) internationalized (i18n) files for KOffice
+ This package contains the All languages (all) internationalized (i18n)
+ files for all applications in Trinity Office Suite.
diff --git a/ubuntu/_base/applications/office/koffice-i18n/debian/control-lang b/ubuntu/_base/applications/office/koffice-i18n/debian/control-lang
new file mode 100644
index 000000000..f75b7d747
--- /dev/null
+++ b/ubuntu/_base/applications/office/koffice-i18n/debian/control-lang
@@ -0,0 +1,10 @@
+
+Package: koffice-i18n-@pkg_lang@-trinity
+Architecture: all
+Section: tde
+Recommends: tde-i18n-@pkg_lang@-trinity
+Suggests: koffice-trinity
+Provides: koffice-i18n-trinity
+Description: @lang_desc@ (@lang@) internationalized (i18n) files for KOffice
+ This package contains the @lang_desc@ (@lang@) internationalized (i18n)
+ files for all applications in Trinity Office Suite.
diff --git a/ubuntu/_base/applications/office/koffice-i18n/debian/control-source b/ubuntu/_base/applications/office/koffice-i18n/debian/control-source
new file mode 100644
index 000000000..c1a3a089b
--- /dev/null
+++ b/ubuntu/_base/applications/office/koffice-i18n/debian/control-source
@@ -0,0 +1,6 @@
+Source: koffice-i18n-trinity
+Section: tde
+Priority: optional
+Maintainer: TDE Debian Team <team-debian@trinitydesktop.org>
+Build-Depends: cdbs, debhelper (>= 9~), quilt, cmake-trinity, ninja-build, tdelibs14-trinity-dev
+Standards-Version: 3.8.4
diff --git a/ubuntu/_base/applications/office/koffice-i18n/debian/debiandirs b/ubuntu/_base/applications/office/koffice-i18n/debian/debiandirs
deleted file mode 100644
index 90247b9a0..000000000
--- a/ubuntu/_base/applications/office/koffice-i18n/debian/debiandirs
+++ /dev/null
@@ -1,10 +0,0 @@
-export kde_prefix=/opt/trinity
-export sysconfdir=/etc
-export kde_includedir=/opt/trinity/include/tde
-export infodir=/opt/trinity/share/info
-export mandir=/opt/trinity/share/man
-export qtdir=/opt/trinity/share/qt3
-export kde_cgidir=/opt/trinity/lib/cgi-bin
-export kde_confdir=/etc/trinity
-export kde_htmldir=/opt/trinity/share/doc/tde/HTML
-configkde=--disable-debug --disable-rpath --prefix=$(kde_prefix) --sysconfdir=$(sysconfdir) --includedir=$(kde_includedir) --infodir=$(infodir) --mandir=$(mandir) --with-qt-dir=$(qtdir)
diff --git a/ubuntu/_base/applications/office/koffice-i18n/debian/rules b/ubuntu/_base/applications/office/koffice-i18n/debian/rules
index 8fb58ece9..a9ca115a3 100755
--- a/ubuntu/_base/applications/office/koffice-i18n/debian/rules
+++ b/ubuntu/_base/applications/office/koffice-i18n/debian/rules
@@ -3,11 +3,36 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+I18N_DIR_PREFIX := koffice-i18n
+I18N_DEST_PREFIX := $(I18N_DIR_PREFIX)
+I18N_DIR_PAT := $(I18N_DIR_PREFIX)-%
+I18N_DIRS := $(wildcard $(I18N_DIR_PREFIX)-*)
+
+# Stamps and support variables
+cur_lang = $(word 2,$(subst __, ,$@))
+cur_lang_target = $(subst @,_,$(cur_lang))
+cur_lang_dir = $(patsubst %,$(I18N_DIR_PREFIX)-%,$(cur_lang))
+cur_pkg_lang = $(subst _,,$(subst @,,$(subst @latn,latin,$(shell echo $(cur_lang) | tr '[:upper:]' '[:lower:]'))))
+cur_pkg = $(I18N_DEST_PREFIX)-$(cur_pkg_lang)-trinity
+
+STAMP_BUILD := $(patsubst $(I18N_DIR_PAT),debian/stamp__%__build,$(I18N_DIRS))
+I18N_INSTALL := $(patsubst $(I18N_DIR_PAT),install__%,$(I18N_DIRS))
+I18N_CLEAN := $(patsubst $(I18N_DIR_PAT),clean__%,$(I18N_DIRS))
+
+DEB_BUILD_PARALLEL ?= true
+
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
DEB_PARALLEL_JOBS ?= $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
DEB_MAKE_PARALLEL ?= $(and $(DEB_BUILD_PARALLEL),$(DEB_PARALLEL_JOBS),-j$(DEB_PARALLEL_JOBS))
+ifneq "$(wildcard /usr/bin/ninja)" ""
+MAKE = ninja -v
+DEB_MAKE_ENVVARS += DESTDIR=$(DEB_DESTDIR)
+DEB_MAKE_INSTALL_TARGET = install
+DEB_CMAKE_NORMAL_ARGS += -GNinja
+endif
+
# The default gzip compressor has been changed in dpkg >= 1.17.0.
deb_default_compress = $(shell LANG=C dpkg-deb --version | head -n1 | \
sed -e "s|.*version ||" -e "s| .*||" | \
@@ -18,91 +43,123 @@ DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
&& echo xz || echo bzip2)
endif
-languages = `ls -1d *i18n*`
+DEB_CMAKE_EXTRA_FLAGS := \
+ -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \
+ -DCMAKE_INSTALL_PREFIX="/opt/trinity" \
+ -DCONFIG_INSTALL_DIR="/etc/trinity" \
+ -DSYSCONF_INSTALL_DIR="/etc/trinity" \
+ -DXDG_MENU_INSTALL_DIR="/etc/xdg/menus" \
+ -DCMAKE_VERBOSE_MAKEFILE="ON" \
+ -DBUILD_ALL="ON"
+
-build-stamp:
+build::
dh_testdir
+ dh_prep
+
+ifneq "$(wildcard /usr/bin/ninja)" ""
+
+build:: debian/stamp__build
+
+debian/stamp__build:
+ [ -d build ] || \
+ mkdir build
+ cd build && \
+ cmake .. $(DEB_CMAKE_NORMAL_ARGS) $(DEB_CMAKE_EXTRA_FLAGS) && \
+ $(MAKE) $(DEB_MAKE_PARALLEL)
+ touch $@
+
+else
+
+build:: $(STAMP_BUILD)
+
+$(STAMP_BUILD):
+ # Building the '$(cur_lang)' language ...
+ [ -d $(cur_lang_dir)/build ] || \
+ mkdir $(cur_lang_dir)/build
+ [ -e $(cur_lang_dir)/CMakeLists.txt ] || \
+ ln -s ../template/commonCMakeLists.txt $(cur_lang_dir)/CMakeLists.txt
+ cd $(cur_lang_dir)/build && \
+ cmake .. $(DEB_CMAKE_NORMAL_ARGS) $(DEB_CMAKE_EXTRA_FLAGS) && \
+ $(MAKE) $(DEB_MAKE_PARALLEL)
+ touch $@
- # Regenerate build system
-ifneq "$(wildcard /usr/share/libtool/ltmain.sh)" ""
- cp -f /usr/share/libtool/ltmain.sh admin/ltmain.sh
-endif
-ifneq "$(wildcard /usr/share/libtool/config/ltmain.sh)" ""
- cp -f /usr/share/libtool/config/ltmain.sh admin/ltmain.sh
endif
-ifneq "$(wildcard /usr/share/libtool/build-aux/ltmain.sh)" ""
- cp -f /usr/share/libtool/build-aux/ltmain.sh admin/ltmain.sh
+
+install::
+ dh_testdir
+ dh_testroot
+
+install:: $(I18N_INSTALL)
+ dh_testdir
+ cat debian/control-source > debian/control
+ find debian -name "control-lang-*" | LANG=C sort | xargs -r cat >> debian/control
+
+$(I18N_INSTALL): build
+ifneq "$(wildcard /usr/bin/ninja)" ""
+ [ ! -e $(cur_lang_dir)/CMakeLists.txt ] || \
+ DESTDIR=$(CURDIR)/debian/$(cur_pkg) $(MAKE) -C build install-$(cur_lang_target)
+else
+ cd $(cur_lang_dir)/build && \
+ DESTDIR=$(CURDIR)/debian/$(cur_pkg) $(MAKE) install $(DEB_MAKE_PARALLEL)
endif
- cp -f /usr/share/aclocal/libtool.m4 admin/libtool.m4.in
-
- #Configure languages.
- -for i in $(languages); do \
- cd $$i && \
- autoreconf && automake -f && $(MAKE) -f ../admin/Makefile.common && \
- ./configure $(configkde); \
- $(MAKE) $(DEB_MAKE_PARALLEL); \
- cd ..; \
- done
-
- touch build-stamp
-
-build: build-stamp
--include debian/debiandirs
-
-clean:
- dh_clean
+ sed -e "s|@lang@|$(cur_lang)|g" \
+ -e "s|@pkg_lang@|$(cur_pkg_lang)|g" \
+ -e "s|@lang_desc@|$$(sed -n '/^\[$(cur_lang)\]/,/^\[/s#^Name=##p' /opt/trinity/share/locale/all_languages)|" \
+ < debian/control-lang > debian/control-lang-$(cur_pkg_lang); \
+
+ifneq "$(wildcard /usr/bin/ninja)" ""
+
+clean: debian-clean
+
+else
+
+clean: $(I18N_CLEAN) debian-clean
+
+$(I18N_CLEAN):
dh_testdir
-
- # Remove all language directories.
- rm -rf build-stamp
- rm -rf debian/*18n*
+ rm -rf $(cur_lang_dir)/build
+
+endif
-binary-indep: build
+debian-clean:
dh_testdir
+ rm -rf build
+ rm -rf debian/$(I18N_DEST_PREFIX)-*
+ rm -f debian/stamp__*
+ rm -f debian/control-lang-*
+ cat debian/control-source > debian/control
+ sed -e "s|@lang@|all|g" \
+ -e "s|-@pkg_lang@||g" \
+ -e "s|@lang_desc@|All languages|" \
+ < debian/control-lang >> debian/control
+ dh_clean
+
+
+binary-arch: build
dh_testroot
- dh_clean -k
-
- -for i in $(languages); do \
- ( \
- cd $$i && \
- echo $$(install_dir) && \
- $(MAKE) install DESTDIR=`pwd`/../debian/$$i-trinity $(DEB_MAKE_PARALLEL); \
- cd .. \
- ) \
- done
-
-
- mkdir debian/koffice-i18n-engb-trinity
- cp -aR debian/koffice-i18n-en_GB-trinity/* debian/koffice-i18n-engb-trinity/
-
- mkdir debian/koffice-i18n-ptbr-trinity
- cp -aR debian/koffice-i18n-pt_BR-trinity/* debian/koffice-i18n-ptbr-trinity/
-
- mkdir debian/koffice-i18n-srlatin-trinity
- cp -aR debian/koffice-i18n-sr@Latn-trinity/* debian/koffice-i18n-srlatin-trinity/
-
- mkdir debian/koffice-i18n-zhcn-trinity
- cp -aR debian/koffice-i18n-zh_CN-trinity/* debian/koffice-i18n-zhcn-trinity/
-
- mkdir debian/koffice-i18n-zhtw-trinity
- cp -aR debian/koffice-i18n-zh_TW-trinity/* debian/koffice-i18n-zhtw-trinity/
-
-
- #Removing duplicate kdgantt.mo files.
- -rm -f `find . -name "kdgantt.mo"`
+ dh_testdir
+
+binary-indep: build install
+ dh_testroot
+ dh_testdir
dh_installdocs
dh_installmenu
dh_installchangelogs
dh_strip
- dh_link
+ $(if $(wildcard /usr/bin/dh_strip_nondeterminism),\
+ dh_strip_nondeterminism)
dh_compress -X.docbook -X.css -X-license -X.dcl -X.bz2
dh_fixperms
dh_installdeb
+ dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb $(DEB_DH_BUILDDEB_ARGS)
-binary: binary-indep
-.PHONY: binary binary-indep clean
+# Below here is fairly generic really
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean build install $(I18N_INSTALL)