File: rules

package info (click to toggle)
389-ds-base 1.4.4.11-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 43,760 kB
  • sloc: ansic: 285,792; python: 87,287; javascript: 61,001; cpp: 10,261; perl: 2,850; makefile: 2,056; sh: 910; yacc: 806; xml: 379; lex: 366; java: 50
file content (76 lines) | stat: -rwxr-xr-x 2,240 bytes parent folder | download
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
#!/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 --builddir build/

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

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

	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