| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 4 |
|
| 5 |
ifeq ($(DEB_HOST_ARCH_OS),linux) |
| 6 |
WITH_SELINUX=--with-selinux |
| 7 |
endif |
| 8 |
|
| 9 |
confflags = --with-loadavg_mx=1.5 \ |
| 10 |
--with-jobdir=/var/spool/cron/atjobs \ |
| 11 |
--with-atspool=/var/spool/cron/atspool \ |
| 12 |
--with-systemdsystemunitdir=$(shell pkgconf --variable=systemdsystemunitdir systemd) \ |
| 13 |
$(WITH_SELINUX) \ |
| 14 |
SENDMAIL=/usr/sbin/sendmail |
| 15 |
|
| 16 |
build: build-arch build-indep |
| 17 |
build-arch: build-stamp |
| 18 |
build-stamp: |
| 19 |
dh_update_autotools_config |
| 20 |
dh_auto_configure -- $(confflags) |
| 21 |
dh_auto_build |
| 22 |
dh_auto_test |
| 23 |
touch $@ |
| 24 |
|
| 25 |
build-indep: |
| 26 |
# Nothing to be done here. |
| 27 |
|
| 28 |
clean: |
| 29 |
[ ! -f Makefile ] || $(MAKE) distclean |
| 30 |
dh_clean |
| 31 |
|
| 32 |
binary-indep: |
| 33 |
# Nothing to be done here |
| 34 |
|
| 35 |
binary-arch: build-stamp |
| 36 |
dh_testroot |
| 37 |
dh_prep |
| 38 |
# Install docs: |
| 39 |
dh_installchangelogs ChangeLog |
| 40 |
dh_installdocs README |
| 41 |
# Install everything: |
| 42 |
$(MAKE) IROOT=$(CURDIR)/debian/at mandir=/usr/share/man docdir=/usr/share/doc install |
| 43 |
# Remove (duplicate) changelog and copyright: |
| 44 |
rm debian/at/usr/share/doc/at/Copyright |
| 45 |
rm debian/at/usr/share/doc/at/ChangeLog |
| 46 |
# TODO: Take care of those: |
| 47 |
rm -f debian/at/var/spool/cron/atjobs/.SEQ |
| 48 |
chown daemon:daemon debian/at/var/spool/cron/atjobs debian/at/var/spool/cron/atspool |
| 49 |
# TODO: Why removing those? |
| 50 |
rm debian/at/usr/sbin/atrun |
| 51 |
rm debian/at/usr/share/man/man8/atrun.8 |
| 52 |
# Install/rename pam config file: |
| 53 |
dh_install pam.conf etc/pam.d |
| 54 |
mv debian/at/etc/pam.d/pam.conf \ |
| 55 |
debian/at/etc/pam.d/atd |
| 56 |
# Install/rename init script: |
| 57 |
dh_install rc etc/init.d |
| 58 |
mv debian/at/etc/init.d/rc \ |
| 59 |
debian/at/etc/init.d/atd |
| 60 |
chmod 755 debian/at/etc/init.d/atd |
| 61 |
chmod 644 debian/at/etc/pam.d/atd |
| 62 |
chown root:root debian/at/etc/init.d/atd debian/at/etc/pam.d/atd |
| 63 |
dh_systemd_enable |
| 64 |
dh_installinit --name=atd --onlyscripts -- defaults 89 11 |
| 65 |
dh_lintian |
| 66 |
dh_systemd_start |
| 67 |
# Needed to keep in line with the previous upload: |
| 68 |
chown root:daemon debian/at/etc/at.deny |
| 69 |
dh_compress |
| 70 |
dh_installdeb |
| 71 |
dh_shlibdeps |
| 72 |
dh_strip |
| 73 |
dh_gencontrol |
| 74 |
dh_md5sums |
| 75 |
dh_builddeb |
| 76 |
|
| 77 |
binary: binary-indep binary-arch |
| 78 |
|
| 79 |
.PHONY: binary binary-arch binary-indep clean |