File: rules

package info (click to toggle)
sympa 2.6.1-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,940 kB
  • ctags: 1,069
  • sloc: perl: 8,446; makefile: 237; sh: 191; ansic: 172; lisp: 32
file content (115 lines) | stat: -rwxr-xr-x 3,137 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
#!/usr/bin/make -f
# MAde with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.

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

export DH_COMPAT=2

GENCAT=`which gencat || echo '/usr/bin/gencat'`
TMP=debian/sympa
NLSDIR=$(TMP)/usr/lib/sympa/nls


build: build-stamp
build-stamp:
	dh_testdir

	
	# Add here commands to compile the package.
	cd src; $(MAKE); cd ..
	# Docs are a pain to be generated ...
	# I'll use default submitted ones
	
	# You'll need transfig, latex2html, tetex, ...
	#cd doc; $(MAKE) ps; cd ..
	#cd doc; $(MAKE) html; cd ..

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	# Add here commands to clean up after the build process.
	-cd src; $(MAKE) clean; cd ..
	#-cd doc; $(MAKE) clean; cd ..
	#-cd doc; rm -rf html; cd ..
	-cd nls; $(MAKE) clean; cd ..
	-cd nls; rm -f *.cat; cd ..
	
	dh_clean

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

# Build architecture-dependent files here.
binary-arch: build
#	dh_testversion
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the files into debian/tmp
	cd src; $(MAKE) install DESTDIR=../$(TMP); cd ..
	cp debian/logrotate $(TMP)/etc/logrotate.d/sympa
	chmod 0644 $(TMP)/etc/logrotate.d/sympa

## Personnal installation stuff
	## Correct permission on file in /usr/lib/sympa
	chmod 0644 $(TMP)/usr/lib/sympa/bin/*.pm
	chmod 0644 $(TMP)/usr/lib/sympa/bin/scenari/*
	chmod 0644 $(TMP)/usr/lib/sympa/bin/tools.pl
	chmod 0644 $(TMP)/usr/lib/sympa/bin/mail.pl
	chmod 0644 $(TMP)/usr/lib/sympa/bin/msg.pl
	chmod 0644 $(TMP)/usr/lib/sympa/bin/edit_list.conf
	## Remove setuid bit on "queue" binary, postinst will re-add it
	chmod 0755 $(TMP)/usr/lib/sympa/bin/queue
	chmod 0755 $(TMP)/usr/lib/sympa/bin/bouncequeue
	## Install the launcher for sympa
	cp debian/add-on/launcher.pl $(TMP)/usr/bin/sympa
	chmod 0755 $(TMP)/usr/bin/sympa
	## Manpages installation (from .pod files)
	pod2man --section=1 --lax --center=" " --release=" " \
	debian/doc/sympa.pod | gzip -v9 > $(TMP)/usr/share/man/man1/sympa.1.gz
	## Installation of catalogs
	cd nls; $(MAKE); cd ..
	cp nls/*.msg nls/*.cat $(NLSDIR)/
	chmod 0644 $(NLSDIR)/*.msg $(NLSDIR)/*.cat
	## Installation of config-files
	cp debian/sympa.conf $(TMP)/etc/sympa
	chmod 0640 $(TMP)/etc/sympa/sympa.conf
	#HTML docs
	mv -f doc/sympa doc/html
	dh_installdocs
	mv -f doc/html doc/sympa
## End personnal installation stuff
	
	dh_installexamples sample/*
	dh_installmenu
	dh_installinit --update-rcd-params="defaults 50"
	dh_installcron
	dh_installmanpages
#	dh_undocumented
	dh_installchangelogs RELEASE_NOTES
	dh_strip
	dh_compress
	dh_fixperms
	dh_suidregister
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
#	dh_makeshlibs
	dh_md5sums
	dh_builddeb

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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