File: rules

package info (click to toggle)
liboping 1.10.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 640 kB
  • sloc: ansic: 3,279; perl: 210; makefile: 93; sh: 3
file content (32 lines) | stat: -rwxr-xr-x 935 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpkg/pkg-info.mk
export DEB_VERSION
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

LIBPERL_VERSION := $(shell \
 pm_ver=$$(perl -MExtUtils::MM -e 'print MM->parse_version("bindings/perl/lib/Net/Oping.pm");'); \
 echo -n "$${DEB_VERSION%-*}-$${pm_ver}-$${DEB_VERSION\#\#*-}")

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --with-perl-bindings="INSTALLDIRS=vendor"

override_dh_auto_build:
	-rm --verbose src/mans/*.[1-8] # always rebuild man pages
	dh_auto_build
	-chrpath --list bindings/perl/blib/arch/auto/Net/Oping/Oping.so
	chrpath --delete bindings/perl/blib/arch/auto/Net/Oping/Oping.so

override_dh_fixperms:
	dh_fixperms
	chmod u+s debian/oping/usr/bin/oping debian/oping/usr/bin/noping

override_dh_gencontrol:
	dh_gencontrol -Nlibnet-oping-perl
	dh_gencontrol -plibnet-oping-perl -- -v$(LIBPERL_VERSION)