File: rules

package info (click to toggle)
fcron 3.0.1-1.3
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 3,028 kB
  • ctags: 642
  • sloc: ansic: 7,978; sh: 1,107; makefile: 352; perl: 57
file content (131 lines) | stat: -rwxr-xr-x 3,064 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Modified for package fcron

PACKAGE:=fcron
PKGDIR:=$(CURDIR)/debian/$(PACKAGE)

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

export DH_ALWAYS_EXCLUDE=CVS:.svn

DEBUGFLAGS=-g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	DEBUGFLAGS += -O0
else
	DEBUGFLAGS += -O2
endif
ifneq (,$(findstring strict,$(DEB_BUILD_OPTIONS)))
	DEBUGFLAGS += -Werror
endif

ifeq (linux,$(DEB_HOST_ARCH_OS))
	SELINUX = --with-selinux=yes
else
	SELINUX = --with-selinux=no
endif
	
configure-stamp: configure
	dh_testdir
	./configure CFLAGS="-Wall -pipe $(DEBUGFLAGS)" $(CONFFLAGS) \
		--prefix=/usr --with-mandir=/usr/share/man \
		--with-docdir=/usr/share/doc \
		--with-editor=/usr/bin/sensible-editor \
		--with-spooldir=/var/spool/fcron \
		--with-etcdir=/etc \
		--with-sendmail=/usr/sbin/sendmail \
		$(SELINUX)

	touch configure-stamp

configure:
	autoconf

build: configure-stamp build-stamp
build-stamp:
	dh_testdir
	$(MAKE)
	touch build-stamp

clean:	configure
	dh_testdir
	dh_testroot
	-$(RM) -f build-stamp configure-stamp
	-$(RM) -rf autom4te.cache

	[ ! -f Makefile ] || $(MAKE) clean
	-$(RM) -f config.cache config.log config.status config.h Makefile
	-$(RM) -f doc/stylesheets/fcron-doc.dsl

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	#$(MAKE) install prefix=$(CURDIR)/debian/tmp/usr

	install -m 755 fcron fcronsighup $(PKGDIR)/usr/sbin
	install -m 755 fcrontab fcrondyn $(PKGDIR)/usr/bin
	install files/fcron.deny files/fcron.allow $(PKGDIR)/etc
	install files/fcron.conf $(PKGDIR)/etc

	install -m 755 debian/fcron-update-crontabs $(PKGDIR)/usr/sbin

	# root's default crontab
	install -m 640 debian/crontab.root $(PKGDIR)/var/spool/fcron/systab.orig

	# lintian overrides
	install -D -m 644 debian/lintian $(PKGDIR)/usr/share/lintian/overrides/fcron

	# add anacron hack
	ln -s /bin/true $(PKGDIR)/usr/sbin/anacron

	# docs
	mkdir -p $(PKGDIR)/usr/share/doc/$(PACKAGE)
	cp -r doc/en/HTML $(PKGDIR)/usr/share/doc/$(PACKAGE)/HTML.en
	cp -r doc/fr/HTML $(PKGDIR)/usr/share/doc/$(PACKAGE)/HTML.fr

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
#	dh_testversion
	dh_testdir
	dh_testroot
	dh_installdebconf	
	dh_installdocs
	dh_installexamples
#	dh_installmenu
	dh_installpam
	dh_installpam --name fcrontab
	dh_installinit -- defaults 89 11
#	dh_installcron
	dh_installman
#	dh_installinfo
	dh_installchangelogs doc/en/HTML/changes.html
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	chmod 640 $(PKGDIR)/etc/fcron.allow $(PKGDIR)/etc/fcron.deny
	chmod 640 $(PKGDIR)/etc/fcron.conf
	chmod 770 $(PKGDIR)/var/spool/fcron
#	dh_makeshlibs
	dh_installdeb
#	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install