source: trunk/rules.deb.in@ 115

Last change on this file since 115 was 79, checked in by rainer, 18 years ago

Fixes ticket #42 (timeout in samhainctl) and ticket #44 (broken 'make deb' target).

File size: 3.5 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)
[79]27 echo '#!/bin/sh' > ./sstrip
28 echo 'echo "*** SSTRIP DISABLED ***"' >> ./sstrip
[1]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
[68]72 [ -f debian/tmp/usr/share/doc/@install_name@/MANUAL-2_3.html.tar ] && \
[1]73 cd debian/tmp/usr/share/doc/@install_name@ && \
[68]74 tar xf MANUAL-2_3.html.tar && mv MANUAL-2_3 manual.html && \
75 rm -f MANUAL-2_3.html.tar
[1]76 dh_installexamples @top_srcdir@/scripts/example_pager.pl \
77 @top_srcdir@/scripts/example_sms.pl \
78 @top_srcdir@/scripts/concat.pl \
79 @top_srcdir@/scripts/samhain.logrotator \
80 @top_srcdir@/scripts/samhainadmin.pl \
81 @top_srcdir@/scripts/check_samhain.pl \
82 @top_srcdir@/yulerc.template \
83 @top_srcdir@/samhainrc.linux
84 dh_installmenu
85 dh_installinit -- defaults 19
86 [ -f debian/postinst.debhelper ] && \
87 cd debian && \
88 cat postinst.debhelper | \
89 sed 's%/etc/init.d/@install_name@ start%:%' > postinst.tmp && \
90 mv postinst.tmp postinst.debhelper
[65]91 [ -f debian/postinst.debhelper ] && \
92 cd debian && \
93 cat postinst.debhelper | \
94 sed 's%invoke-rc.d @install_name@ start%:%' > postinst.tmp && \
95 mv postinst.tmp postinst.debhelper
[1]96 [ -f debian/prerm.debhelper ] && \
97 cd debian && \
98 cat prerm.debhelper | \
99 sed 's%/etc/init.d/@install_name@ stop%/etc/init.d/@install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
100 mv prerm.tmp prerm.debhelper
[65]101 [ -f debian/prerm.debhelper ] && \
102 cd debian && \
103 cat prerm.debhelper | \
104 sed 's%invoke-rc.d @install_name@ stop%invoke-rc.d @install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
105 mv prerm.tmp prerm.debhelper
[1]106 # dh_installmanpages
107 dh_installchangelogs @top_srcdir@/docs/Changelog
108 dh_link
[79]109 dh_strip
[1]110 dh_compress
111 dh_fixperms
112 dh_installdeb
113 dh_shlibdeps
114 dh_gencontrol
115 dh_md5sums
116 dh_builddeb
117
118
119define checkdir
120 test -f debian/rules
121endef
122
123binary: binary-indep binary-arch
124.PHONY: build clean binary-indep binary-arch binary install
125
Note: See TracBrowser for help on using the repository browser.