File: rules

package info (click to toggle)
at 3.2.5-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 708 kB
  • sloc: sh: 3,139; ansic: 2,620; yacc: 578; makefile: 214; lex: 92; perl: 62
file content (79 lines) | stat: -rwxr-xr-x 2,125 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
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
77
78
79
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

ifeq ($(DEB_HOST_ARCH_OS),linux)
  WITH_SELINUX=--with-selinux
endif

confflags = --with-loadavg_mx=1.5 \
            --with-jobdir=/var/spool/cron/atjobs \
            --with-atspool=/var/spool/cron/atspool \
            --with-systemdsystemunitdir=$(shell pkgconf --variable=systemdsystemunitdir systemd) \
            $(WITH_SELINUX) \
            SENDMAIL=/usr/sbin/sendmail

build: build-arch build-indep
build-arch: build-stamp
build-stamp:
	dh_update_autotools_config
	dh_auto_configure -- $(confflags)
	dh_auto_build
	dh_auto_test
	touch $@

build-indep:
# Nothing to be done here.

clean:
	[ ! -f Makefile ] || $(MAKE) distclean
	dh_clean

binary-indep:
# Nothing to be done here

binary-arch: build-stamp
	dh_testroot
	dh_prep
	# Install docs:
	dh_installchangelogs ChangeLog
	dh_installdocs README
	# Install everything:
	$(MAKE) IROOT=$(CURDIR)/debian/at mandir=/usr/share/man docdir=/usr/share/doc install
	# Remove (duplicate) changelog and copyright:
	rm debian/at/usr/share/doc/at/Copyright
	rm debian/at/usr/share/doc/at/ChangeLog
	# TODO: Take care of those:
	rm -f debian/at/var/spool/cron/atjobs/.SEQ
	chown daemon:daemon debian/at/var/spool/cron/atjobs debian/at/var/spool/cron/atspool
	# TODO: Why removing those?
	rm debian/at/usr/sbin/atrun
	rm debian/at/usr/share/man/man8/atrun.8
	# Install/rename pam config file:
	dh_install pam.conf etc/pam.d
	mv debian/at/etc/pam.d/pam.conf \
		debian/at/etc/pam.d/atd
	# Install/rename init script:
	dh_install rc etc/init.d
	mv debian/at/etc/init.d/rc \
		debian/at/etc/init.d/atd
	chmod 755 debian/at/etc/init.d/atd
	chmod 644 debian/at/etc/pam.d/atd
	chown root:root debian/at/etc/init.d/atd debian/at/etc/pam.d/atd
	dh_systemd_enable
	dh_installinit --name=atd --onlyscripts -- defaults 89 11
	dh_lintian
	dh_systemd_start
	# Needed to keep in line with the previous upload:
	chown root:daemon debian/at/etc/at.deny
	dh_compress
	dh_installdeb
	dh_shlibdeps
	dh_strip
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean