File: rules

package info (click to toggle)
gforge 3.1-31sarge5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 9,148 kB
  • ctags: 11,865
  • sloc: sql: 27,860; php: 25,574; perl: 7,124; xml: 3,152; sh: 2,586; ansic: 315; makefile: 143
file content (240 lines) | stat: -rwxr-xr-x 13,628 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
#!/usr/bin/make -f
# debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess (sample file)
# Copyright 2000 to 2002 by Roland Mas and Christian Bayle for the Sourceforge package
# Copyright 2002 to 2003 by Roland Mas and Christian Bayle for the Gforge package

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

# This is the debhelper compatability version to use.
export DH_COMPAT=4

remove-binary-files:
	# Remove files in contrib, especially binaries that break dpkg-source
	find contrib/ -name CVS -prune -not -name CVS -or -type f | xargs rm -f
	# Also a few images
	rm -f www/themes/gforge/images/es_*

configure: configure-stamp debian/po/templates.pot
configure-stamp: remove-binary-files
	dh_testdir

	touch configure-stamp

debian/po/templates.pot: $(wildcard debian/*.templates) $(wildcard debian/*.templates.dsfh-in) $(wildcard debian/dsf-helper/*.templates)
	@debconf-updatepo

build: configure-stamp build-stamp
build-stamp:
	dh_testdir

	# Build man pages from Docbook sources
	/usr/bin/docbook-to-man debian/cvssh.sgml > cvssh.1
	/usr/bin/docbook-to-man debian/gforge-config.sgml > gforge-config.1

	# Uudecode binary files
	sh $(CURDIR)/deb-specific/manage-uufiles.sh decode

	touch build-stamp

clean: remove-binary-files
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	rm -f cvssh.1 gforge-config.1

	perl $(CURDIR)/deb-specific/dsf-helper.pl --clean
	sh $(CURDIR)/deb-specific/manage-uufiles.sh clean
	chmod g-s debian
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Preprocess files with DSF-Helper
	perl $(CURDIR)/deb-specific/dsf-helper.pl

	# gforge
	# (gforge is a meta-package and needs no files)

	# gforge-common
	install -m 644 deb-specific/local.inc.template $(CURDIR)/debian/gforge-common/etc/gforge/templates/
	install -m 644 deb-specific/local.pl.template $(CURDIR)/debian/gforge-common/etc/gforge/templates/
	install -m 644 deb-specific/database.inc.template $(CURDIR)/debian/gforge-common/etc/gforge/templates/
	install -m 644 deb-specific/httpd.conf.template $(CURDIR)/debian/gforge-common/etc/gforge/templates/
	install -m 644 deb-specific/httpd.common.template $(CURDIR)/debian/gforge-common/etc/gforge/templates/
	install -m 644 deb-specific/httpd.vhosts.template $(CURDIR)/debian/gforge-common/etc/gforge/templates/
	install -m 644 deb-specific/httpd.secrets.template $(CURDIR)/debian/gforge-common/etc/gforge/templates/
	install -m 755 deb-specific/install-chroot.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
	install -m 755 deb-specific/install-ssh.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
	install -m 755 deb-specific/fill-in-the-blanks.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
	install -m 755 deb-specific/gforge-config $(CURDIR)/debian/gforge-common/usr/sbin/
	install -m 644 utils/include.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/lib/

	install -m 755 deb-specific/user_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
	install -m 755 deb-specific/group_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
	install -m 755 deb-specific/ssh_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/

	install -m 4755 deb-specific/fileforge.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
	ln -sf fileforge.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/tmpfilemove.pl

	install -m 755 deb-specific/update-user-group-cvs.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/

	# gforge-web-apache
	cp -r www $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/
	install -m 644 deb-specific/index_std.php $(CURDIR)/debian/gforge-web-apache/etc/gforge/custom/
	rm $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/index_std.php
	# controller.php, controlleroo.php and viewFile.php disabled
	# (They seem to present security problems)
	rm $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/scm/controller.php
	rm $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/scm/controlleroo.php
	rm $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/scm/viewFile.php
	#cp $(CURDIR)/www/project/admin/qrs.php.debian $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/project/admin/qrs.php
	cp -r common $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/
	find $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/ -name CVS -type d | xargs rm -rf
	find $(CURDIR)/debian/gforge-web-apache -name \*.uu -type f | xargs rm -f
	find $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www -type d -exec chmod 0755 {} \;
	find $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www -type f -exec chmod 0644 {} \;
	find $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/common -type d -exec chmod 0755 {} \;
	find $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/common -type f -exec chmod 0644 {} \;
	# Remove empty theme directories
	for i in $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/themes/* ; do [ -d $$i ] && [ $$(find $$i -type f | wc -l) = 0 ] && rm -rf $$i || true ; done

	install -o www-data -m 755 -d $(CURDIR)/debian/gforge-web-apache/var/cache/gforge
	install -m 755 deb-specific/install-apache.sh $(CURDIR)/debian/gforge-web-apache/usr/lib/gforge/bin/
	install -m 755 deb-specific/create-vhosts.sh $(CURDIR)/debian/gforge-web-apache/usr/lib/gforge/bin/
	install -m 755 deb-specific/prepare-vhosts-file.pl $(CURDIR)/debian/gforge-web-apache/usr/lib/gforge/bin/

	# gforge-db-postgresql
	#NOT USED#install -m 644 db/SourceForge.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
	#install -m 644 db/trove_defaults.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
	#NOT USED#install -m 644 db/user_rating.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
	install -m 644 deb-specific/sf-2.6-complete.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
	install -m 644 deb-specific/sf2.5-to-sf2.6.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/

	install -m 755 cronjobs/db_trove_maint.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 cronjobs/project_cleanup.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	#install -m 755 cronjobs/project_metric.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 cronjobs/project_weekly_metric.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 cronjobs/rating_stats.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 cronjobs/site_stats.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 cronjobs/db_stats_agg.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 cronjobs/calculate_user_metric.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 deb-specific/stats_projects_logparse.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 cronjobs/vacuum.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 cronjobs/rotate_activity.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 cronjobs/db_project_sums.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 cronjobs/check_stale_tracker_items.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 cronjobs/massmail.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
#GF	install -m 755 cronjobs/stats/include/stats_site.inc $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/lib/
#GF	install -m 755 cronjobs/stats/include/stats_projects.inc $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/lib/

#GF	install utils/underworld-root/db_top_groups_calc.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/db_top_groups_calc.pl
	#install utils/underworld-root/stats_nightly.sh $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/stats_nightly.sh
	#install utils/underworld-root/db_stats_prepare.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/db_stats_prepare.pl
	#install utils/underworld-root/db_stats_projects_nightly.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/db_stats_projects_nightly.pl
	#install utils/underworld-root/db_stats_site_nightly.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/db_stats_site_nightly.pl
	install -m 755 deb-specific/install-db.sh $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 deb-specific/db-upgrade.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 644 deb-specific/sqlparser.pm $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/lib/
	install -m 755 deb-specific/sf-add-skill $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 deb-specific/register-theme $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
	install -m 755 deb-specific/unregister-theme $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/

	install -m 755 deb-specific/register-plugin $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
	install -m 755 deb-specific/unregister-plugin $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/

	install -m 644 deb-specific/view_bug.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
	install -m 644 deb-specific/view_patch.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/

	install -m 644 db/20021125.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
	install -m 644 db/200212*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
	install -m 644 db/2003*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/

	# gforge-mta-exim
	install -m 755 deb-specific/install-exim.sh $(CURDIR)/debian/gforge-mta-exim/usr/lib/gforge/bin/

	# gforge-mta-exim4
	install -m 755 deb-specific/install-exim4.sh $(CURDIR)/debian/gforge-mta-exim4/usr/lib/gforge/bin/

	# gforge-mta-postfix
	install -m 755 deb-specific/install-postfix.sh $(CURDIR)/debian/gforge-mta-postfix/usr/lib/gforge/bin/

	# gforge-shell-ldap
	cd $(CURDIR)/debian/gforge-shell-ldap/var/lib/gforge/chroot/var/lib/gforge/chroot && ln -s ../../../../home .

	# gforge-cvs
	install -m 755 deb-specific/stats_cvs.pl $(CURDIR)/debian/gforge-cvs/usr/lib/gforge/bin/
	install -m 755 deb-specific/install-cvs.sh $(CURDIR)/debian/gforge-cvs/usr/lib/gforge/bin/
	install -m 755 deb-specific/cvs-pserver $(CURDIR)/debian/gforge-cvs/usr/lib/gforge/bin/
	install -m 755 deb-specific/cvssh.pl $(CURDIR)/debian/gforge-cvs/bin/cvssh 
	install -m 755 deb-specific/cvsweb/cvsweb.cgi $(CURDIR)/debian/gforge-cvs/usr/lib/gforge/cgi-bin/
	install -m 644 deb-specific/cvsweb/icons/back.png $(CURDIR)/debian/gforge-cvs/usr/share/gforge/cvs/icons/back.png 
	install -m 644 deb-specific/cvsweb/icons/dir.png $(CURDIR)/debian/gforge-cvs/usr/share/gforge/cvs/icons/dir.png 
	install -m 644 deb-specific/cvsweb/icons/minidir.png $(CURDIR)/debian/gforge-cvs/usr/share/gforge/cvs/icons/minidir.png 
	install -m 644 deb-specific/cvsweb/icons/text.png $(CURDIR)/debian/gforge-cvs/usr/share/gforge/cvs/icons/text.png 
	install -m 644 deb-specific/cvsweb/icons/miniback.png $(CURDIR)/debian/gforge-cvs/usr/share/gforge/cvs/icons/miniback.png 
	install -m 644 deb-specific/cvsweb/icons/minitext.png $(CURDIR)/debian/gforge-cvs/usr/share/gforge/cvs/icons/minitext.png 
	install -m 644 deb-specific/cvsweb/cvsweb.conf $(CURDIR)/debian/gforge-cvs/etc/gforge/
	install -m 755 deb-specific/tarballs.sh $(CURDIR)/debian/gforge-cvs/usr/lib/gforge/bin/
	install -m 755 deb-specific/cvs_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
	# install -m 755 www/tarballs.php $(CURDIR)/debian/gforge-cvs/usr/share/gforge/cvs

	# gforge-ftp-proftpd
	install -m 755 deb-specific/install-ftp.sh $(CURDIR)/debian/gforge-ftp-proftpd/usr/lib/gforge/bin/
	install -m 644 deb-specific/sf-proftpd.conf $(CURDIR)/debian/gforge-ftp-proftpd/etc/gforge/

	# gforge-ldap-openldap
	install -m 755 utils/ldap/sql2ldif.pl $(CURDIR)/debian/gforge-ldap-openldap/usr/lib/gforge/bin/
	install -m 755 deb-specific/install-ldap.sh $(CURDIR)/debian/gforge-ldap-openldap/usr/lib/gforge/bin/
	install -m 644 deb-specific/gforge.schema $(CURDIR)/debian/gforge-ldap-openldap/etc/gforge/

	# gforge-dns-bind9
	install -m 755 deb-specific/install-dns.sh $(CURDIR)/debian/gforge-dns-bind9/usr/lib/gforge/bin/
	install -m 644 deb-specific/dns.head.template $(CURDIR)/debian/gforge-dns-bind9/var/lib/gforge/bind/
	install -m 644 deb-specific/dns.simple.template $(CURDIR)/debian/gforge-dns-bind9/var/lib/gforge/bind/
	install utils/underworld-dummy/dns_conf.pl $(CURDIR)/debian/gforge-dns-bind9/usr/lib/gforge/bin/

	# gforge-lists-mailman
	install -m 755 deb-specific/create-mailing-lists.pl $(CURDIR)/debian/gforge-lists-mailman/usr/lib/gforge/bin/
	install -m 755 deb-specific/fix-mailing-lists.pl $(CURDIR)/debian/gforge-lists-mailman/usr/lib/gforge/bin/

	# gforge-sourceforge-transition
	install -m 755 deb-specific/install-db.sh $(CURDIR)/debian/gforge-sourceforge-transition/usr/lib/gforge-sourceforge-transition/bin/

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdebconf	
	dh_installdocs
	#dh_installexamples
	#dh_installmenu
	#dh_installemacsen
	#dh_installpam
	#dh_installinit
	dh_installcron
	dh_installman
	#dh_installinfo
	#dh_undocumented
	dh_installchangelogs ChangeLog
	#dh_link
	dh_strip
	dh_compress
	#dh_fixperms
	#dh_makeshlibs
	dh_installdeb
	#dh_perl
	#dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: build install
	# (No architecture-dependent files for Gforge, doing nothing here)

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure remove-binary-files