summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 0a3bee0b69f0a7586122d2635cdc45b7fedfcef8 (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
#!/usr/bin/make -f

CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
# -Wnostrict-aliasing for md5.c
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
PAM_CONF_FILE=/etc/pam_radius_auth.conf
CFLAGS+=-g3 -Wno-strict-aliasing -DCONF_FILE=\"${PAM_CONF_FILE}\"

ifeq ($(DEB_HOST_GNU_CPU),(hppa|m68k|mips|powerpc|s390|sparc|sparc64|sheb))
	CFLAGS += -DHIGHFIRST
endif
export CFLAGS

%:
	dh $@ --with autoreconf

# all the installing is here, not in Makefile.
# The configuration file with the share secrets needs to be 600
override_dh_install:
	dh_install -v --sourcedir=. --package=libpam-radius-auth
	dh_install -v --sourcedir=.  --package=radius-shell
	chmod 750 debian/*/sbin/radius_shell

override_dh_fixperms:
	dh_fixperms --exclude ${PAM_CONF_FILE}

override_dh_installchangelogs:
	dh_installchangelogs Changelog