[debian-edu-commits] debian-edu/ 08/09: debian/rules: Provide get-orig-source rule that builds an orig tarball from the package folder itself (excluding the debian/ directory).

Mike Gabriel sunweaver at debian.org
Sun Oct 5 22:46:10 UTC 2014


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

sunweaver pushed a commit to branch master
in repository debian-edu-artwork.

commit 531461ac7df456c9fd141d84eadffb910d3e609b
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Oct 6 00:16:44 2014 +0200

    debian/rules: Provide get-orig-source rule that builds an orig tarball from the package folder itself (excluding the debian/ directory).
---
 debian/changelog |  3 +++
 debian/rules     | 11 +++++++++++
 2 files changed, 14 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 9e1333a..15f5e21 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -43,6 +43,9 @@ debian-edu-artwork (0.49-1) UNRELEASED; urgency=medium
       some work in.
   * debian/copyright:
     + Convert to DEP-5 machine-readable format.
+  * debian/rules:
+    + Provide get-orig-source rule that builds an orig tarball from the
+      package folder itself (excluding the debian/ directory).
 
  -- Wolfgang Schweer <wschweer at arcor.de>  Fri, 03 Oct 2014 16:54:10 +0200
 
diff --git a/debian/rules b/debian/rules
index ebfa9c7..ce0aa12 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,9 @@
 #!/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+.*)};')
+
 include /usr/share/cdbs/1/class/autotools.mk
 include /usr/share/cdbs/1/rules/autoreconf.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
@@ -18,3 +22,10 @@ install/debian-edu-artwork-spacefun::
 install/debian-edu-artwork-lines::
 	install -d debian/$(cdbs_curpkg)$(sbindir)
 	install debian/update-debian-edu-artwork-lines debian/$(cdbs_curpkg)$(sbindir)
+
+get-orig-source: clean
+	mkdir -p $(PKG)-$(UVER)/
+	rsync -av --delete --exclude=debian/ --exclude=$(PKG)-$(UVER)/ * $(PKG)-$(UVER)/
+	find "$(PKG)-$(UVER)" -xdev -print | sort \
+	    | tar -caf "../$(PKG)_$(UVER).orig.tar.gz" -T- --owner=root --group=root --mode=a+rX \
+	    && $(RM) -r "$(PKG)-$(UVER)"

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



More information about the debian-edu-commits mailing list