File: rules

package info (click to toggle)
quota 4.01-8
  • links: PTS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,968 kB
  • sloc: ansic: 10,955; sh: 682; perl: 333; makefile: 203
file content (119 lines) | stat: -rwxr-xr-x 3,183 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

CFLAGS_DEF = $(shell dpkg-buildflags --get CFLAGS)

CPPFLAGS_DEF = $(shell dpkg-buildflags --get CPPFLAGS)

LDFLAGS_DEF = $(shell dpkg-buildflags --get LDFLAGS)

configure: configure-stamp
configure-stamp:
	dh_testdir
	dh_quilt_patch
	# Add here commands to configure the package.
	( [ "`dpkg --print-architecture`" = "powerpc" ] && CFLAGSDEF += -D__BYTEORDER_HAS_U64__; \
	  export CFLAGS="$(CFLAGS_DEF) -I/usr/include/tirpc" CPPFLAGS="$(CPPFLAGS_DEF)" LDFLAGS="$(LDFLAGS_DEF) -ltirpc"; \
 	  ./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc --enable-ext2direct=yes --enable-rpcsetquota=yes --enable-rootsbin=yes --enable-ldapmail=yes --enable-netlink=yes)

	touch configure-stamp

build: build-stamp
build-stamp: configure
	dh_testdir

	# Add here commands to compile the package.
	$(MAKE) 

	# Create a POT file for translators
	make pot && mv pot.po po/quota.pot

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f po/quota.pot
	rm -f build-stamp *~ debian/*~ configure-stamp config.log

	# Add here commands to clean up after the build process.
	[ ! -f Makefile ] || $(MAKE) realclean
	debconf-updatepo
	dh_quilt_unpatch

	dh_clean

install: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/quota.
	$(MAKE) ROOTDIR=`pwd`/debian/quota  \
		STRIP=""\
		BIN_OWNER=root BIN_GROUP=root \
		LN="ln -s"\
		mandir=/usr/share/man \
                DEF_BIN_MODE=755 DEF_SBIN_MODE=755 install

# 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_testdir
	dh_testroot
	dh_install
	-chmod 755 `pwd`/debian/quota/usr/share/quota/ldap/setquota-ldap.pl
	-chmod 755 `pwd`/debian/quota/usr/share/quota/*.sh
	dh_installdebconf	
	dh_installdocs doc/*.* warnquota.conf README.*
	dh_installexamples
	dh_installmenu
	dh_systemd_enable quota.service
	dh_systemd_enable --name=quotarpc quotarpc.service
	dh_installinit --no-start
	dh_installinit --name=quotarpc
	dh_systemd_start --no-start 
	dh_systemd_start --name=quotarpc
	#
	# dh_installinit cannot be configured to not install the defaults
	# file for quotarpc, so we have to manually delete it
	#
	-rm -rf `pwd`/debian/quota/etc/default/quotarpc
	dh_installcron
	dh_installman
	# remove man pages already in libc
	-rm -rf `pwd`/debian/quota/usr/share/man/man2
	# and include files in libc-dev
	-rm -rf `pwd`/debian/quota/usr/include
	dh_installinfo
	dh_installchangelogs Changelog
	dh_lintian
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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

%:      %pod
	pod2man \
		--section=`echo $@ | sed 's/^.*\.//'` \
		--center="Debian GNU/Linux manual"\
		--date="Debian Project"\
		--release="`date '+%B %Y'`" \
	$< >,$@ && mv -f ,$@ $@;\
	rm -f ,$@