source: branches/samhain-2_2-branch/rules.deb.in@ 438

Last change on this file since 438 was 65, checked in by rainer, 18 years ago

Fix some minor bugs.

File size: 3.5 KB
Line 
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# Uncomment this to turn on verbose mode.
11#export DH_VERBOSE=1
12
13# This is the debhelper compatability version to use.
14export DH_COMPAT=1
15
16package=@install_name@
17
18# CAVEAT: including the --enable-base= option is for packages to be
19# distributed INTERNALLY on your network, NOT for packages
20# to be distributed to THIRD PARTIES
21
22build: build-stamp
23build-stamp:
24 dh_testdir
25 @top_srcdir@/configure @mydefargs@
26 $(MAKE)
27 # echo '#!/bin/sh' > ./sstrip
28 # echo 'echo "*** SSTRIP DISABLED ***"' >> ./sstrip
29 touch build-stamp
30
31clean:
32 dh_testdir
33 dh_testroot
34 rm -f build-stamp
35 -[ -f Makefile ] && $(MAKE) distclean
36 dh_clean
37
38install: build
39 dh_testdir
40 dh_testroot
41 dh_clean -k
42 dh_installdirs
43
44 # Fix the permissions
45 #chmod o-rX `pwd`/debian/tmp/var/log/samhain \
46 # `pwd`/debian/tmp/var/run/samhain \
47 # `pwd`/debian/tmp/var/state/samhain \
48 # `pwd`/debian/tmp/etc/samhain
49
50 $(MAKE) install install-boot DESTDIR=`pwd`/debian/tmp
51
52 # However, remove the rc.d links
53 -rm -rf `pwd`/debian/tmp/etc/rc?.d
54
55 # install -m 755 encode `pwd`/debian/tmp/usr/bin/samhain_encode
56
57 # install -m 644 profiles/debianlinux_i386/samhainrc `pwd`/debian/tmp@myconffile@
58 # install -m 644 debian/samhain.logrotate `pwd`/debian/tmp/etc/logrotate.d/samhain
59
60# Build architecture-independent files here.
61binary-indep: build install
62# We have nothing to do by default.
63
64
65# Build architecture-dependent files here.
66binary-arch: build install
67# dh_testversion
68 dh_testdir
69 dh_testroot
70 dh_installdebconf
71 dh_installdocs
72 [ -f debian/tmp/usr/share/doc/@install_name@/MANUAL-2_2.html.tar ] && \
73 cd debian/tmp/usr/share/doc/@install_name@ && \
74 tar xf MANUAL-2_2.html.tar && mv MANUAL-2_2 manual.html && \
75 rm -f MANUAL-2_2.html.tar
76 dh_installexamples @top_srcdir@/scripts/example_pager.pl \
77 @top_srcdir@/scripts/example_sms.pl \
78 @top_srcdir@/scripts/report.pl \
79 @top_srcdir@/scripts/concat.pl \
80 @top_srcdir@/scripts/samhain.logrotator \
81 @top_srcdir@/scripts/samhainadmin.pl \
82 @top_srcdir@/scripts/check_samhain.pl \
83 @top_srcdir@/yulerc.template \
84 @top_srcdir@/samhainrc.linux
85 dh_installmenu
86 dh_installinit -- defaults 19
87 [ -f debian/postinst.debhelper ] && \
88 cd debian && \
89 cat postinst.debhelper | \
90 sed 's%/etc/init.d/@install_name@ start%:%' > postinst.tmp && \
91 mv postinst.tmp postinst.debhelper
92 [ -f debian/postinst.debhelper ] && \
93 cd debian && \
94 cat postinst.debhelper | \
95 sed 's%invoke-rc.d @install_name@ start%:%' > postinst.tmp && \
96 mv postinst.tmp postinst.debhelper
97 [ -f debian/prerm.debhelper ] && \
98 cd debian && \
99 cat prerm.debhelper | \
100 sed 's%/etc/init.d/@install_name@ stop%/etc/init.d/@install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
101 mv prerm.tmp prerm.debhelper
102 [ -f debian/prerm.debhelper ] && \
103 cd debian && \
104 cat prerm.debhelper | \
105 sed 's%invoke-rc.d @install_name@ stop%invoke-rc.d @install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
106 mv prerm.tmp prerm.debhelper
107 # dh_installmanpages
108 dh_installchangelogs @top_srcdir@/docs/Changelog
109 dh_link
110 # dh_strip
111 dh_compress
112 dh_fixperms
113 dh_installdeb
114 dh_shlibdeps
115 dh_gencontrol
116 dh_md5sums
117 dh_builddeb
118
119
120define checkdir
121 test -f debian/rules
122endef
123
124binary: binary-indep binary-arch
125.PHONY: build clean binary-indep binary-arch binary install
126
Note: See TracBrowser for help on using the repository browser.