summaryrefslogtreecommitdiffstats
path: root/rules.deb-light.in
blob: 044aee628fdf01a1c9c6a5c0a2daf676eec4050c (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/make -f
# Samhain debian/rules 
# GNU copyright 20001 to 2003 by Javier Fernandez-Sanguino
# based on
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Modified to use mydefargs by Rainer Wichmann.
#


%:
	dh $@ --with-autoreconf


override_dh_clean:
	[ ! -f Makefile ] || $(MAKE) distclean
	-rm -f samhainrc.install
	-rm -f build-stamp build-server-stamp build-client-stamp
	dh_clean

override_dh_auto_configure:
	@top_srcdir@/configure @mydefargs@

override_dh_auto_build:
	dh_auto_build
	if ! test x$(PASSWORD) = x; then \
		if test -f samhain_setpwd; then \
			./samhain_setpwd samhain new $(PASSWORD); \
			rm samhain; \
			mv samhain.new samhain; \
		fi; \
	fi

override_dh_auto_install:
	$(MAKE) install-light install-boot DESTDIR=`pwd`/debian/@install_name@


override_dh_install:
	# However, remove the rc.d links
	-rm -rf `pwd`/debian/@install_name@/etc/rc?.d
	# Remove samhain_stealth for light install
	-rm -f `pwd`/debian/@install_name@/@sbindir@/@install_name@_stealth
	# remove samhain_setpwd if not needed
	if ! test x$(PASSWORD) = x; then \
		rm -f `pwd`/debian/@install_name@/@sbindir@/@install_name@_setpwd; \
	fi

override_dh_installdocs:
	# do nothing

override_dh_installchangelogs:
	# do nothing

override_dh_installman:
	# do nothing

override_dh_installinit:
	dh_installinit --no-start -- defaults 19

override_dh_usrlocal:
	# do nothing

override_dh_fixperms:
	dh_fixperms
	# Fix the permissions
	chmod o-rX `pwd`/debian/@install_name@/@mydataroot@ \
		`pwd`/debian/@install_name@/@myrpmconffile@
	if ! test "x@mylogdir@" = "x/var/log"; then \
		chmod o-rX `pwd`/debian/@install_name@/@mylogdir@; \
	fi