4 export DEB_BUILD_HARDENING
=1
9 $(warning
"DEBIAN: SNMP enabled, sorry for your inconvenience")
11 $(warning
"DEBIAN: SNMP disabled, see README.Debian")
15 dh
$@
--parallel
--with autoreconf
--dbg-package
=quagga-dbg
--list-missing
16 if
[ -e config.status
]; then \
17 dh
$@
--parallel
--dbg-package
=quagga-dbg
--list-missing
; \
19 dh
$@
--parallel
--with autoreconf
--dbg-package
=quagga-dbg
--list-missing
; \
22 override_dh_auto_clean
:
26 #@rm -vf */Makefile doc/quagga.fns doc/quagga.info doc/quagga.kys doc/quagga.tmp doc/quagga.pdf doc/quagga.info-*
27 #@rm -vf lib/version.c doc/stamp-vti
28 #@rm -vf vtysh/vtysh_cmd.c
29 #@rm -vf doc/fig*.pdf doc/version.texi
33 #@if [ -e config.log ]; then echo "CONFIG.LOG STILL THERE"; rm config.log; fi
35 override_dh_auto_configure
:
36 # Quagga needs /proc to check some BSD vs Linux specific stuff.
37 # Else it fails with an obscure error message pointing out that
38 # IPCTL_FORWARDING is an undefined symbol which is not very helpful.
39 @if
! [ -d
/proc
/1 ]; then \
40 echo
"./configure needs a mounted /proc"; \
44 if
! [ -e config.status
]; then \
45 dh_auto_configure
-- \
46 --enable-exampledir
=/usr
/share
/doc
/quagga
/examples
/ \
47 --localstatedir
=/var
/run
/quagga \
48 --sbindir
=/usr
/lib
/quagga \
49 --sysconfdir
=/etc
/quagga \
53 --enable-watchquagga \
57 --enable-ospfclient
=yes \
58 --enable-ospfapi
=yes \
59 --enable-multipath
=64 \
60 --enable-user
=quagga \
61 --enable-group
=quagga \
62 --enable-vty-group
=quaggavty \
63 --enable-configfile-mask
=0640 \
64 --enable-logfile-mask
=0640 \
67 --enable-gcc-rdynamic \
69 --enable-dependency-tracking
; \
71 if
! diff
-b
-IHAVE_SNMP
-IHAVE_NETSNMP
-IUCD_COMPAT
-IGETIFADDR debian
/my
/config.h.reference config.h
; then \
73 echo
"WARNING: Please compare with debian/my/config.h.reference"; \
75 if
[ "`hostname`" = "james" ]; then exit
1; fi
; \
78 override_dh_auto_build
:
81 dh_auto_build
-- -C doc draft-zebra-00.txt
85 ifeq ($(GENERATE_PDF
), 1)
86 dh_auto_build
-- -C doc quagga.pdf || true
# pdfetex fails with exit code 1 but still produces a good looking .pdf
88 rm -vf doc
/quagga.
info
89 dh_auto_build
-- -C doc quagga.
info
90 rm -vf doc
/quagga.
info.html
*
92 override_dh_auto_test
:
94 override_dh_auto_install
:
97 # cleaning up the info dir
98 rm -f debian
/tmp
/usr
/share
/info/dir*
100 # install config files
101 mkdir
-p debian
/tmp
/etc
/quagga
/
102 cp debian
/my
/debian.conf debian
/tmp
/etc
/quagga
/
103 cp debian
/my
/daemons debian
/tmp
/etc
/quagga
/
104 perl
-pi
-e
's#^!log file #!log file /var/log/quagga/#' debian
/tmp
/usr
/share
/doc
/quagga
/examples
/*sample
*
106 # installing the Quagga specific SNMP MIB
107 install -D
-m
644 .
/zebra
/GNOME-PRODUCT-ZEBRA-MIB debian
/tmp
/usr
/share
/snmp
/mibs
/GNOME-PRODUCT-ZEBRA-MIB
109 # installing custom man page
110 cp debian
/my
/babeld
.8 debian
/tmp
/usr
/share
/man
/man8
/quagga-babeld
.8
113 sed
-i
"/dependency_libs/ s/'.*'/''/" debian
/tmp
/usr
/lib
/*.la