[SCM] calligra localization packaging branch, master, updated. 0bd318e47430b06d514c9039efad0df747d77a80

Pino Toscano pino at alioth.debian.org
Fri Apr 6 22:18:35 UTC 2012


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-std/calligra-l10n.git;a=commitdiff;h=6ed2a26

The following commit has been merged in the master branch:
commit 6ed2a26920e1edd98375b882e1248d8ea63b2f24
Author: Pino Toscano <pino at debian.org>
Date:   Sat Apr 7 00:12:14 2012 +0200

    adopt the kde-l10n way of building (and switch to source v3.0)
    
    copy basically the rules file from kde-l10n, adapting to the multiorig source format with empty orig, no patch system, and parallel support
---
 debian/rules          |   73 +++++++++++++++++++++---------------------------
 debian/source/format  |    2 +-
 debian/source/options |    2 +
 3 files changed, 35 insertions(+), 42 deletions(-)

diff --git a/debian/rules b/debian/rules
index bfda633..83f4943 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,10 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+    MAKEFLAGS += -j$(NUMJOBS)
+endif
 
 # Value of the calligra:{Depends,Recommends,Suggests,Replaces,Breaks,Provides}
 # substvars. Common relationships for each l10n package. 
@@ -13,23 +17,21 @@ L10N_Breaks :=
 L10N_Provides := calligra-l10n
 
 L10N_PREFIX := calligra-l10n
