[debian-edu-commits] debian-edu/pkg-team/ 07/08: debian/rules: Add repacking logic, initially because of binary blob (nasm for MacOS X) in upstream sources.
Mike Gabriel
sunweaver at debian.org
Mon Feb 15 12:08:18 UTC 2016
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch master
in repository veracrypt.
commit 491c3cfbe3f38511625db4dc5d9c6d978118d3b3
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Mon Feb 15 13:06:33 2016 +0100
debian/rules: Add repacking logic, initially because of binary blob (nasm for MacOS X) in upstream sources.
---
debian/rules | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 46 insertions(+), 2 deletions(-)
diff --git a/debian/rules b/debian/rules
index ffaf996..289f39f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,13 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+NULL =
+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 = +repack1
+VER ?= $(subst $(DTYPE),,$(UVER))
+
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
@@ -28,5 +35,42 @@ override_dh_compress:
override_dh_installinit:
dh_installinit --no-start -- stop 10 0 1 6 .
-get-orig-source:
- uscan --noconf --force-download --rename --download-current-version --destdir=..
+## http://wiki.debian.org/onlyjob/get-orig-source
+.PHONY: get-orig-source
+get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
+ @
+
+$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
+ @echo "# Downloading..."
+ uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
+ $(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
+ @echo "# Extracting..."
+ mkdir $(PKG)-$(VER) \
+ && tar -xf $(PKG)_$(VER).orig.tar.* --directory $(PKG)-$(VER) --strip-components 0 \
+ || $(RM) -r $(PKG)-$(VER)
+ @echo "# Cleaning-up..."
+ cd $(PKG)-$(VER) \
+ && $(RM) -r -v \
+ src/Build/build_veracrypt_macosx.sh \
+ src/Build/Resources/ \
+ src/Build/Tools/ \
+ src/Build/Core/Unix/MacOSX \
+ src/Build/Core/Unix/Solaris \
+ src/Boot/Windows/Boot.vcproj \
+ src/Crypto/Crypto.vcproj \
+ src/Driver/Driver.vcproj \
+ src/ExpandVolume/ExpandVolume.vcproj \
+ src/Format/Format.vcproj \
+ src/Mount/Mount.vcproj \
+ src/Setup/Setup.vcproj \
+ $(NULL)
+ #$(RM) -v $(PKG)_$(VER).orig.tar.*
+ @echo "# Packing..."
+ find -L "$(PKG)-$(VER)" -xdev -type f -print | LC_ALL=C sort \
+ | XZ_OPT="-6v" tar -caf "../$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
+ && $(RM) -r \
+ $(PKG)-$(VER) \
+ $(PKG)_$(VER)* \
+ $(NULL)
+
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/veracrypt.git
More information about the debian-edu-commits
mailing list