[debian-edu-commits] debian-edu/pkg-team/ 08/25: debian/rules: Rework get-orig-source rule, remove embedded libraries from upstream source tree.

Mike Gabriel sunweaver at debian.org
Tue Aug 12 16:44:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository gosa.

commit 26c5c9d175926d01d25a721a2a5e4a6ee14f72db
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Aug 11 18:05:35 2014 +0200

    debian/rules: Rework get-orig-source rule, remove embedded libraries from upstream source tree.
---
 debian/rules | 37 ++++++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 9 deletions(-)

diff --git a/debian/rules b/debian/rules
index a84b5b8..d46c3f9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,11 +1,13 @@
 #!/usr/bin/make -f
 
-PKD   = $(word 1,$(abspath $(dir $(MAKEFILE_LIST))))
-PKG   = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
-UVER  = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
-DTYPE = +reloaded1
-VER  ?= $(subst $(DTYPE),,$(UVER))
-PLUGINS = $(shell ls debian/watch.* | cut -d "." -f2 | sed -e 's/gosa-//')
+PKD      = $(word 1,$(abspath $(dir $(MAKEFILE_LIST))))
+PKG      = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
+UVER     = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
+DTYPE    = +reloaded2
+VER     ?= $(subst $(DTYPE),,$(UVER))
+PLUGINS  = $(shell ls debian/watch.* | cut -d "." -f2 | sed -e 's/gosa-//')
+
+NULL     =
 
 %:
 	dh $@
@@ -43,10 +45,27 @@ override_dh_installchangelogs:
 get-orig-source: $(patsubst %,$(PKG)-%_$(VER)$(DTYPE).orig.tar.gz,$(PLUGINS))
 	cd $(PKD) && XZ_OPT=-6v tar -caf "../$(PKG)_$(VER)$(DTYPE).orig.tar.gz" --owner=root --group=root --mode=a+rX README.multi-orig-tarball-package
 	cd $(PKD)/.. && mv *.tar.gz ..
+	@echo "# Repacking gosa-core..."
+	cd $(PKD)/.. && rm -rf gosa-core-$(VER) && tar xzf ../$(PKG)_$(VER)$(DTYPE).orig-gosa-core.tar.gz
+	cd $(PKD)/../gosa-core-$(VER) && \
+	    rm -rfv debian/ \
+	    rm -rfv redhat/ \
+	    rm -rfv include/smarty \
+	    rm -fv  include/smartyAddons/block.t.php \
+	    rm -f   html/include/prototype.js \
+	    rm -f   html/include/scriptaculous.js \
+	    rm -f   html/themes/fonts/*.ttf \
+	    $(NULL)
+	rm ../$(PKG)_$(VER)$(DTYPE).orig-gosa-core.tar.gz
+	cd $(PKD)/../ && tar czf ../$(PKG)_$(VER)$(DTYPE).orig-gosa-core.tar.gz gosa-core-$(VER) && rm -rf gosa-core-$(VER)
+
 
 $(PKG)-%_$(VER)$(DTYPE).orig.tar.gz:
-	cd $(PKD)/..
 	@echo "# Downloading..."
-	uscan --noconf --force-download --package $(PKG)-$* --watchfile debian/watch.gosa-$* --upstream-version $(UVER) --download-version $(VER) --rename --destdir=.
+	if [ ! -f $(PKD)/../../$(PKG)_$(VER)$(DTYPE).orig-$(shell echo $* | sed -e 's/plugin-//').tar.gz ]; then \
+	    cd $(PKD)/.. && uscan --noconf --download --force-download --package $(PKG)-$* --watchfile debian/watch.gosa-$* --upstream-version $(UVER) --download-version $(VER) --rename --destdir=../; \
+	fi
 	@echo "# Renaming..."
-	mv -v $(PKG)-$*_$(VER).orig.tar.gz $(PKG)_$(VER)$(DTYPE).orig-$(shell echo $* | sed -e 's/plugin-//').tar.gz
+	if [ -f $(PKD)/../../$(PKG)-$*_$(VER).orig.tar.gz ]; then \
+	    cd $(PKD)/.. && mv -v ../$(PKG)-$*_$(VER).orig.tar.gz ../$(PKG)_$(VER)$(DTYPE).orig-$(shell echo $* | sed -e 's/plugin-//').tar.gz; \
+	fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/gosa.git



More information about the debian-edu-commits mailing list