[Pkg-crosswire-devel] [Branch ~pkgcrosswire/libsword/main] Rev 36: * debian/rules:

noreply at launchpad.net noreply at launchpad.net
Sat May 23 03:25:14 BST 2009


------------------------------------------------------------
revno: 36 [merge]
committer: Dmitrijs Ledkovs <dmitrij.ledkov at gmail.com>
branch nick: main
timestamp: Sat 2009-05-23 03:21:39 +0100
message:
  * debian/rules:
    - DFSG get-orig-source target.
modified:
  debian/changelog
  debian/rules

=== modified file 'debian/changelog'
--- debian/changelog	2009-05-21 14:22:28 +0000
+++ debian/changelog	2009-05-23 02:21:39 +0000
@@ -19,7 +19,9 @@
     - Add libsword7 to Conflicts.
     - Fix case of sword to SWORD in package descriptions.
     - Bump Standards-Version to 3.8.1 (no changes needed).
-
+  * debian/rules:
+    - DFSG get-orig-source target.
+  
   [ Dmitrijs Ledkovs ]
   * debian/rules: Added utils.mk to use missing-files target and call it on
     each build.
@@ -33,7 +35,7 @@
   * debian/libsword8.lintian-overrides: added override for module
     installation directory.
 
- -- Dmitrijs Ledkovs <dmitrij.ledkov at gmail.com>  Thu, 21 May 2009 14:21:24 +0000
+ -- Dmitrijs Ledkovs <dmitrij.ledkov at gmail.com>  Sat, 23 May 2009 02:18:34 +0000
 
 sword (1.5.11-1) experimental; urgency=low
 

=== modified file 'debian/rules'
--- debian/rules	2009-05-21 14:10:56 +0000
+++ debian/rules	2009-05-23 02:21:39 +0000
@@ -33,3 +33,36 @@
 	#checking for missing files
 clean/::
 	rm -f *.1
+
+# Makefile arcanery warning:
+# $(dir $(_)) gives us the path containing this rules file.
+# This magic care of Emmet Hickory:
+# (http://lists.debian.org/debian-devel-games/2008/02/msg00135.html)
+
+TEMP_DIR := $(shell mktemp -d)
+SOURCE_DIR = $(shell ls $(TEMP_DIR) | grep sword- | grep .tar.gz | sed s/.tar.gz//)
+SOURCE_VER = $(shell echo $(notdir $(SOURCE_DIR)) | sed s/sword-//)
+
+download-tarball:
+	uscan --download --package sword --destdir=$(TEMP_DIR) \
+	      --no-symlink --upstream-version 0 --watchfile=$(dir $(_))/watch
+	cd $(TEMP_DIR) && tar zxf sword-*.tar.gz
+
+remove-unwanted-files: download-tarball
+	# zlib is (mostly) an old copy of the zlib library
+	# Leave only untgz.c which is needed and not part of zlib
+	rm $(TEMP_DIR)/$(SOURCE_DIR)/src/utilfuns/zlib/[a-tv-z]*
+	rm $(TEMP_DIR)/$(SOURCE_DIR)/src/utilfuns/zlib/uncompr.c
+	rm $(TEMP_DIR)/$(SOURCE_DIR)/include/zlib.h
+	# regex.c and regex.h are GNU C library files
+	rm $(TEMP_DIR)/$(SOURCE_DIR)/src/utilfuns/regex.c
+	rm $(TEMP_DIR)/$(SOURCE_DIR)/include/regex.h
+
+repack-source: remove-unwanted-files
+	cd $(TEMP_DIR) && mv $(SOURCE_DIR) $(SOURCE_DIR)+dfsg && \
+		tar zcf sword_$(SOURCE_VER)+dfsg.orig.tar.gz \
+		$(notdir $(SOURCE_DIR)+dfsg)
+
+get-orig-source: repack-source
+	mv $(TEMP_DIR)/sword_$(SOURCE_VER)+dfsg.orig.tar.gz $(CURDIR)
+	rm -r $(TEMP_DIR)



--
Main packaging branch
https://code.launchpad.net/~pkgcrosswire/libsword/main

Your team Crosswire Packaging Team is subscribed to branch lp:libsword.
To unsubscribe from this branch go to https://code.launchpad.net/~pkgcrosswire/libsword/main/+edit-subscription.




More information about the Pkg-crosswire-devel mailing list