[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.
|
---|
| 14 | export DH_COMPAT=1
|
---|
| 15 |
|
---|
| 16 | package=@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 |
|
---|
| 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
|
---|
| 29 | touch build-stamp
|
---|
| 30 |
|
---|
| 31 | clean:
|
---|
| 32 | dh_testdir
|
---|
| 33 | dh_testroot
|
---|
| 34 | rm -f build-stamp
|
---|
| 35 | -[ -f Makefile ] && $(MAKE) distclean
|
---|
| 36 | dh_clean
|
---|
| 37 |
|
---|
| 38 | install: build
|
---|
| 39 | dh_testdir
|
---|
| 40 | dh_testroot
|
---|
| 41 | dh_clean -k
|
---|
| 42 | dh_installdirs
|
---|
| 43 |
|
---|
| 44 | $(MAKE) install-light install-boot DESTDIR=`pwd`/debian/tmp
|
---|
| 45 |
|
---|
| 46 | # However, remove the rc.d links
|
---|
| 47 | -rm -rf `pwd`/debian/tmp/etc/rc?.d
|
---|
| 48 |
|
---|
| 49 | # Remove samhain_stealth for light install
|
---|
| 50 | -rm -f `pwd`/debian/tmp/@sbindir@/@install_name@_stealth
|
---|
| 51 |
|
---|
| 52 | # Build architecture-independent files here.
|
---|
| 53 | binary-indep: build install
|
---|
| 54 | # We have nothing to do by default.
|
---|
| 55 |
|
---|
| 56 |
|
---|
| 57 | # Build architecture-dependent files here.
|
---|
| 58 | binary-arch: build install
|
---|
| 59 | # dh_testversion
|
---|
| 60 | dh_testdir
|
---|
| 61 | dh_testroot
|
---|
| 62 | dh_installdebconf
|
---|
| 63 | # dh_installdocs
|
---|
| 64 | dh_installmenu
|
---|
| 65 | dh_installinit -- defaults 19
|
---|
| 66 | [ -f debian/postinst.debhelper ] && \
|
---|
| 67 | cd debian && \
|
---|
| 68 | cat postinst.debhelper | \
|
---|
| 69 | sed 's%/etc/init.d/@install_name@ start%:%' > postinst.tmp && \
|
---|
| 70 | mv postinst.tmp postinst.debhelper
|
---|
[68] | 71 | [ -f debian/postinst.debhelper ] && \
|
---|
| 72 | cd debian && \
|
---|
| 73 | cat postinst.debhelper | \
|
---|
| 74 | sed 's%invoke-rc.d @install_name@ start%:%' > postinst.tmp && \
|
---|
| 75 | mv postinst.tmp postinst.debhelper
|
---|
[1] | 76 | [ -f debian/prerm.debhelper ] && \
|
---|
| 77 | cd debian && \
|
---|
| 78 | cat prerm.debhelper | \
|
---|
| 79 | sed 's%/etc/init.d/@install_name@ stop%/etc/init.d/@install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
|
---|
| 80 | mv prerm.tmp prerm.debhelper
|
---|
[68] | 81 | [ -f debian/prerm.debhelper ] && \
|
---|
| 82 | cd debian && \
|
---|
| 83 | cat prerm.debhelper | \
|
---|
| 84 | sed 's%invoke-rc.d @install_name@ stop%invoke-rc.d @install_name@ stop || echo service @install_name@ already stopped%' > prerm.tmp && \
|
---|
| 85 | mv prerm.tmp prerm.debhelper
|
---|
[1] | 86 | # dh_installmanpages
|
---|
| 87 | # dh_installchangelogs @top_srcdir@/docs/Changelog
|
---|
| 88 | dh_link
|
---|
| 89 | # dh_strip
|
---|
| 90 | dh_compress
|
---|
| 91 | dh_fixperms
|
---|
| 92 | dh_installdeb
|
---|
| 93 | dh_shlibdeps
|
---|
| 94 | dh_gencontrol
|
---|
| 95 | dh_md5sums
|
---|
| 96 | dh_builddeb
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | define checkdir
|
---|
| 100 | test -f debian/rules
|
---|
| 101 | endef
|
---|
| 102 |
|
---|
| 103 | binary: binary-indep binary-arch
|
---|
| 104 | .PHONY: build clean binary-indep binary-arch binary install
|
---|
| 105 |
|
---|