File: rules

package info (click to toggle)
wmnd 0.4.17-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 908 kB
  • ctags: 579
  • sloc: sh: 3,925; ansic: 3,672; makefile: 49
file content (47 lines) | stat: -rwxr-xr-x 1,943 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
#!/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

export CFLAGS             := $(shell dpkg-buildflags --get CFLAGS) -Wall
export LDFLAGS            := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed

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


%:
	 dh "$@" --with autotools_dev

override_dh_auto_configure:
	$(call dh_auto_command,$@,$(pwmnd),                                        \
	                 -- $(CONFFLAGS)                                           \
	                 --docdir="\$${prefix}/share/doc/$(pwmnd)"                 \
	                 --enable-drivers="linux_proc solaris_fpppd"               )
	
	$(call dh_auto_command,$@,$(pwmnd_snmp),                                   \
	                 -- $(CONFFLAGS)                                           \
	                 --docdir="\$${prefix}/share/doc/$(pwmnd_snmp)"            \
	                 --enable-drivers="linux_proc solaris_fpppd 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))

.PHONY: override_dh_auto_configure override_dh_auto_build  \
        override_dh_auto_clean override_dh_auto_install