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
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DH_VERBOSE=1
include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk
MULTIOPT_ARCHS = amd64 kfreebsd-amd64
ifneq (,$(findstring $(DEB_HOST_ARCH),$(MULTIOPT_ARCHS)))
ENABLE_MULTIOPT="-DLAMBDA_MULTIOPT_BUILD=1"
else
ENABLE_MULTIOPT="-DLAMBDA_MULTIOPT_BUILD=0"
endif
%:
dh $@ --builddirectory=build
override_dh_installman:
sed -i -e 's@\(defaults to working directory\.\).*@\1@g' ./debian/lambda-align2/usr/share/man/man1/*.1
sed -i -e 's@\(number of threads to run concurrently\).*@\1. Default: autodetected.@g' ./debian/lambda-align2/usr/share/man/man1/*.1
sed -i 's/LAMBDA2 MKINDEXN/LAMBDA2_MKINDEXN/' ./debian/lambda-align2/usr/share/man/man1/lambda2-mkindexn.1
sed -i 's/^lambda2 mkindexn /lambda2_mkindexn /' ./debian/lambda-align2/usr/share/man/man1/lambda2-mkindexn.1
sed -i 's/LAMBDA2 MKINDEXP/LAMBDA2_MKINDEXP/' ./debian/lambda-align2/usr/share/man/man1/lambda2-mkindexp.1
sed -i 's/^lambda2 mkindexp /lambda2_mkindexp /' ./debian/lambda-align2/usr/share/man/man1/lambda2-mkindexp.1
sed -i 's/LAMBDA2 SEARCHN/LAMBDA2_SEARCHN/' ./debian/lambda-align2/usr/share/man/man1/lambda2-searchn.1
sed -i 's/^lambda2 searchn /lambda2_searchn /' ./debian/lambda-align2/usr/share/man/man1/lambda2-searchn.1
sed -i 's/LAMBDA2 SEARCHP/LAMBDA2_SEARCHP/' ./debian/lambda-align2/usr/share/man/man1/lambda2-searchp.1
sed -i 's/^lambda2 searchp /lambda2_searchp /' ./debian/lambda-align2/usr/share/man/man1/lambda2-searchp.1
dh_installman
override_dh_install:
dh_install
find debian -name "LICENSE*.rst" -delete
override_dh_auto_configure:
dh_auto_configure -- \
-DLAMBDA_NATIVE_BUILD=OFF \
-DLAMBDA_MMAPPED_DB=OFF \
-DCMAKE_BUILD_TYPE=Release \
$(ENABLE_MULTIOPT)
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
#for md5 in debian/*.md5sums; do gzip --keep $${md5}; done
#cp --backup debian/*md5sums.gz tests/
#cd build/tests && ctest . -I 1,10
endif
override_dh_auto_clean:
if ls tests/*~ 1> /dev/null 2>&1; then \
for backup in tests/*~; do mv $${backup} $${backup%\~}; done; \
fi
dh_auto_clean
override_dh_dwz:
# pass
|