source: trunk/rules.deb.in@ 285

Last change on this file since 285 was 209, checked in by katerina, 16 years ago

Fix problem building deb package (ticket #135).

File size: 3.8 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.
[209]14export DH_COMPAT=4
[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
[209]50 # $(MAKE) install install-boot DESTDIR=`pwd`/debian/tmp
51 $(MAKE) install install-boot DESTDIR=`pwd`/debian/@install_name@
[1]52
53 # However, remove the rc.d links
54 -rm -rf `pwd`/debian/tmp/etc/rc?.d
55
56 # install -m 755 encode `pwd`/debian/tmp/usr/bin/samhain_encode
57
58 # install -m 644 profiles/debianlinux_i386/samhainrc `pwd`/debian/tmp@myconffile@
59 # install -m 644 debian/samhain.logrotate `pwd`/debian/tmp/etc/logrotate.d/samhain
60
61# Build architecture-independent files here.
62binary-indep: build install
63# We have nothing to do by default.
64
65
66# Build architecture-dependent files here.
67binary-arch: build install
68# dh_testversion
69 dh_testdir
70 dh_testroot
71 dh_installdebconf
72 dh_installdocs
[209]73 [ -f debian/@install_name@/usr/share/doc/@install_name@/MANUAL-2_3.html.tar ] && \
74 cd debian/@install_name@/usr/share/doc/@install_name@ && \
[68]75 tar xf MANUAL-2_3.html.tar && mv MANUAL-2_3 manual.html && \
[209]76 rm -f MANUAL-2_3.html.tar && \
77 mv MANUAL-2_3.pdf manual.pdf
[1]78 dh_installexamples @top_srcdir@/scripts/example_pager.pl \
79 @top_srcdir@/scripts/example_sms.pl \
80 @top_srcdir@/scripts/concat.pl \
81 @top_srcdir@/scripts/samhain.logrotator \
82 @top_srcdir@/scripts/samhainadmin.pl \
83 @top_srcdir@/scripts/check_samhain.pl \
84 @top_srcdir@/yulerc.template \
85 @top_srcdir@/samhainrc.linux
86 dh_installmenu
87 dh_installinit -- defaults 19
[209]88 [ -f debian/@install_name@.postinst.debhelper ] && \
[1]89 cd debian && \
[209]90 cat @install_name@.postinst.debhelper | \
[1]91 sed 's%/etc/init.d/@install_name@ start%:%' > postinst.tmp && \
[209]92 mv postinst.tmp @install_name@.postinst.debhelper
93 [ -f debian/@install_name@.postinst.debhelper ] && \
[65]94 cd debian && \
[209]95 cat @install_name@.postinst.debhelper | \
[65]96 sed 's%invoke-rc.d @install_name@ start%:%' > postinst.tmp && \
[209]97 mv postinst.tmp @install_name@.postinst.debhelper
98 [ -f debian/@install_name@.prerm.debhelper ] && \
[1]99 cd debian && \
[209]100 cat @install_name@.prerm.debhelper | \
[1]101 sed 's%/etc/init.d/@install_name@ stop%/etc/init.d/@install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
[209]102 mv prerm.tmp @install_name@.prerm.debhelper
103 [ -f debian/@install_name@.prerm.debhelper ] && \
[65]104 cd debian && \
[209]105 cat @install_name@.prerm.debhelper | \
[65]106 sed 's%invoke-rc.d @install_name@ stop%invoke-rc.d @install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
[209]107 mv prerm.tmp @install_name@.prerm.debhelper
[1]108 # dh_installmanpages
109 dh_installchangelogs @top_srcdir@/docs/Changelog
110 dh_link
[79]111 dh_strip
[1]112 dh_compress
113 dh_fixperms
114 dh_installdeb
115 dh_shlibdeps
116 dh_gencontrol
117 dh_md5sums
118 dh_builddeb
119
120
121define checkdir
122 test -f debian/rules
123endef
124
125binary: binary-indep binary-arch
126.PHONY: build clean binary-indep binary-arch binary install
127
Note: See TracBrowser for help on using the repository browser.