File: rules

package info (click to toggle)
apcupsd 3.14.14-7
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,904 kB
  • sloc: ansic: 24,826; cpp: 9,230; sh: 4,484; makefile: 1,200; tcl: 368; objc: 317; php: 107
file content (76 lines) | stat: -rwxr-xr-x 2,219 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/make -f

export deb_systemdsystemunitdir = $(shell pkg-config --variable=systemdsystemunitdir systemd)
export deb_systemdutildir = $(shell pkg-config --variable=systemdutildir systemd)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# for upstream build system
export VERBOSE=1

%:
	# don't use --with autotools_dev with dh10 anymore: dh $@ --with autoreconf,autotools_dev,systemd
	dh $@ --with autoreconf

# there is a bug in dh_auto_configure, see #887390
# so it can not be run under DH_COMPAT>=11
# do NOT use ${prefix} for --bindir and --sbindir, it does not work with platforms/etc/*.in
#		--bindir=\$${prefix}/bin \
#		--sbindir=\$${prefix}/sbin \
#
override_dh_auto_configure:
	DH_COMPAT=10 dh_auto_configure -- \
		--with-libwrap \
		--enable-cgi \
		--enable-modbus-usb \
		--enable-usb \
		--enable-net \
		--enable-snmp \
		--enable-test \
		--sysconfdir=/etc/apcupsd \
		--bindir=/usr/bin \
		--sbindir=/usr/sbin \
		--with-cgi-bin=\$${prefix}/lib/cgi-bin/apcupsd \
		--with-pid-dir=/var/run \
		--with-log-dir=/var/log \
		--with-lock-dir=/var/lock \
		--with-pwrfail-dir=/etc/apcupsd \
		--disable-install-distdir \
		--with-nis-port=3551 \
		--with-nisip=127.0.0.1 \
		--with-upstype=usb \
		--with-upscable=usb \
		SHUTDOWN=/sbin/shutdown \
		SCRIPTSHELL=/bin/sh
# as gconf shall disappear, do not enable gapcom
#		--enable-gapcmon

override_dh_auto_build:
	dh_auto_build
	make -C doc/manual manual.pdf

override_dh_install:
	dh_install
	dh_install -papcupsd debian/local/apcupsd_shutdown $(deb_systemdutildir)/system-shutdown/

override_dh_link:
	dh_link
	dh_link -papcupsd /dev/null $(deb_systemdsystemunitdir)/ups-monitor.service

override_dh_installinit:
	dh_installinit --no-restart-on-upgrade --init-script=apcupsd

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog

override_dh_compress:
	dh_compress -Xusr/share/doc/apcupsd/doc

override_dh_fixperms-arch:
	dh_fixperms
	chmod 0755 debian/apcupsd/etc/apcupsd/killpower
	chmod 0755 debian/apcupsd/etc/apcupsd/ups-monitor
	chmod 0755 debian/apcupsd/usr/lib/apcupsd/prestart
	chmod 0755 debian/apcupsd/$(deb_systemdutildir)/system-shutdown/apcupsd_shutdown