]> git.proxmox.com Git - mirror_frr.git/blame - debian/rules
Fixup of a few missed warnings after --enable-werror turned on
[mirror_frr.git] / debian / rules
CommitLineData
4d916382
DS
1#!/usr/bin/make -f
2
3export DH_VERBOSE=1
4export DEB_BUILD_HARDENING=1
d0af8528 5export DH_OPTIONS=-v
4d916382
DS
6
7ifeq ($(WANT_SNMP), 1)
8 USE_SNMP=--enable-snmp
9 $(warning "DEBIAN: SNMP enabled, sorry for your inconvenience")
10else
11 $(warning "DEBIAN: SNMP disabled, see README.Debian")
12endif
13
14%:
5b217be0 15 dh $@ --parallel --with autoreconf --dbg-package=quagga-dbg --list-missing
d0af8528
DS
16 if [ -e config.status ]; then \
17 dh $@ --parallel --dbg-package=quagga-dbg --list-missing; \
18 else \
19 dh $@ --parallel --with autoreconf --dbg-package=quagga-dbg --list-missing; \
20 fi
4d916382
DS
21
22override_dh_auto_clean:
d0af8528 23 #dh_auto_clean
4d916382 24
d0af8528
DS
25 #@echo "BEGIN CRUFT"
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
30 #@echo "END CRUFT"
4d916382
DS
31
32 # why?
d0af8528 33 #@if [ -e config.log ]; then echo "CONFIG.LOG STILL THERE"; rm config.log; fi
4d916382
DS
34
35override_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"; \
41 exit 1; \
42 fi
d0af8528
DS
43
44 if ! [ -e config.status ]; then \
4d916382
DS
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 \
50 $(USE_SNMP) \
51 --enable-vtysh \
52 --enable-isisd \
53 --enable-watchquagga \
54 --enable-ospf-te \
55 --enable-opaque-lsa \
56 --enable-ipv6 \
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 \
65 --enable-rtadv \
66 --enable-gcc-rdynamic \
d0af8528
DS
67 --with-libpam; \
68 fi
4d916382
DS
69 if ! diff -b -IHAVE_SNMP -IHAVE_NETSNMP -IUCD_COMPAT -IGETIFADDR debian/my/config.h.reference config.h; then \
70 echo; \
71 echo "WARNING: Please compare with debian/my/config.h.reference"; \
72 echo; \
73 if [ "`hostname`" = "james" ]; then exit 1; fi; \
74 fi
75
76override_dh_auto_build:
d0af8528
DS
77 #dh_auto_build
78 $(MAKE)
85ca2dfd 79 dh_auto_build -- -C doc draft-zebra-00.txt
d0af8528 80
4d916382
DS
81
82 # doc/ is a bit crazy
76ed358f 83ifeq ($(GENERATE_PDF), 1)
4d916382 84 dh_auto_build -- -C doc quagga.pdf || true # pdfetex fails with exit code 1 but still produces a good looking .pdf
76ed358f 85endif
4d916382
DS
86 rm -vf doc/quagga.info
87 dh_auto_build -- -C doc quagga.info
88 rm -vf doc/quagga.info.html*
d0af8528
DS
89
90override_dh_auto_test:
4d916382
DS
91
92override_dh_auto_install:
93 dh_auto_install
94
95 # cleaning up the info dir
96 rm -f debian/tmp/usr/share/info/dir*
97
98 # install config files
99 mkdir -p debian/tmp/etc/quagga/
100 cp debian/my/debian.conf debian/tmp/etc/quagga/
101 cp debian/my/daemons debian/tmp/etc/quagga/
102 perl -pi -e 's#^!log file #!log file /var/log/quagga/#' debian/tmp/usr/share/doc/quagga/examples/*sample*
103
104 # installing the Quagga specific SNMP MIB
105 install -D -m 644 ./zebra/GNOME-PRODUCT-ZEBRA-MIB debian/tmp/usr/share/snmp/mibs/GNOME-PRODUCT-ZEBRA-MIB
106
107 # installing custom man page
108 cp debian/my/babeld.8 debian/tmp/usr/share/man/man8/quagga-babeld.8
109
110 # cleaning .la files
111 sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/*.la
112