File: rules

package info (click to toggle)
wmnd 0.4.18-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,112 kB
  • sloc: sh: 4,163; ansic: 3,674; makefile: 58
file content (57 lines) | stat: -rwxr-xr-x 2,030 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

pwmnd                      := wmnd
pwmnd_snmp                 := wmnd-snmp

define dh_auto_command
        $(subst override_,,$1) --verbose --buildsystem=autoconf --parallel \
                               --package="$2"                              \
                               --builddirectory="BUILD-$2"                 \
                               --tmpdir="debian/$2"                        \
                               -O --destdir="debian/$2"  $3
endef

DEB_BUILD_MAINT_OPTIONS := hardening=+all
DEB_CFLAGS_MAINT_APPEND := $(shell getconf LFS_CFLAGS) -Wall
DPKG_EXPORT_BUILDFLAGS  := 1

include /usr/share/dpkg/buildflags.mk

include /usr/share/dpkg/architecture.mk

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
  CC  := $(DEB_HOST_GNU_TYPE)-gcc
else
  CC  := gcc
endif

CONFFLAGS                 :=  --enable-trend
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
CONFFLAGS                 += --enable-debug
endif

%:
	dh $@

override_dh_auto_configure:
	$(call dh_auto_command,$@,$(pwmnd),                                        \
	                 -- $(CONFFLAGS)                                           \
	                 --docdir="\$${prefix}/share/doc/$(pwmnd)"                 \
	                 --enable-drivers="linux_proc"                             )

	$(call dh_auto_command,$@,$(pwmnd_snmp),                                   \
	                 -- $(CONFFLAGS)                                           \
	                 --docdir="\$${prefix}/share/doc/$(pwmnd_snmp)"            \
	                 --enable-drivers="linux_proc generic_snmp"                \
	                 LIBS="$(LIBS) -lsnmp"                                     )


override_dh_auto_build override_dh_auto_clean override_dh_auto_install:
	$(call dh_auto_command,$@,$(pwmnd))

	$(call dh_auto_command,$@,$(pwmnd_snmp))

override_dh_installchangelogs:
	dh_installchangelogs -k NEWS.rst