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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
UPSTREAM_VERSION = $(shell dpkg-parsechangelog -SVersion | egrep -o '^[0-9.]+')
export HOME=$(shell echo $$PWD"/fakehome")
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS+=$(CPPFLAGS) -O3
CXXFLAGS+=$(CPPFLAGS) -O3
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifneq (,$(filter mips mipsel,$(DEB_BUILD_ARCH)))
export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS | sed 's/-O[1-9]//') -O1 -mxgot
endif
ifneq (,$(filter armhf mips kfreebsd%,$(DEB_BUILD_ARCH)))
$(info $$DEB_BUILD_OPTIONS was [${DEB_BUILD_OPTIONS}])
TDBO := $(DEB_BUILD_OPTIONS)
export DEB_BUILD_OPTIONS=parallel=1,$(filter $(TDBO), parallel)
endif
$(info $$DEB_BUILD_OPTIONS is [${DEB_BUILD_OPTIONS}])
ifneq (,$(filter kfreebsd%,$(DEB_BUILD_ARCH)))
export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS | sed 's/-O[1-9]//') -O1
endif
pkgapps=seqan-apps
pkgdev=libseqan2-dev
%:
dh $@ --parallel
override_dh_auto_configure-arch:
dh_auto_configure -- -DSEQAN_BUILD_SYSTEM=SEQAN_RELEASE_APPS -DSEQAN_STATIC_APPS=False
override_dh_auto_configure-indep: ;
override_dh_auto_build-arch:
dh_auto_build --arch
override_dh_auto_build-indep:
sed -e "s#@CMAKE_INSTALL_PREFIX@#/usr#g" \
-e "s/@SEQAN_VERSION_STRING@/$(UPSTREAM_VERSION)/g" \
-e "s/@CMAKE_PROJECT_NAME@/seqan/g" \
util/pkgconfig/seqan.pc.in > seqan-2.pc
override_dh_install:
dh_install
find $(CURDIR)/debian/$(pkgapps) -type f -name LICENSE -delete || /bin/true
if [ -d $(CURDIR)/debian/$(pkgdev) ] ; then \
find $(CURDIR)/debian/$(pkgdev) -type f -name LICENSE -delete ; \
find $(CURDIR)/debian/$(pkgdev) -type f -name "*.pyc" -delete ; \
fi
override_dh_auto_clean:
dh_auto_clean
find . -type f -name "*.pyc" -delete
if [ -d orig ] ; then \
for header in `find orig -name "*generated_forwards.h"` ; do \
mv $${header} `echo $$header | sed 's?orig/??'` ; \
done ; \
fi
rm -rf orig seqan-2.pc
override_dh_installman:
dh_link
$(CURDIR)/debian/generate_manpages
dh_installman
override_dh_link-arch:
dh_link
find $(CURDIR)/debian/$(pkgapps)/usr/bin -type l -xtype l -delete
override_dh_fixperms-indep:
dh_fixperms
for bin in `ls $(CURDIR)/debian/$(pkgapps)/usr/lib/seqan/bin/*.sh` ; do \
chmod +x $(CURDIR)/debian/$(pkgapps)/usr/lib/seqan/bin/`basename $${bin}` ; \
done
find $(CURDIR)/debian/$(pkgdev)/usr/share/cmake -type f -exec chmod -x {} \;
override_dh_auto_test:
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 kfreebsd-amd64))
dh_auto_test || true
else
echo "Do not run test suite when building on architecture $(DEB_HOST_ARCH)"
endif
|