Changeset 549 for trunk/rules.deb.in


Ignore:
Timestamp:
May 9, 2019, 10:43:55 PM (5 years ago)
Author:
katerina
Message:

Fix for ticket #440 (obsolete sstrip utility) and #441 (make deb broken).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/rules.deb.in

    r531 r549  
    88#
    99
    10 # Uncomment this to turn on verbose mode.
    11 #export DH_VERBOSE=1
     10%:
     11        dh $@ --with-autoreconf
    1212
    13 # This is the debhelper compatability version to use.
    14 export DH_COMPAT=9
     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
    1518
    16 package=@install_name@
     19override_dh_auto_configure:
     20        @top_srcdir@/configure @mydefargs@
    1721
    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 
    22 build: build-stamp
    23 build-stamp:
    24         dh_testdir
    25         @top_srcdir@/configure @mydefargs@
    26         $(MAKE)
    27         echo '#!/bin/sh' > ./sstrip
    28         echo 'echo "*** SSTRIP DISABLED ***"' >> ./sstrip
     22override_dh_auto_build:
     23        dh_auto_build
    2924        if ! test x$(PASSWORD) = x; then \
    3025                if test -f samhain_setpwd; then \
     
    3429                fi; \
    3530        fi
    36         touch build-stamp
    3731
    38 clean:
    39         dh_testdir
    40         dh_testroot
    41         rm -f build-stamp
    42         -[ -f Makefile ] && $(MAKE) distclean
    43         dh_clean
    44 
    45 install: build
    46         dh_testdir
    47         dh_testroot
    48         dh_clean -k
    49         dh_installdirs
    50 
    51         # Fix the permissions
    52         #chmod o-rX `pwd`/debian/tmp/var/log/samhain \
    53         #       `pwd`/debian/tmp/var/run/samhain \
    54         #       `pwd`/debian/tmp/var/lib/samhain \
    55         #       `pwd`/debian/tmp/etc/samhain
    56 
    57         # $(MAKE) install install-boot DESTDIR=`pwd`/debian/tmp
     32override_dh_auto_install:
    5833        $(MAKE) install install-boot DESTDIR=`pwd`/debian/@install_name@
    5934
     35override_dh_install:
    6036        # However, remove the rc.d links
    61         -rm -rf `pwd`/debian/tmp/etc/rc?.d
     37        -rm -rf `pwd`/debian/@install_name@/etc/rc?.d
    6238
    63         # install -m 755 encode `pwd`/debian/tmp/usr/bin/samhain_encode
    64 
    65         # install -m 644 profiles/debianlinux_i386/samhainrc `pwd`/debian/tmp@myconffile@
    66         # install -m 644 debian/samhain.logrotate `pwd`/debian/tmp/etc/logrotate.d/samhain
    67 
    68 # Build architecture-independent files here.
    69 binary-indep: build install
    70 # We have nothing to do by default.
    71 
    72 
    73 # Build architecture-dependent files here.
    74 binary-arch: build install
    75 #       dh_testversion
    76         dh_testdir
    77         dh_testroot
    78         dh_installdebconf       
    79         dh_installdocs
     39override_dh_installdocs:
     40        dh_installdocs
    8041        [ -f debian/@install_name@/usr/share/doc/@install_name@/MANUAL-2_4.html.tar ] && \
    8142                cd debian/@install_name@/usr/share/doc/@install_name@ && \
    8243                tar xf MANUAL-2_4.html.tar && mv MANUAL-2_4 manual.html && \
    83                 rm -f MANUAL-2_4.html.tar && \
     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@ && \
    8447                mv MANUAL-2_4.pdf manual.pdf
    85         dh_installexamples @top_srcdir@/scripts/example_pager.pl \
    86                 @top_srcdir@/scripts/example_sms.pl \
    87                 @top_srcdir@/scripts/concat.pl \
    88                 @top_srcdir@/scripts/samhain.logrotator \
    89                 @top_srcdir@/scripts/samhainadmin.pl \
    90                 @top_srcdir@/scripts/check_samhain.pl \
    91                 @top_srcdir@/yulerc.template \
    92                 @top_srcdir@/samhainrc.linux
    93         dh_installmenu
    94         dh_installinit -- defaults 19
    95         [ -f debian/@install_name@.postinst.debhelper ] && \
    96                 cd debian && \
    97                 cat @install_name@.postinst.debhelper | \
    98                     sed 's%/etc/init.d/@install_name@ start%:%' > postinst.tmp && \
    99                     mv postinst.tmp @install_name@.postinst.debhelper
    100         [ -f debian/@install_name@.postinst.debhelper ] && \
    101                 cd debian && \
    102                 cat @install_name@.postinst.debhelper | \
    103                     sed 's%invoke-rc.d @install_name@ start%:%' > postinst.tmp && \
    104                     mv postinst.tmp @install_name@.postinst.debhelper
    105         [ -f debian/@install_name@.prerm.debhelper ] && \
    106                 cd debian && \
    107                 cat @install_name@.prerm.debhelper | \
    108                     sed 's%/etc/init.d/@install_name@ stop%/etc/init.d/@install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
    109                     mv prerm.tmp @install_name@.prerm.debhelper
    110         [ -f debian/@install_name@.prerm.debhelper ] && \
    111                 cd debian && \
    112                 cat @install_name@.prerm.debhelper | \
    113                     sed 's%invoke-rc.d @install_name@ stop%invoke-rc.d @install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
    114                     mv prerm.tmp @install_name@.prerm.debhelper
    115         # dh_installmanpages
    116         dh_installchangelogs @top_srcdir@/docs/Changelog
    117         dh_link
    118         dh_strip
    119         dh_compress
     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:
    12059        dh_fixperms
    121         dh_installdeb
    122         dh_shlibdeps
    123         dh_gencontrol
    124         dh_md5sums
    125         dh_builddeb
     60        # Fix the permissions
     61        chmod o-rX `pwd`/debian/@install_name@/@mydataroot@ \
     62                `pwd`/debian/@install_name@/@myconffile@
     63        if ! test "x@mylogdir@" = "x/var/log"; then \
     64                chmod o-rX `pwd`/debian/@install_name@/@mylogdir@; \
     65        fi
    12666
    127 
    128 define checkdir
    129         test -f debian/rules
    130 endef
    131 
    132 binary: binary-indep binary-arch
    133 .PHONY: build clean binary-indep binary-arch binary install
    134 
Note: See TracChangeset for help on using the changeset viewer.