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
|
#!/usr/bin/make -f
# -*- makefile -*-
export DEB_BUILD_MAINT_OPTIONS = hardening=+pie
ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mips mipsel powerpc powerpcspe sh4))
export DEB_LDFLAGS_MAINT_APPEND=-latomic
endif
REALFILE = \
bin/ds-logpipe.py \
bin/logconv.pl \
share/man/man1/ds-logpipe.py.1 \
share/man/man1/logconv.pl.1 \
%:
dh $@ --with python3
override_dh_auto_clean:
dh_auto_clean
rm -f aclocal.m4 config.* ltmain.sh m4/libtool.m4 m4/lt*.m4
rm -f ldap/servers/snmp/ldap-agent.conf
rm -rf src/lib389/build src/lib389/lib389.egg-info
find src/lib389/ -name '__pycache__' -exec rm -rf '{}' ';'
rm -f src/lib389/man/*.8
override_dh_auto_configure:
dh_auto_configure -- \
--with-openldap \
--with-systemd \
--with-systemdsystemunitdir=/lib/systemd/system \
--with-systemdsystemconfdir=/etc/systemd/system \
--with-systemdgroupname=dirsrv.target \
--with-tmpfiles-d=/etc/tmpfiles.d \
--enable-autobind \
--enable-cmocka \
--enable-icu \
--enable-perl \
--enable-rust \
--enable-rust-offline
(cd debian/vendor && for i in `ls /usr/share/cargo/registry`; do \
ln -s /usr/share/cargo/registry/$$i .; done)
override_dh_auto_build:
(cd src/lib389 && python3 setup.py build)
dh_auto_build
override_dh_auto_install:
(cd src/lib389 && python3 setup.py install --install-layout=deb --root ../../debian/tmp)
dh_auto_install --max-parallel=1
override_dh_install:
# lets do the renaming here afterall, instead of in 389-ds-base.install
for file in $(REALFILE); do mv -f $(CURDIR)/debian/tmp/usr/$$file \
$(CURDIR)/debian/tmp/usr/`echo $$file | \
sed -s 's/\.pl//;s/\.py//'`; \
done
# purge .la files
find $(CURDIR)/debian/tmp -name "*.la" -type f -exec rm -f "{}" \;
mkdir -p $(CURDIR)/debian/tmp/etc/systemd/system/dirsrv.target.wants
# fix the manpage section, argparse-manpage hardcodes it as 1
sed -i "1s/\"1\"/\"8\"/" debian/tmp/usr/share/man/man8/dsconf.8
sed -i "1s/\"1\"/\"8\"/" debian/tmp/usr/share/man/man8/dscreate.8
sed -i "1s/\"1\"/\"8\"/" debian/tmp/usr/share/man/man8/dsctl.8
sed -i "1s/\"1\"/\"8\"/" debian/tmp/usr/share/man/man8/dsidm.8
# link to jemalloc
mkdir -p $(CURDIR)/debian/tmp/usr/lib/$(DEB_BUILD_MULTIARCH)/dirsrv/lib/
ln -s /usr/lib/$(DEB_BUILD_MULTIARCH)/libjemalloc.so.2 \
$(CURDIR)/debian/tmp/usr/lib/$(DEB_BUILD_MULTIARCH)/dirsrv/lib/
dh_install
override_dh_missing:
dh_missing --fail-missing
override_dh_installsystemd:
dh_installsystemd -p389-ds-base --no-enable dirsrv-snmp.service
override_dh_shlibdeps:
dh_shlibdeps -l"debian/389-ds-base/usr/lib/$(DEB_HOST_MULTIARCH)/dirsrv" -a
|