source: trunk/rules.deb.in

Last change on this file was 566, checked in by katerina, 3 months ago

Fix for ticket #457 (make deb fails for some config file paths).

File size: 1.8 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%:
11        dh $@ --with-autoreconf
12
13override_dh_clean:
14        [ ! -f Makefile ] || $(MAKE) distclean
15        -rm -f samhainrc.install
16        -rm -f build-stamp build-server-stamp build-client-stamp
17        dh_clean
18
19override_dh_auto_configure:
20        @top_srcdir@/configure @mydefargs@
21
22override_dh_auto_build:
23        dh_auto_build
24        if ! test x$(PASSWORD) = x; then \
25                if test -f samhain_setpwd; then \
26                        ./samhain_setpwd samhain new $(PASSWORD); \
27                        rm samhain; \
28                        mv samhain.new samhain; \
29                fi; \
30        fi
31
32override_dh_auto_install:
33        $(MAKE) install install-boot DESTDIR=`pwd`/debian/@install_name@
34
35override_dh_install:
36        # However, remove the rc.d links
37        -rm -rf `pwd`/debian/@install_name@/etc/rc?.d
38
39override_dh_installdocs:
40        dh_installdocs
41        [ -f debian/@install_name@/usr/share/doc/@install_name@/MANUAL-2_4.html.tar ] && \
42                cd debian/@install_name@/usr/share/doc/@install_name@ && \
43                tar xf MANUAL-2_4.html.tar && mv MANUAL-2_4 manual.html && \
44                rm -f MANUAL-2_4.html.tar
45        [ -f debian/@install_name@/usr/share/doc/@install_name@/MANUAL-2_4.pdf ] && \
46                cd debian/@install_name@/usr/share/doc/@install_name@ && \
47                mv MANUAL-2_4.pdf manual.pdf
48
49override_dh_installchangelogs:
50        dh_installchangelogs docs/Changelog
51
52override_dh_installinit:
53        dh_installinit --no-start -- defaults 19
54
55override_dh_usrlocal:
56        # do nothing
57
58override_dh_fixperms:
59        dh_fixperms
60        # Fix the permissions
61        chmod o-rX `pwd`/debian/@install_name@/@mydataroot@ \
62                `pwd`/debian/@install_name@/@myrpmconffile@
63        if ! test "x@mylogdir@" = "x/var/log"; then \
64                chmod o-rX `pwd`/debian/@install_name@/@mylogdir@; \
65        fi
66
Note: See TracBrowser for help on using the repository browser.