File: rules

package info (click to toggle)
389-admin 1.1.35-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,796 kB
  • ctags: 4,149
  • sloc: ansic: 21,983; sh: 12,236; cpp: 1,451; perl: 571; makefile: 537
file content (51 lines) | stat: -rwxr-xr-x 1,466 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
#!/usr/bin/make -f
# -*- makefile -*-

DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

ifeq (64,$(DEB_HOST_ARCH_BITS))
	export USE_64=1
else
	# fixes build on i386
	CPPFLAGS=-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
endif

LDFLAGS += -L/usr/lib/$(DEB_HOST_MULTIARCH)/nss

override_dh_auto_configure:
	dh_auto_configure -- \
		--disable-rpath \
		--with-openldap \
		--with-httpd=/usr/sbin/apache2 \
		--with-initddir=/etc/init.d \
		--with-apxs=/usr/bin/apxs2

override_dh_auto_install:
	dh_auto_install --destdir=$(CURDIR)/debian/tmp

override_dh_install:
	# purge .la files
	find $(CURDIR)/debian/tmp -name "*.la" -type f -exec rm -f "{}" \;

	# rename the binaries & manpages, don't need wrappers
	rename 's,.pl$$,,' $(CURDIR)/debian/tmp/usr/sbin/*.pl
	rename 's,.pl,,' $(CURDIR)/debian/tmp/usr/share/man/man8/*.pl.8

	chmod -x $(CURDIR)/debian/tmp/etc/default/* \
		$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/dirsrv/perl/*
	dh_install

override_dh_link:
	sed -e"s/@MULTIARCH@/$(DEB_HOST_MULTIARCH)/g" \
		debian/libds-admin-serv0.links.in > debian/libds-admin-serv0.links
	dh_link

override_dh_installinit:
	dh_installinit --name dirsrv-admin -- defaults 15 85

override_dh_shlibdeps:
	dh_shlibdeps -l"debian/389-admin/usr/lib/$(DEB_HOST_MULTIARCH)/:debian/389-admin/usr/lib/$(DEB_HOST_MULTIARCH)/dirsrv"

%:
	dh $@ --with quilt,autoreconf --builddir build/