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
|
#!/usr/bin/make -f
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CPPFLAGS+=$(shell pkg-config --cflags nss)
ifeq (linux,$(DEB_HOST_ARCH_OS))
configure_flags +=--with-cap --with-selinux
endif
configure_flags += \
--datadir=/usr/share \
--with-external-db \
--with-lua \
--with-debian \
--with-vendor=debian \
--enable-shared \
--enable-python \
LDFLAGS="$(LDFLAGS) -Wl,--as-needed" \
CPPFLAGS="$(CPPFLAGS)"
override_dh_auto_configure:
dh_auto_configure -- $(configure_flags)
cd python && ln -s ../debian
override_dh_auto_build:
dh_auto_build
cd python && dh_auto_build --buildsystem=pybuild
override_dh_auto_install:
dh_auto_install
# Remove Python, we use distutils built modules
rm -rf debian/tmp/usr/lib/python*
cd python && dh_auto_install --buildsystem=pybuild
# Kill all the junk this installs.
rm -f debian/tmp/usr/lib/rpm/config.guess \
debian/tmp/usr/lib/rpm/config.sub \
debian/tmp/usr/lib/*/*.la \
debian/tmp/usr/lib/*/rpm-plugins/*.la \
debian/tmp/usr/lib/rpm/rpm.log
# Fix permissions
chmod +x debian/tmp/usr/lib/rpm/rpm.daily
override_dh_strip:
dh_strip --ddeb-migration='librpm-dbg (<< 4.12.0.1+dfsg1-5~)'
%:
dh $@ --fail-missing --with python2,python3,autoreconf
|