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
|
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
# Security Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CPPFLAGS_MAINT_APPEND = -fPIC
export DEB_LDFLAGS_MAINT_APPEND = -fPIC
# Dummy folder for autotools scripts
LIBDIR=libbloom libcork libipset
override_dh_auto_clean:
# dh_auto_clean and dh_autoreconf complains if there're no these folders
# they're removed after dh_autoreconf
for libdir in ${LIBDIR}; do \
mkdir -p $$libdir; \
touch $$libdir/Makefile.in; \
done
dh_auto_clean
# dpkg-buildpackage complains these files from previous built
find -name Makefile -exec rm {} \;
rm -f config.h config.log config.status libtool shadowsocks-libev.pc stamp-h1
override_dh_autoreconf:
dh_autoreconf
rm -rf ${LIBDIR}
override_dh_auto_configure:
# Whether to have stack-protector is decided by dpkg-buildflags.
# So --disable-ssp here should be safe. See Bug#829498
dh_auto_configure -- \
--enable-shared \
--enable-system-shared-lib \
--disable-ssp
override_dh_install:
# remove libtool library
rm -f debian/tmp/usr/lib/*/*.la
dh_install
override_dh_missing:
dh_missing --fail-missing
%:
dh $@
|