2 # debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess (sample file)
4 # Copyright 2000 to 2002 by Roland Mas and Christian Bayle for the Sourceforge package
5 # Copyright 2002 to 2003 by Roland Mas and Christian Bayle for the Gforge package
7 # Uncomment this to turn on verbose mode.
11 include /usr/share/dpatch/dpatch.make
14 # Remove files in contrib, especially binaries that break dpkg-source
15 # find contrib/ -name CVS -prune -not -name CVS -or -type f | xargs rm -f
17 # rm -f www/themes/gforge/images/es_*
18 sh $(CURDIR)/deb-specific/manage-uufiles.sh clean
20 configure: configure-stamp debian/po/templates.pot
21 configure-stamp: remove-binary-files
26 debian/po/templates.pot: $(wildcard debian/*.templates) $(wildcard debian/*.templates.dsfh-in) $(wildcard debian/dsf-helper/*.templates)
29 build: configure-stamp build-stamp
33 # Build man pages from Docbook sources
34 /usr/bin/docbook-to-man debian/cvssh.sgml > cvssh.1
35 /usr/bin/docbook-to-man debian/gforge-config.sgml > gforge-config.1
37 # Uudecode binary files
38 sh $(CURDIR)/deb-specific/manage-uufiles.sh decode
40 # Build gettext *.mo files
41 for l in eu bg ca zh_TW nl en eo fr de el he id it ja ko la nb pl pt_BR pt ru zh_CN es sv th ; do mkdir -p locales/$$l/LC_MESSAGES && msgfmt -o locales/$$l/LC_MESSAGES/gforge.mo translations/$$l.po ; done
45 clean: remove-binary-files unpatch
48 rm -f build-stamp configure-stamp
49 rm -f cvssh.1 gforge-config.1
53 perl $(CURDIR)/deb-specific/dsf-helper.pl --clean
62 # Preprocess files with DSF-Helper
63 perl $(CURDIR)/deb-specific/dsf-helper.pl
66 # (gforge is a meta-package and needs no files)
68 # gforge-plugin-scmcvs
69 install -m 755 deb-specific/install-cvs.sh $(CURDIR)/debian/gforge-plugin-scmcvs/usr/lib/gforge/plugins/scmcvs/bin/
70 install -m 755 deb-specific/update-user-group-ssh.sh $(CURDIR)/debian/gforge-plugin-scmcvs/usr/lib/gforge/plugins/scmcvs/bin/
71 cp -r deb-specific/scmcvs/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/share/gforge/plugins/scmcvs/cronjobs
72 cp -r plugins/scmcvs/bin/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/lib/gforge/plugins/scmcvs/bin/
73 cp -r plugins/scmcvs/sbin/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/share/gforge/plugins/scmcvs/sbin/
74 chmod 755 $(CURDIR)/debian/gforge-plugin-scmcvs/usr/share/gforge/plugins/scmcvs/sbin/*
75 cp -r plugins/scmcvs/common/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/share/gforge/plugins/scmcvs/common/
76 cp -r plugins/scmcvs/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/share/gforge/plugins/scmcvs/cronjobs/
77 cp -r plugins/scmcvs/etc/plugins/scmcvs/* $(CURDIR)/debian/gforge-plugin-scmcvs/etc/gforge/plugins/scmcvs/
79 # gforge-plugin-scmsvn
80 install -m 755 deb-specific/install-svn.sh $(CURDIR)/debian/gforge-plugin-scmsvn/usr/lib/gforge/plugins/scmsvn/bin/
81 cp -r deb-specific/scmsvn/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/cronjobs
82 cp -r plugins/scmsvn/bin/* $(CURDIR)/debian/gforge-plugin-scmsvn/usr/lib/gforge/plugins/scmsvn/bin/
83 cp -r plugins/scmsvn/common/* $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/common/
84 cp -r plugins/scmsvn/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/cronjobs/
85 rm -f $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/cronjobs/README
86 find $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/cronjobs/ -type f | xargs chmod 0755
87 cp -r plugins/scmsvn/etc/plugins/scmsvn/* $(CURDIR)/debian/gforge-plugin-scmsvn/etc/gforge/plugins/scmsvn/
89 # gforge-plugin-scmbzr
90 # cp -r plugins/scmbzr/bin/* $(CURDIR)/debian/gforge-plugin-scmbzr/usr/lib/gforge/plugins/scmbzr/bin/
91 cp -r plugins/scmbzr/common/* $(CURDIR)/debian/gforge-plugin-scmbzr/usr/share/gforge/plugins/scmbzr/common/
92 # cp -r plugins/scmbzr/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmbzr/usr/share/gforge/plugins/scmbzr/cronjobs/
93 cp -r plugins/scmbzr/etc/plugins/scmbzr/* $(CURDIR)/debian/gforge-plugin-scmbzr/etc/gforge/plugins/scmbzr/
95 # gforge-plugin-mediawiki
96 cp -r plugins/mediawiki/common/* $(CURDIR)/debian/gforge-plugin-mediawiki/usr/share/gforge/plugins/mediawiki/common/
97 cp -r plugins/mediawiki/www/* $(CURDIR)/debian/gforge-plugin-mediawiki/usr/share/gforge/www/plugins/mediawiki/
98 cp -r plugins/mediawiki/mediawiki-skin/* $(CURDIR)/debian/gforge-plugin-mediawiki/usr/share/mediawiki/skins/
99 cp -r plugins/mediawiki/etc/httpd.d/* $(CURDIR)/debian/gforge-plugin-mediawiki/usr/share/gforge/etc/httpd.d/
100 ln -s /usr/share/mediawiki/skins/gforge/loader.php $(CURDIR)/debian/gforge-plugin-mediawiki/etc/mediawiki-extensions/extensions-available/GforgeAuth.php
103 install -m 644 etc/httpd.d/[0-9][0-9]* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/httpd.d/
104 install -m 644 etc/httpd.d/httpd* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/httpd.d/
105 install -m 644 etc/local.d/[0-9][0-9]* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/local.d/
106 install -m 644 etc/templates/*\.* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/templates/
107 install -m 755 setup $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
108 install -m 755 deb-specific/cvssh.pl $(CURDIR)/debian/gforge-common/bin/cvssh
110 install -m 755 deb-specific/install-chroot.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
111 install -m 755 deb-specific/install-ssh.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
112 install -m 755 utils/fill-in-the-blanks.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
113 install -m 755 deb-specific/gforge-config $(CURDIR)/debian/gforge-common/usr/sbin/
114 install -m 644 utils/include.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/lib/
116 install -m 755 deb-specific/user_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
117 install -m 755 deb-specific/group_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
118 # install -m 644 cronjobs/cvs-cron/default_page.php $(CURDIR)/debian/gforge-common/usr/lib/gforge/lib/
119 install -m 755 deb-specific/ssh_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
121 install -m 755 deb-specific/update-user-group-ssh.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
123 cp -r common $(CURDIR)/debian/gforge-common/usr/share/gforge/
124 ln -s database-pgsql.php $(CURDIR)/debian/gforge-common/usr/share/gforge/common/include/database.php
125 find $(CURDIR)/debian/gforge-common/usr/share/gforge/common -type d -exec chmod 0755 {} \;
126 find $(CURDIR)/debian/gforge-common/usr/share/gforge/common -type f -exec chmod 0644 {} \;
127 find $(CURDIR)/debian/gforge-common/usr/share/gforge/common/docman/engine/ -type f -name \*.php -not -name \*.inc.php -exec chmod 0755 {} \;
128 find $(CURDIR)/debian/gforge-common/usr/share/gforge/common/docman/engine/ -type f -name \*.sh -exec chmod 0755 {} \;
129 install -m 755 cronjobs/create_scm_repos.php $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
130 cp -r locales/* $(CURDIR)/debian/gforge-common/usr/share/locale/
132 # gforge/debian/gforge-web-apache2
133 cp -r www $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/
134 rm $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/plugins/mediawiki
135 rm $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/plugins/*
136 install -m 644 www/index_std.php $(CURDIR)/debian/gforge-web-apache2/etc/gforge/custom/
137 find $(CURDIR)/debian/gforge-web-apache2 -name \*.uu -type f | xargs rm -f
138 rm -f $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/themes/gforge/COPYING
139 find $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www -type d -exec chmod 0755 {} \;
140 find $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www -type f -exec chmod 0644 {} \;
141 find $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www -name '*.py' -exec chmod 0755 {} \;
142 # Remove empty theme directories
143 for i in $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/themes/* ; do [ -d $$i ] && [ $$(find $$i -type f | wc -l) = 0 ] && rm -rf $$i || true ; done
145 install -o www-data -m 755 -d $(CURDIR)/debian/gforge-web-apache2/var/cache/gforge
146 install -m 755 utils/install-apache.sh $(CURDIR)/debian/gforge-web-apache2/usr/lib/gforge/bin/
147 install -m 755 deb-specific/create-vhosts.sh $(CURDIR)/debian/gforge-web-apache2/usr/lib/gforge/bin/
148 install -m 755 deb-specific/prepare-vhosts-file.pl $(CURDIR)/debian/gforge-web-apache2/usr/lib/gforge/bin/
151 find $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/scm/viewvc -type f -exec chmod 0644 {} \;
152 grep -ril '^#!' $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/scm/viewvc | xargs chmod 0755
155 #chmod 0755 $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/dojo/src/storage/storage.sh
157 # move some files from gforge/debian/gforge-web-apache2 to gforge-common as there are needed by postgress upgrade
158 # these files should be moved one day in common/
160 mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/squal_pre.php \
161 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
162 mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/squal_exit.php \
163 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
164 mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/pre.php \
165 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
166 mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/vote_function.php \
167 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
169 # gforge-db-postgresql
170 install -m 644 deb-specific/sf-2.6-complete.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
171 install -m 644 deb-specific/sf2.5-to-sf2.6.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
173 install -m 755 cronjobs/calculate_user_metric.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
174 install -m 755 cronjobs/db_trove_maint.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
175 install -m 755 cronjobs/project_cleanup.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
176 install -m 755 cronjobs/rating_stats.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
177 install -m 755 cronjobs/db_project_sums.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
178 install -m 755 cronjobs/check_stale_tracker_items.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
179 install -m 755 cronjobs/project_weekly_metric.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
180 install -m 755 cronjobs/rotate_activity.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
182 install -m 755 cronjobs/site_stats.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
183 install -m 644 cronjobs/stats_site.inc $(CURDIR)/debian/gforge-db-postgresql/usr/share/gforge/cronjobs/
184 install -m 644 cronjobs/stats_projects.inc $(CURDIR)/debian/gforge-db-postgresql/usr/share/gforge/cronjobs/
186 install -m 755 cronjobs/reporting_cron.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
188 install -m 755 cronjobs/db_stats_agg.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
189 install -m 755 cronjobs/massmail.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
190 install -m 755 cronjobs/vacuum.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
191 install -m 755 cronjobs/gforge-db-backup.sh $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
193 install -m 755 cronjobs/ftp_create_group_access.php $(CURDIR)/debian/gforge-ftp-proftpd/usr/lib/gforge/bin/
195 install -m 755 deb-specific/stats_projects_logparse.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
196 install -m 755 deb-specific/get_news_notapproved.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
197 install -m 755 deb-specific/install-db.sh $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
198 install -m 755 deb-specific/db-upgrade.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
199 install -m 644 deb-specific/sqlparser.pm $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/lib/
200 install -m 644 deb-specific/sqlhelper.pm $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/lib/
201 install -m 755 deb-specific/sf-add-skill $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
202 install -m 755 deb-specific/register-theme $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
203 install -m 755 deb-specific/unregister-theme $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
205 install -m 755 deb-specific/register-plugin $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
206 install -m 755 deb-specific/unregister-plugin $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
208 install -m 644 deb-specific/view_bug.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
209 install -m 644 deb-specific/view_patch.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
211 install -m 644 db/20021125.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
212 install -m 644 db/200212*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
213 install -m 644 db/2003*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
214 install -m 755 db/2004*php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
215 install -m 644 db/2004*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
216 install -m 755 db/2005*php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
217 install -m 644 db/2005*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
218 install -m 644 db/2006*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
219 install -m 644 db/timetracking-init.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
220 install -m 644 db/20070924-forum-perm.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
221 install -m 644 db/20070924-project-perm.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
222 install -m 644 db/20070924-artifact-perm.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
225 install -m 755 deb-specific/install-exim4.sh $(CURDIR)/debian/gforge-mta-exim4/usr/lib/gforge/bin/
228 install -m 755 deb-specific/install-postfix.sh $(CURDIR)/debian/gforge-mta-postfix/usr/lib/gforge/bin/
230 # gforge-shell-postgresql
231 install -m 755 utils/install-nsspgsql.sh $(CURDIR)/debian/gforge-shell-postgresql/usr/lib/gforge/bin/
234 install -m 755 deb-specific/install-ftp.sh $(CURDIR)/debian/gforge-ftp-proftpd/usr/lib/gforge/bin/
235 install -m 644 deb-specific/sf-proftpd.conf $(CURDIR)/debian/gforge-ftp-proftpd/etc/gforge/
238 install -m 755 deb-specific/install-dns.sh $(CURDIR)/debian/gforge-dns-bind9/usr/lib/gforge/bin/
239 install -m 644 deb-specific/dns.head.template $(CURDIR)/debian/gforge-dns-bind9/var/lib/gforge/bind/
240 install -m 644 deb-specific/dns.simple.template $(CURDIR)/debian/gforge-dns-bind9/var/lib/gforge/bind/
241 install -m 755 deb-specific/dns_conf.pl $(CURDIR)/debian/gforge-dns-bind9/usr/lib/gforge/bin/
243 # gforge-lists-mailman
244 install -m 755 deb-specific/create-mailing-lists.pl $(CURDIR)/debian/gforge-lists-mailman/usr/lib/gforge/bin/
245 install -m 755 deb-specific/fix-mailing-lists.pl $(CURDIR)/debian/gforge-lists-mailman/usr/lib/gforge/bin/
247 # Remove Snoopy class from binary packages (provided by libphp-snoopy)
248 for i in $(addprefix $(CURDIR)/debian/,$(shell dh_listpackages)) ; do find $$i -name Snoopy.class.php | xargs rm -rf ; done
250 # Remove potential SCM artefacts from binary packages
251 for i in $(addprefix $(CURDIR)/debian/,$(shell dh_listpackages)) ; do find $$i -name .svn -or -name {arch} -or -name .arch-ids -or -name .bzr -or -name .cvsignore | xargs rm -rf ; done
252 # Also remove uuencoded files
253 for i in $(addprefix $(CURDIR)/debian/,$(shell dh_listpackages)) ; do find $$i -name \*.uu | xargs echo rm ; done
255 binary-indep: build install
269 dh_installchangelogs ChangeLog
282 binary-arch: build install
283 # (No architecture-dependent files for Gforge, doing nothing here)
285 binary: binary-indep binary-arch
286 .PHONY: build clean binary-indep binary-arch binary install configure remove-binary-files patch unpatch