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-light.in

    r531 r549  
    88#
    99
    10 # Uncomment this to turn on verbose mode.
    11 #export DH_VERBOSE=1
    1210
    13 # This is the debhelper compatability version to use.
    14 export DH_COMPAT=9
     11%:
     12        dh $@ --with-autoreconf
    1513
    16 package=@install_name@
    1714
    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
     15override_dh_clean:
     16        [ ! -f Makefile ] || $(MAKE) distclean
     17        -rm -f samhainrc.install
     18        -rm -f build-stamp build-server-stamp build-client-stamp
     19        dh_clean
    2120
    22 build: build-stamp
    23 build-stamp:
    24         dh_testdir
     21override_dh_auto_configure:
    2522        @top_srcdir@/configure @mydefargs@
    26         $(MAKE)
    27         echo '#!/bin/sh' > ./sstrip
    28         echo 'echo "*** SSTRIP DISABLED ***"' >> ./sstrip
     23
     24override_dh_auto_build:
     25        dh_auto_build
    2926        if ! test x$(PASSWORD) = x; then \
    3027                if test -f samhain_setpwd; then \
     
    3431                fi; \
    3532        fi
    36         touch build-stamp
    3733
    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 
     34override_dh_auto_install:
    5135        $(MAKE) install-light install-boot DESTDIR=`pwd`/debian/@install_name@
    52         # $(MAKE) install-light install-boot DESTDIR=`pwd`/debian/tmp
    53 
    54         # However, remove the rc.d links
    55         -rm -rf `pwd`/debian/tmp/etc/rc?.d
    56 
    57         # Remove samhain_stealth for light install
    58         -rm -f `pwd`/debian/tmp/@sbindir@/@install_name@_stealth
    59 
    60 # Build architecture-independent files here.
    61 binary-indep: build install
    62 # We have nothing to do by default.
    6336
    6437
    65 # Build architecture-dependent files here.
    66 binary-arch: build install
    67 #       dh_testversion
    68         dh_testdir
    69         dh_testroot
    70         dh_installdebconf       
    71         # dh_installdocs
    72         dh_installmenu
    73         dh_installinit -- defaults 19
    74         [ -f debian/@install_name@.postinst.debhelper ] && \
    75                 cd debian && \
    76                 cat @install_name@.postinst.debhelper | \
    77                     sed 's%/etc/init.d/@install_name@ start%:%' > postinst.tmp && \
    78                     mv postinst.tmp @install_name@.postinst.debhelper
    79         [ -f debian/@install_name@.postinst.debhelper ] && \
    80                 cd debian && \
    81                 cat @install_name@.postinst.debhelper | \
    82                     sed 's%invoke-rc.d @install_name@ start%:%' > postinst.tmp && \
    83                     mv postinst.tmp @install_name@.postinst.debhelper
    84         [ -f debian/@install_name@.prerm.debhelper ] && \
    85                 cd debian && \
    86                 cat @install_name@.prerm.debhelper | \
    87                     sed 's%/etc/init.d/@install_name@ stop%/etc/init.d/@install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
    88                     mv prerm.tmp @install_name@.prerm.debhelper
    89         [ -f debian/@install_name@.prerm.debhelper ] && \
    90                 cd debian && \
    91                 cat @install_name@.prerm.debhelper | \
    92                     sed 's%invoke-rc.d @install_name@ stop%invoke-rc.d @install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
    93                     mv prerm.tmp @install_name@.prerm.debhelper
    94         # dh_installmanpages
    95         # dh_installchangelogs @top_srcdir@/docs/Changelog
    96         dh_link
    97         dh_strip
    98         dh_compress
     38override_dh_install:
     39        # However, remove the rc.d links
     40        -rm -rf `pwd`/debian/@install_name@/etc/rc?.d
     41        # Remove samhain_stealth for light install
     42        -rm -f `pwd`/debian/@install_name@/@sbindir@/@install_name@_stealth
     43        # remove samhain_setpwd if not needed
     44        if ! test x$(PASSWORD) = x; then \
     45                rm -f `pwd`/debian/@install_name@/@sbindir@/@install_name@_setpwd; \
     46        fi
     47
     48override_dh_installdocs:
     49        # do nothing
     50
     51override_dh_installchangelogs:
     52        # do nothing
     53
     54override_dh_installman:
     55        # do nothing
     56
     57override_dh_installinit:
     58        dh_installinit --no-start -- defaults 19
     59
     60override_dh_usrlocal:
     61        # do nothing
     62
     63override_dh_fixperms:
    9964        dh_fixperms
    100         dh_installdeb
    101         dh_shlibdeps
    102         dh_gencontrol
    103         dh_md5sums
    104         dh_builddeb
     65        # Fix the permissions
     66        chmod o-rX `pwd`/debian/@install_name@/@mydataroot@ \
     67                `pwd`/debian/@install_name@/@myconffile@
     68        if ! test "x@mylogdir@" = "x/var/log"; then \
     69                chmod o-rX `pwd`/debian/@install_name@/@mylogdir@; \
     70        fi
    10571
    10672
    107 define checkdir
    108         test -f debian/rules
    109 endef
    110 
    111 binary: binary-indep binary-arch
    112 .PHONY: build clean binary-indep binary-arch binary install
    113 
Note: See TracChangeset for help on using the changeset viewer.