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 11%: 12 dh $@ --with-autoreconf 13 14 15override_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 20 21override_dh_auto_configure: 22 @top_srcdir@/configure @mydefargs@ 23 24override_dh_auto_build: 25 dh_auto_build 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 33 34override_dh_auto_install: 35 $(MAKE) install-light install-boot DESTDIR=`pwd`/debian/@install_name@ 36 37 38override_dh_install: 39 # However, remove the rc.d links 40 -rm -rf `pwd`/debian/@install_name@/etc/rc?.d 41 # Remove samhain_stealth for light install 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 47 48override_dh_installdocs: 49 # do nothing 50 51override_dh_installchangelogs: 52 # do nothing 53 54override_dh_installman: 55 # do nothing 56 57override_dh_installinit: 58 dh_installinit --no-start -- defaults 19 59 60override_dh_usrlocal: 61 # do nothing 62 63override_dh_fixperms: 64 dh_fixperms 65 # Fix the permissions 66 chmod o-rX `pwd`/debian/@install_name@/@mydataroot@ \ 67 `pwd`/debian/@install_name@/@myconffile@ 68 if ! test "x@mylogdir@" = "x/var/log"; then \ 69 chmod o-rX `pwd`/debian/@install_name@/@mylogdir@; \ 70 fi 71 72 73