File: rules

package info (click to toggle)
atop 2.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,472 kB
  • sloc: ansic: 34,445; python: 257; sh: 232; makefile: 189
file content (47 lines) | stat: -rwxr-xr-x 1,727 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

# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export deb_systemdsleepdir = $(shell pkg-config --variable=systemdsleepdir systemd)

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	rm -f debian/atop.service debian/atop.default debian/atop.atopacct.service debian/atop.init debian/atopacct.init debian/atop.atop-rotate.timer debian/atop.atop-rotate.service
	rm -f atop atopsar

override_dh_installinit:
	dh_installinit --name=atopacct
	dh_installinit --name=atop

override_dh_auto_install:
	dh_auto_install -- PMPATHD=${deb_systemdsleepdir}
	make sysvinstall DESTDIR=$(shell pwd)/debian/atop
	make install DESTDIR=$(shell pwd)/debian/atop PMPATHD=${deb_systemdsleepdir}
	mv debian/atop/lib/systemd/system/atop-rotate.timer debian/atop.atop-rotate.timer
	mv debian/atop/lib/systemd/system/atop-rotate.service debian/atop.atop-rotate.service
	rmdir --parents --ignore-fail-on-non-empty debian/atop/lib/systemd/system
	cp atop.default debian/atop.default
	cp atop.service debian/atop.service
	cp atop.default debian/atop.default
	cp atopacct.service debian/atop.atopacct.service
	cp atop.init debian/atop.init
	cp atopacct.init debian/atopacct.init

override_dh_installsystemd:
	dh_installsystemd --name atop-rotate atop-rotate.timer
	dh_installsystemd --name atop-rotate --no-enable --no-start atop-rotate.service
	dh_installsystemd --name atopacct
	dh_installsystemd atop.service