1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
#!/usr/bin/make -f
# -*- makefile -*-
# The multi-build in this file is based on the example
# in kmod.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DEB_CONFIGURE_EXTRA_FLAGS := --disable-upx \
--enable-mode=64
DEB_CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
BUILT_USING_PACKAGES = libc-dev-bin libbz2-dev libgcrypt20-dev libgpgme-dev liblzo2-dev zlib1g-dev libzstd-dev liblz4-dev libargon2-dev libassuan-dev librsync-dev libext2fs-dev libcap-dev libnsl-dev libthreadar-dev libssl-dev libcurl4-openssl-dev
BUILT_USING=$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W $(BUILT_USING_PACKAGES))
override_dh_clean:
rm -rf build-*
rm -rf debian/tmp*
dh_clean
build-main/config.status: configure
dh_auto_configure --builddir=build-main -- $(DEB_CONFIGURE_EXTRA_FLAGS) --disable-dar-static --enable-python-binding
build-static/config.status: configure
dh_auto_configure --builddir=build-static -- \
$(DEB_CONFIGURE_EXTRA_FLAGS) --enable-dar-static --disable-shared --disable-libcurl-linking --disable-libssh-linking --disable-python-binding
build-main/.stamp-build: build-main/config.status
dh_auto_build --builddir=build-main
touch $@
build-static/.stamp-build: build-static/config.status
find . -name Makefile.in -exec sed -i 's/@LIBS@/@LIBS@ -lassuan/g' {} \;
dh_auto_build --builddir=build-static
touch $@
override_dh_auto_build: build-main/.stamp-build build-static/.stamp-build
override_dh_auto_configure:
# Don't do the normal steps here due to separate builds
override_dh_auto_test:
echo testing is no op
override_dh_auto_install:
dh_auto_install --builddir=build-static --destdir=debian/tmp-static
dh_auto_install --builddir=build-main
mv $(CURDIR)/debian/tmp/usr/share/dar/samples \
$(CURDIR)/debian/tmp/usr/share/examples
chmod a-x $(CURDIR)/debian/tmp/usr/share/examples/MyBackup.sh.tar.gz
mkdir -p $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages
mv $(CURDIR)/debian/tmp/usr/lib/*/python3/dist-packages/* \
$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/
cp -a $(CURDIR)/debian/tmp-static/usr/bin/*_static \
$(CURDIR)/debian/tmp/usr/bin/
cp $(CURDIR)/debian/tmp/usr/share/man/man1/dar.1 \
$(CURDIR)/debian/tmp/usr/share/man/man1/dar_static.1
override_dh_gencontrol:
dh_gencontrol
dh_gencontrol -pdar-static -- -VBuilt-Using="$(BUILT_USING)"
%:
dh $@ --with python3
.PHONY: override_dh_auto_configure override_dh_auto_test \
override_dh_auto_install override_dpkg-gencontrol
|