Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
4 export deb_systemdsleepdir = $(shell pkg-config --variable=systemdsleepdir systemd)
5
6 %:
7 dh $@
8
9 MAKEARGS_INDP = DESTDIR=$(CURDIR)/debian/tmp \
10 PREFIX=/usr \
11 LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
12 MANDIR=/usr/share/man
13 MAKEARGS_ARCH = $(MAKEARGS_INDP) \
14 ARCH=$(DEB_HOST_GNU_CPU) \
15 CFLAGS="$(CFLAGS)" \
16 CPPFLAGS="$(CPPFLAGS)" \
17 LDFLAGS="$(LDFLAGS)" \
18 EXLDFLAGS="$(LDFLAGS)"
19
20 override_dh_auto_clean:
21 make clean $(MAKEARGS_ARCH)
22
23 # Ignore missing files on non-Linux. This package is Linux specific, and
24 # is just minimally built on other OS to simplify porters work.
25 ifneq ($(DEB_HOST_ARCH_OS),linux)
26 override_dh_missing:
27 dh_missing --list-missing
28 endif
29
30 # Sensors-detect works fine with perl-base
31 override_dh_perl:
32 dh_perl -d
33
34 #
35 # Architecture independent targets
36 #
37 override_dh_auto_build-indep:
38
39 override_dh_auto_install-indep:
40 $(MAKE) install-etc install-prog-pwm $(MAKEARGS_INDP)
41 install -m 755 -D $(CURDIR)/debian/fancontrol-systemd-sleep $(CURDIR)/debian/fancontrol$(deb_systemdsleepdir)/fancontrol
42
43 # Make sure /etc/sensors.d/ is not removed
44 touch $(CURDIR)/debian/tmp/etc/sensors.d/.placeholder
45
46 override_dh_installinit-indep:
47 dh_installinit -pfancontrol --restart-after-upgrade
48
49 override_dh_installsystemd-indep:
50 dh_installsystemd -pfancontrol --restart-after-upgrade
51
52
53 #
54 # Architecture targets
55 #
56 override_dh_auto_build-arch:
57 dh_auto_build -- $(MAKEARGS_ARCH)
58
59 override_dh_auto_install-arch:
60 dh_auto_install -- $(MAKEARGS_ARCH)
61
62 # Install isadump only if it has been built (on x86/x86_64 archs only)
63 if [ -x prog/dump/isadump ] ; then \
64 dh_install -plm-sensors usr/sbin/isadump ; \
65 dh_install -plm-sensors usr/share/man/man8/isadump.8 ; \
66 fi
67 # Install isaset only if it has been built (on x86/x86_64 archs only)
68 if [ -x prog/dump/isaset ] ; then \
69 dh_install -plm-sensors usr/sbin/isaset ; \
70 dh_install -plm-sensors usr/share/man/man8/isaset.8 ; \
71 fi
72
73 override_dh_installinit-arch:
74 dh_installinit -plm-sensors --no-start
75
76 override_dh_installsystemd-arch:
77 dh_installsystemd -plm-sensors --no-start