File: rules

package info (click to toggle)
net-snmp 5.9+dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 36,760 kB
  • sloc: ansic: 283,039; perl: 17,712; sh: 11,887; makefile: 2,705; xml: 663; python: 623; pascal: 62; sql: 47
file content (98 lines) | stat: -rwxr-xr-x 3,047 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/usr/bin/make -f
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS := hardening=+all
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

LIB_VERSION = 40

MIB_MODULES = smux ucd-snmp/dlmod mibII/mta_sendmail disman/event-mib
EXCL_MIB_MODULES = 

MIBS_DIR="/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf"

ifeq (linux,$(DEB_BUILD_ARCH_OS))
MIB_MODULES += ucd-snmp/diskio ucd-snmp/lmsensorsMib etherlike-mib/dot3StatsTable
DEB_DH_GENCONTROL_ARGS=-- -Vos-specific-dev="libsensors4-dev"
else
ifeq (kfreebsd,$(DEB_BUILD_ARCH_OS))
DEB_DH_GENCONTROL_ARGS=-- -Vos-specific-dev="libkvm-dev"
CFLAGS += $(shell pkg-config --cflags libbsd-overlay)
LDFLAGS += $(shell pkg-config --libs libbsd-overlay)
endif
endif
ifeq (hurd,$(DEB_BUILD_ARCH_OS))
EXCL_MIB_MODULES += mibII
else
MIB_MODULES += host
endif

%:
	dh $@

# The net-snmp Makefiles cannot handle parallel builds
override_dh_auto_build:
	dh_auto_build --no-parallel

override_dh_auto_configure:
	dh_auto_configure -- --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
	  --with-persistent-directory=/var/lib/snmp \
	  --enable-ucd-snmp-compatibility \
	  --with-cflags="$(CFLAGS) -DNETSNMP_USE_INLINE" \
	  --with-ldflags="$(LDFLAGS)" \
	  --with-perl-modules="INSTALLDIRS=vendor" --enable-as-needed \
	  --with-logfile=none \
	  --without-rpm --with-libwrap --with-openssl \
	  --without-dmalloc --without-efence --without-rsaref \
	  --with-sys-contact="root" --with-sys-location="Unknown" \
	  --with-mib-modules="$(MIB_MODULES)" \
	  --with-out-mib-modules="$(EXCL_MIB_MODULES)" \
	  --with-transports="TLSTCP DTLSUDP" \
	  --with-security-modules="tsm" \
	  --enable-mfd-rewrites \
	  --with-mnttab=/etc/mtab \
	  --with-mibdirs="\$$HOME/.snmp/mibs:$(MIBS_DIR)" \
	  --with-mysql \
	  --with-defaults
# --with-dnssec-local-validation  # not enabled since libval doesn't exist in Debian yet

override_dh_clean:
	dh_clean
	rm -rf `find . -name .libs` \
	       dist/generation-scripts/gen-variables \
	       perl/SNMP/t/snmptest.cmd \
	       perl/TrapReceiver/const-c.inc \
	       perl/TrapReceiver/const-xs.inc

override_dh_makeshlibs:
	dh_makeshlibs -plibsnmp$(LIB_VERSION) -VUpstream-Version
	dh_makeshlibs -plibnetsnmptrapd$(LIB_VERSION) -VUpstream-Version

override_dh_install-arch:
	dh_install

override_dh_installdocs:
	dh_installdocs -plibsnmp-perl -ptkmib -plibsnmp-base -plibsnmp$(LIB_VERSION)
	dh_installdocs --link-doc=libsnmp$(LIB_VERSION) \
		       -plibsnmp-dev \
		       -plibnetsnmptrapd$(LIB_VERSION) \
		       -psnmpd \
		       -psnmptrapd \
		       -psnmp

override_dh_fixperms-arch:
	dh_fixperms
	chmod -x debian/libsnmp-dev/etc/snmp/*.conf
	chmod 600 debian/snmpd/etc/snmp/snmp*d.conf

override_dh_auto_test:
	# prevent test since it fails with network configuration under pbuilder/etc.
	true

override_dh_installsystemd:
	dh_installsystemd -psnmptrapd --no-enable --no-start
	dh_installsystemd -Nsnmptrapd

override_dh_installinit:
	dh_installinit -psnmptrapd --no-enable --no-start
	dh_installinit -Nsnmptrapd