source: trunk/rules.deb.in@ 3

Last change on this file since 3 was 1, checked in by katerina, 19 years ago

Initial import

File size: 3.1 KB
RevLine 
[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# 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_0.html.tar ] && \
73 cd debian/tmp/usr/share/doc/@install_name@ && \
74 tar xf MANUAL-2_0.html.tar && mv MANUAL-2_0 manual.html && \
75 rm -f MANUAL-2_0.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/prerm.debhelper ] && \
93 cd debian && \
94 cat prerm.debhelper | \
95 sed 's%/etc/init.d/@install_name@ stop%/etc/init.d/@install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
96 mv prerm.tmp prerm.debhelper
97 # dh_installmanpages
98 dh_installchangelogs @top_srcdir@/docs/Changelog
99 dh_link
100 # dh_strip
101 dh_compress
102 dh_fixperms
103 dh_installdeb
104 dh_shlibdeps
105 dh_gencontrol
106 dh_md5sums
107 dh_builddeb
108
109
110define checkdir
111 test -f debian/rules
112endef
113
114binary: binary-indep binary-arch
115.PHONY: build clean binary-indep binary-arch binary install
116
Note: See TracBrowser for help on using the repository browser.