summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 9999af1b2d731af75394eaf80a0e75c4101b009e (plain)
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
#!/usr/bin/make -f

LDFLAGS	:= -Wl,-z,defs
CFLAGS	:= -g 

ifeq (,$(findstring noopt, ${DEB_BUILD_OPTIONS}))
CFLAGS += -O2
endif

DEB_HOST_GNU_TYPE	:= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

LC_COLLATE=C
export LC_COLLATE

export QUILT_PATCH_DIR = debian/patches-applied

d = $(CURDIR)/debian
dl = $(d)/local

%:
	dh $@ --with quilt

override_dh_auto_build:
	# Compile everything else
	dh_auto_build
	pod2man --section 8 --release="Debian GNU/Linux" $(dl)/pam_getenv >$(dl)/pam_getenv.8

override_dh_auto_configure:
	dh_auto_configure -- --enable-static --enable-shared \
		--libdir=/lib --sbindir=/sbin --disable-audit \
		CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"

override_dh_compress:
	dh_compress -Xhtml

override_dh_install:
	dh_install -plibpam-modules -Xpam_cracklib
	dh_install -Nlibpam-modules

override_dh_installman:
	dh_installman
	rm -f $(d)/libpam-modules/usr/share/man/man5/pam.conf.5

override_dh_fixperms:
	dh_fixperms
	chgrp shadow $(d)/libpam-modules/sbin/unix_chkpwd
	chmod 02755 $(d)/libpam-modules/sbin/unix_chkpwd

override_dh_makeshlibs:
	dh_makeshlibs -V "libpam0g (>= 1.1.0)"