3 # debian/rules file for freeradius
9 tmp = $(shell pwd)/debian/tmp
13 mandir = $(exec_prefix)/share/man
14 libdir = $(exec_prefix)/lib/freeradius
15 logdir = /var/log/freeradius
16 pkgdocdir = $(exec_prefix)/share/doc/radiusd-freeradius
17 raddbdir = $(prefix)/etc/raddb
20 # Builds the binary package.
23 ./configure --prefix=$(prefix) --exec-prefix=$(exec_prefix) --libdir=$(libdir) --mandir=$(mandir) --with-logdir=$(logdir) --with-thread-pool --enable-ltdl-install=no
27 # Architecture independant files.
30 # Make a binary package (.deb file)
34 make install prefix=$(prefix) exec_prefix=$(exec_prefix) mandir=$(mandir) libdir=$(libdir) R=$(tmp)
35 # clean up install cruft. $$&@!%
36 rmdir $(tmp)/$(execprefix)/include
37 rm $(tmp)/$(execprefix)/usr/sbin/rc.radiusd
38 # fix install permissions
39 chmod 700 $(tmp)/$(raddbdir)
40 chmod 600 $(tmp)/$(raddbdir)/*
43 install -g root -m 644 CREDITS $(tmp)/$(pkgdocdir)/credits
44 find doc -type f -maxdepth 1 ! -path doc/ChangeLog -exec dh_installdocs {} \;
45 dh_installchangelogs doc/ChangeLog
48 install -g root -m 755 scripts/radiusd.cron.daily $(tmp)/$(prefix)/etc/cron.daily/freeradius
49 install -g root -m 755 scripts/radiusd.cron.monthly $(tmp)/$(prefix)/etc/cron.monthly/freeradius
50 install -g root -m 755 scripts/rc.radiusd $(tmp)/$(prefix)/etc/init.d/freeradius
51 # fix up conf file -- all of these should be commented on in README.Debian
52 cp $(tmp)/$(raddbdir)/radiusd.conf newconf
55 | sed -e '/^ example {/,/^ }/s/^/#deb#/' \
56 | sed -e '/^ sql .*{/,/^ }/s/^/#deb#/' \
57 | sed -e '/^ always .*{/,/^ }/s/^/#deb#/' \
58 | sed -e 's/^ # shadow =/ shadow =/' \
59 | sed -e 's/^group = nobody/group = nogroup/' \
60 > $(tmp)/$(raddbdir)/radiusd.conf
76 [ -f Make.inc ] && make distclean || true
77 rm -f build debian/{files,substvars} debian/*.debhelper
80 binary: binary-indep binary-arch
82 # for the maintainer only
84 @echo -n "sanity: checking for overzealous undocumented file... "
85 @find man/ -type f |grep \. |sed -e 's%man/man./%%' | { \
86 while read manpage; do \
87 grep $$manpage debian/undocumented | read filename && echo -n $$filename; \
93 @echo -n "sanity: making sure conffiles lists all raddb files... "
95 tree=`find raddb/ -type f |sed -e 's/\.in$$//' |grep -v CVS |grep -v /Makefile |sort |uniq`; \
96 debconf=`grep raddb debian/conffiles |sed -e 's%/etc/%%' |sort`; \
97 test "$$tree" = "$$debconf"; \
101 .PHONY: binary binary-arch binary-indep clean sanitycheck