-L10N_VERSION := $(shell cat debian/changelog | head -n1 | sed 's/.*(\([[:digit:]]\+:\)\?\(.\+\)-.\+).*//')
-L10N_DIRS := $(subst .tar.bz2,,$(wildcard $(L10N_PREFIX)-*-$(L10N_VERSION).tar.bz2))
-L10N_LANGS := $(patsubst $(L10N_PREFIX)-%-$(L10N_VERSION),%,$(L10N_DIRS))
-L10N_PACKAGES :=$(patsubst %,$(L10N_PREFIX)-%,$(shell echo $(subst _,,$(subst @,,$(L10N_LANGS))) | tr A-Z a-z))
-L10N_PATCHES := $(wildcard debian/patches/*.diff)
+#L10N_VERSION := $(shell cat debian/changelog | head -n1 | sed 's/.*(\([[:digit:]]\+:\)\?\(.\+\)-.\+).*//')
+L10N_LANGS := $(filter-out debian,$(subst ./,,$(shell find . -mindepth 1 -maxdepth 1 -type d ! -name .pc ! -name .git)))
+L10N_DIRS = $(L10N_LANGS)
+L10N_PACKAGES := $(patsubst %,$(L10N_PREFIX)-%,$(L10N_LANGS))
 
 # Support variables to be used in targets
 cur_lang = $(word 2,$(subst __, ,$@))
-cur_lang_dir = $(patsubst %,$(L10N_PREFIX)-%-$(L10N_VERSION),$(cur_lang))
-cur_lang_patch = $(patsubst %,debian/patches/%.diff,$(cur_lang))
-cur_pkg = $(L10N_PREFIX)-$(shell echo $(subst _,,$(subst @,,$(cur_lang))) | tr A-Z a-z)
+cur_lang_dir = $(cur_lang)
+cur_lang_builddir = $(cur_lang_dir)/build
+cur_pkg = $(L10N_PREFIX)-$(cur_lang)
 
 # Stamps
-STAMP_EXTRACT := $(patsubst %,debian/stamp__%__extract,$(L10N_LANGS))
-STAMP_PATCH := $(patsubst debian/patches/%.diff,debian/stamp__%__patch,$(L10N_PATCHES))
 STAMP_BUILD := $(patsubst %,debian/stamp__%__build,$(L10N_LANGS))
 L10N_INSTALL := $(patsubst %,install__%,$(L10N_LANGS))
+L10N_CLEAN := $(patsubst %,clean__%,$(L10N_LANGS))
 
 # debian/control checks
 L10N_PACKAGES_IN_CONTROL := $(shell dh_listpackages | grep '$(L10N_PREFIX)')
@@ -42,52 +44,41 @@ check_control:
 	@test -z "$(L10N_EXCESS_IN_CONTROL)" || \
 		(echo "-- ERROR: debian/control has excess language packages: $(L10N_EXCESS_IN_CONTROL)" && false)
 
-
-patch: $(STAMP_PATCH)
-
-$(STAMP_PATCH):
-	# Applying patch for the '$(cur_lang)' language ...
-	cd $(cur_lang_dir) && patch --set-utc -p1 < "$(CURDIR)/$(cur_lang_patch)" > $(CURDIR)/$@_log
-	mv $@_log $@
-
-build:: build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-build-stamp:
+prepare_build: check_control
 	dh_testdir
 
-build:: check_control $(STAMP_EXTRACT) patch $(STAMP_BUILD)
-
-$(STAMP_EXTRACT):
-	tar xfj $(cur_lang_dir).tar.bz2
-	@touch $@
+build: $(STAMP_BUILD)
 
-$(STAMP_BUILD):
-	# Building the '$(cur_lang)' language ...
-	cd $(cur_lang_dir) && cmake . -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_VERBOSE_MAKEFILE=ON && $(MAKE)
+build_progress = [$(shell ls -1 -d debian/stamp__*__build debian | wc -l)/$(words $(STAMP_BUILD))]
+$(STAMP_BUILD): | prepare_build
+	# $(build_progress) Building '$(cur_lang)' language ...
+	dh_auto_configure -Scmake -D$(cur_lang) -B$(cur_lang_builddir) -- -DCMAKE_BUILD_TYPE=Debian
+	$(MAKE) -C $(cur_lang_builddir)
+	# $(build_progress) Built '$(cur_lang)' language.
 	touch $@
 
-
-install::
+prepare_install:
 	dh_testdir
 	dh_testroot
 	dh_prep
 
-install:: $(L10N_INSTALL)
+install: $(L10N_INSTALL)
 	# Installed successfully
 
-$(L10N_INSTALL):
+$(L10N_INSTALL): | prepare_install
 	# Installing '$(cur_lang)' to the '$(cur_pkg)' package
-	cd $(cur_lang_dir) && $(MAKE) install DESTDIR=$(CURDIR)/debian/$(cur_pkg)
+	dh_auto_install -Scmake -D$(cur_lang) -B$(cur_lang_builddir) --destdir=$(CURDIR)/debian/$(cur_pkg)
 
-clean: debian-clean
-debian-clean:
+prepare_clean:
 	dh_testdir
-	# delete unpacked bzip2 languages
-	rm -rf $(L10N_PREFIX)-*-$(L10N_VERSION)/ debian/$(L10N_PREFIX)-*
-	rm -f debian/stamp__*
+
+clean: $(L10N_CLEAN)
 	dh_clean
 
+# Delete build directories
+$(L10N_CLEAN): prepare_clean
+	rm -rf $(cur_lang_builddir) debian/stamp__$(cur_lang)__*
+
 binary-arch:
 	# No architecture dependent files available
 
@@ -111,4 +102,4 @@ binary-indep: build install
 binary: binary-indep binary-arch
 
 .PHONY: binary binary-arch binary-indep clean patch build install
-.PHONY: check_control $(L10N_INSTALL)
+.PHONY: check_control prepare_build prepare_install $(L10N_INSTALL) $(L10N_CLEAN)
diff --git a/debian/source/format b/debian/source/format
index d3827e7..163aaf8 100644
--- a/debian/source/format
+++ b/debian/source/format
@@ -1 +1 @@
-1.0
+3.0 (quilt)
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000..8347d5a
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1,2 @@
+compression=bzip2
+create-empty-orig

-- 
calligra localization packaging



More information about the pkg-kde-commits mailing list