aboutsummaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorGravatar Yaroslav Halchenko <debian@onerussian.com>2015-05-11 09:45:33 +0100
committerGravatar Joey Hess <joeyh@joeyh.name>2015-05-11 11:50:59 -0400
commit5f9b1e8e0ab2a189b2d491503bb38931b5fdaad5 (patch)
tree3f2d57381ec0f1adfbab60b089180092cc374db2 /debian/rules
parenta3f6cfb8c0958348c2799e4c84bdf3932b1738d7 (diff)
ENH: make debianstandalone{,-dsc} rules
Moved rules out of debian/rules and avoided need for patching it for standalone builds
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules26
1 files changed, 17 insertions, 9 deletions
diff --git a/debian/rules b/debian/rules
index 26f244812..927c1c925 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,18 +2,26 @@
export CABAL=debian/cabal-wrapper
+STANDALONE_BUILD=$(shell grep -qe '^Package: git-annex-standalone' debian/control \
+ && echo 1 || echo 0)
+
# Do use the changelog's version number, rather than making one up.
export RELEASE_BUILD=1
%:
dh $@
-# Run this target to build git-annex-standalone.deb
-build-standalone:
- test -e .git
- git checkout debian/changelog
- quilt pop -a || true
- QUILT_PATCHES=debian/patches QUILT_SERIES=series.standalone-build quilt push -a
- debian/create-standalone-changelog
- dpkg-buildpackage -rfakeroot
- quilt pop -a
+
+# Standalone build logic/helpers
+ifeq ($(STANDALONE_BUILD),1)
+
+override_dh_auto_build:
+ make linuxstandalone
+
+override_dh_auto_install:
+ : # nothing to do, we just need to copy the beast, as instructed in debian/install
+
+override_dh_fixperms:
+ dh_fixperms -Xld-linux
+
+endif