File: rules

package info (click to toggle)
sympa 6.2.76~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 45,988 kB
  • sloc: perl: 54,777; javascript: 17,252; makefile: 1,487; sh: 1,090; ansic: 337; php: 100
file content (139 lines) | stat: -rwxr-xr-x 5,213 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
132
133
134
135
136
137
138
139
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

PACKAGE  = $(shell dh_listpackages)
DEBDIR   = $(CURDIR)/debian
TMP      = $(DEBDIR)/$(PACKAGE)

UPSTREAMSTUFF  = META.json sympa.spec
UPSTREAMSTUFF += $(shell find po -iname 'stamp-po')
UPSTREAMSTUFF += $(shell find po -type f -iname '*.po*' | sed 's/\.upstream//')

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-fhs \
		--sysconfdir=/etc/sympa \
		--sbindir=/usr/lib/sympa/bin \
		--libexecdir=/usr/lib/sympa/bin \
		--with-cgidir=/usr/lib/cgi-bin/sympa \
		--with-staticdir=/usr/share/sympa/static_content \
		--with-cssdir=/var/lib/sympa/css \
		--with-picturesdir=/var/lib/sympa/pictures \
		--datadir=/usr/share \
		--localedir=/usr/share/locale \
		--mandir=/usr/share/man \
		--with-initdir=/etc/init.d \
		--docdir=/usr/share/doc/sympa \
		--with-piddir=/run/sympa \
		--with-perl=/usr/bin/perl \
		--with-user=sympa \
		--with-group=sympa \
		--with-aliases_file=/etc/mail/sympa/aliases \
		--disable-setuid-fcgi
	# Backup upstream stuff
	for file in $(UPSTREAMSTUFF); do \
		if [ -e $$file ] && [ ! -e $$file.upstream ] ; then \
			cp $$file $$file.upstream ; \
		fi \
	done
	# Simulate presence of files removed from the DFSG repacked tarball
	mkdir -p www/js/jquery-ui/images www/js/jquery-minicolors
	touch \
		www/js/jquery.js \
		www/js/jquery-migrate.js \
		www/js/jquery-ui/jquery-ui.js \
		www/js/jquery-ui/jquery-ui.css \
		www/js/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png \
		www/js/jquery-ui/images/ui-icons_cc0000_256x240.png \
		www/js/jquery-ui/images/ui-icons_ffffff_256x240.png \
		www/js/jquery-ui/images/ui-icons_777620_256x240.png \
		www/js/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png \
		www/js/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png \
		www/js/jquery-ui/images/ui-icons_444444_256x240.png \
		www/js/jquery-ui/images/ui-icons_777777_256x240.png \
		www/js/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png \
		www/js/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png \
		www/js/jquery-ui/images/ui-icons_222222_256x240.png \
		www/js/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png \
		www/js/jquery-ui/images/ui-icons_cd0a0a_256x240.png \
		www/js/jquery-ui/images/ui-icons_888888_256x240.png \
		www/js/jquery-ui/images/ui-icons_555555_256x240.png \
		www/js/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png \
		www/js/jquery-ui/images/ui-icons_454545_256x240.png \
		www/js/jquery-ui/images/ui-icons_2e83ff_256x240.png \
		www/js/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png \
		www/js/jquery-ui/LICENSE.txt \
		www/js/jquery-minicolors/jquery.minicolors.css \
		www/js/jquery-minicolors/jquery.minicolors.js \
		www/js/jquery-minicolors/jquery.minicolors.min.js \
		www/js/jquery-minicolors/jquery.minicolors.png

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	echo "SKIP testsuite as required"
endif

override_dh_auto_install:
	dh_auto_install
	rm -rf \
		$(TMP)/run \
		$(TMP)/etc/sympa/README \
		$(TMP)/etc/sympa/sympa/sympa.conf \
		$(TMP)/etc/sympa/sympa/sympa.conf-dist \
		$(TMP)/etc/sympa/smrsh \
		$(TMP)/usr/share/sympa/default/ca-bundle.crt \
		$(TMP)/usr/share/sympa/bin/create_db.Sybase \
		$(TMP)/etc/sympa/data_structure.version \
		$(TMP)/usr/share/sympa/static_content/js/html5shiv/html5shiv.js \
		$(TMP)/usr/share/sympa/static_content/js/jquery.js \
		$(TMP)/usr/share/sympa/static_content/js/jquery-migrate.js \
		$(TMP)/usr/share/sympa/static_content/js/jquery-ui \
		$(TMP)/usr/share/sympa/static_content/fonts/font-awesome/ \
		$(TMP)/usr/share/sympa/static_content/js/jquery-minicolors \
		$(TMP)/usr/share/sympa/static_content/fonts/foundation-icons/preview.html \
		$(TMP)/usr/share/sympa/static_content/fonts/Raleway/OFL.txt
	mv $(TMP)/usr/share/doc/sympa/samples $(TMP)/usr/share/doc/sympa/examples

override_dh_installsystemd:
	dh_installsystemd --name sympa sympa.service
	dh_installsystemd --no-start --name sympa-bounced sympa-bounced.service
	dh_installsystemd --no-start --name sympa-archived sympa-archived.service
	dh_installsystemd --no-start --name sympa-bulk sympa-bulk.service
	dh_installsystemd --no-start --name sympa-task_manager sympa-task_manager.service
	dh_installsystemd --no-start --name wwsympa wwsympa.service
	dh_installsystemd --name wwsympa wwsympa.socket
	dh_installsystemd --no-start --name sympasoap sympasoap.service
	dh_installsystemd --no-start --name sympasoap sympasoap.socket

override_dh_installinit:
	dh_installinit --name sympa
	dh_installinit --noscripts --name sympa-bounced
	dh_installinit --noscripts --name sympa-archived
	dh_installinit --noscripts --name sympa-bulk
	dh_installinit --noscripts --name sympa-task_manager

override_dh_clean:
	dh_clean
	debconf-updatepo
	rm -f po/*/*.gmo
	rm -f po/*/stamp-po
	rm -f config.status.lineno
	rm -rf $(DEBDIR)/dbconfig-common/install
	# Remove files not present in the DFSG repacked tarball
	rm -rf \
		www/js/jquery.js \
		www/js/jquery-migrate.js \
		www/js/jquery-ui \
		www/js/jquery-minicolors \
		www/js/jquery-ui.css
	# Restore upstream stuff
	for file in $(UPSTREAMSTUFF); do \
		if [ -e $$file.upstream ] ; then \
			rm -f $$file; \
			mv $$file.upstream $$file; \
		fi \
	done

%:
	dh $@ --with autoreconf