[1] | 1 | #!/usr/bin/make -f
|
---|
| 2 | # Samhain debian/rules
|
---|
| 3 | # GNU copyright 20001 to 2003 by Javier Fernandez-Sanguino
|
---|
| 4 | # based on
|
---|
| 5 | # Sample debian/rules that uses debhelper.
|
---|
| 6 | # GNU copyright 1997 to 1999 by Joey Hess.
|
---|
| 7 | # Modified to use mydefargs by Rainer Wichmann.
|
---|
| 8 | #
|
---|
| 9 |
|
---|
| 10 |
|
---|
[549] | 11 | %:
|
---|
| 12 | dh $@ --with-autoreconf
|
---|
[1] | 13 |
|
---|
| 14 |
|
---|
[549] | 15 | override_dh_clean:
|
---|
| 16 | [ ! -f Makefile ] || $(MAKE) distclean
|
---|
| 17 | -rm -f samhainrc.install
|
---|
| 18 | -rm -f build-stamp build-server-stamp build-client-stamp
|
---|
| 19 | dh_clean
|
---|
[1] | 20 |
|
---|
[549] | 21 | override_dh_auto_configure:
|
---|
[1] | 22 | @top_srcdir@/configure @mydefargs@
|
---|
[549] | 23 |
|
---|
| 24 | override_dh_auto_build:
|
---|
| 25 | dh_auto_build
|
---|
[425] | 26 | if ! test x$(PASSWORD) = x; then \
|
---|
| 27 | if test -f samhain_setpwd; then \
|
---|
| 28 | ./samhain_setpwd samhain new $(PASSWORD); \
|
---|
| 29 | rm samhain; \
|
---|
| 30 | mv samhain.new samhain; \
|
---|
| 31 | fi; \
|
---|
| 32 | fi
|
---|
[1] | 33 |
|
---|
[549] | 34 | override_dh_auto_install:
|
---|
| 35 | $(MAKE) install-light install-boot DESTDIR=`pwd`/debian/@install_name@
|
---|
[1] | 36 |
|
---|
| 37 |
|
---|
[549] | 38 | override_dh_install:
|
---|
[1] | 39 | # However, remove the rc.d links
|
---|
[549] | 40 | -rm -rf `pwd`/debian/@install_name@/etc/rc?.d
|
---|
[1] | 41 | # Remove samhain_stealth for light install
|
---|
[549] | 42 | -rm -f `pwd`/debian/@install_name@/@sbindir@/@install_name@_stealth
|
---|
| 43 | # remove samhain_setpwd if not needed
|
---|
| 44 | if ! test x$(PASSWORD) = x; then \
|
---|
| 45 | rm -f `pwd`/debian/@install_name@/@sbindir@/@install_name@_setpwd; \
|
---|
| 46 | fi
|
---|
[1] | 47 |
|
---|
[549] | 48 | override_dh_installdocs:
|
---|
| 49 | # do nothing
|
---|
[1] | 50 |
|
---|
[549] | 51 | override_dh_installchangelogs:
|
---|
| 52 | # do nothing
|
---|
[1] | 53 |
|
---|
[549] | 54 | override_dh_installman:
|
---|
| 55 | # do nothing
|
---|
[1] | 56 |
|
---|
[549] | 57 | override_dh_installinit:
|
---|
| 58 | dh_installinit --no-start -- defaults 19
|
---|
[1] | 59 |
|
---|
[549] | 60 | override_dh_usrlocal:
|
---|
| 61 | # do nothing
|
---|
[1] | 62 |
|
---|
[549] | 63 | override_dh_fixperms:
|
---|
| 64 | dh_fixperms
|
---|
| 65 | # Fix the permissions
|
---|
| 66 | chmod o-rX `pwd`/debian/@install_name@/@mydataroot@ \
|
---|
[566] | 67 | `pwd`/debian/@install_name@/@myrpmconffile@
|
---|
[549] | 68 | if ! test "x@mylogdir@" = "x/var/log"; then \
|
---|
| 69 | chmod o-rX `pwd`/debian/@install_name@/@mylogdir@; \
|
---|
| 70 | fi
|
---|
[1] | 71 |
|
---|
[549] | 72 |
|
---|