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-plugins-extra
69 cp -r plugins $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/
70 cp -r $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/*/etc/* $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/etc/
71 rm -rf $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/*/etc/*
72 rm -rf $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/*/debian
73 ln -s /var/lib/gforge/www/plugins $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/www
74 chown www-data:www-data $(CURDIR)/debian/gforge-plugins-extra/var/lib/gforge/www/plugins
75 chmod 755 $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/*/sbin/*
76 chmod 755 $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/*/bin/*
77 rm -f $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/*/COPYING
79 cp -r $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/mediawiki/usr $(CURDIR)/debian/gforge-plugins-extra/
80 rm -rf $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/mediawiki/usr
81 mv $(CURDIR)/debian/gforge-plugins-extra/usr/share/mediawiki1.7/LocalLdapSettings.php \
82 $(CURDIR)/debian/gforge-plugins-extra/usr/share/mediawiki1.7/LocalLdapSettings.php.example
83 mv $(CURDIR)/debian/gforge-plugins-extra/usr/share/mediawiki1.7/LocalSettings.php \
84 $(CURDIR)/debian/gforge-plugins-extra/usr/share/mediawiki1.7/LocalSettings.php.gforge_example
85 mv $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/mediawiki/README $(CURDIR)/debian/gforge-plugins-extra/usr/share/doc/gforge-plugins-extra/README.mediawiki
87 chmod +x $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/svntracker/postcommit.example
89 chmod +x $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/fckeditor/www/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl
90 chmod +x $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/fckeditor/www/editor/filemanager/browser/mcpuk/connectors/php/Commands/helpers/*.cgi
92 mv $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/webcalendar/www/includes/settings.php \
93 $(CURDIR)/debian/gforge-plugins-extra/var/lib/gforge/www/plugins/webcalendar/www/includes
94 chown www-data $(CURDIR)/debian/gforge-plugins-extra/var/lib/gforge/www/plugins/webcalendar/www/includes/settings.php
95 chmod 600 $(CURDIR)/debian/gforge-plugins-extra/var/lib/gforge/www/plugins/webcalendar/www/includes/settings.php
96 chmod 755 $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/webcalendar/www/tools/send_reminders.php
97 chmod 755 $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/quota_management/cronjobs/quota_update.pl
98 ln -s /var/lib/gforge/www/plugins/webcalendar/www/includes/settings.php \
99 $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/webcalendar/www/includes/settings.php
100 chmod +x $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/webcalendar/www/tools/*.pl
102 # Remove files that are in other packages
103 rm -r $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/scmcvs/
104 rm -r $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/scmsvn/
106 # gforge-plugin-scmcvs
107 install -m 755 deb-specific/install-cvs.sh $(CURDIR)/debian/gforge-plugin-scmcvs/usr/lib/gforge/bin/
108 cp -r deb-specific/scmcvs/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/share/gforge/plugins/scmcvs/cronjobs
109 cp -r plugins/scmcvs/bin/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/lib/gforge/plugins/scmcvs/bin/
110 cp -r plugins/scmcvs/common/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/share/gforge/plugins/scmcvs/common/
111 cp -r plugins/scmcvs/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/share/gforge/plugins/scmcvs/cronjobs/
112 cp -r plugins/scmcvs/etc/plugins/scmcvs/* $(CURDIR)/debian/gforge-plugin-scmcvs/etc/gforge/plugins/scmcvs/
114 # gforge-plugin-scmsvn
115 install -m 755 deb-specific/install-svn.sh $(CURDIR)/debian/gforge-plugin-scmsvn/usr/lib/gforge/bin/
116 cp -r deb-specific/scmsvn/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/cronjobs
117 cp -r plugins/scmsvn/bin/* $(CURDIR)/debian/gforge-plugin-scmsvn/usr/lib/gforge/plugins/scmsvn/bin/
118 cp -r plugins/scmsvn/common/* $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/common/
119 cp -r plugins/scmsvn/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/cronjobs/
120 rm -f $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/cronjobs/README
121 find $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/cronjobs/ -type f | xargs chmod 0755
122 cp -r plugins/scmsvn/etc/plugins/scmsvn/* $(CURDIR)/debian/gforge-plugin-scmsvn/etc/gforge/plugins/scmsvn/
125 install -m 644 etc/httpd.d/[0-9][0-9]* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/httpd.d/
126 install -m 644 etc/httpd.d/httpd* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/httpd.d/
127 install -m 644 etc/local.d/[0-9][0-9]* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/local.d/
128 install -m 644 etc/templates/*\.* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/templates/
129 install -m 755 setup $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
130 install -m 755 deb-specific/cvssh.pl $(CURDIR)/debian/gforge-common/bin/cvssh
132 install -m 755 deb-specific/install-chroot.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
133 install -m 755 deb-specific/install-ssh.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
134 install -m 755 utils/fill-in-the-blanks.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
135 install -m 755 deb-specific/gforge-config $(CURDIR)/debian/gforge-common/usr/sbin/
136 install -m 644 utils/include.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/lib/
138 install -m 755 deb-specific/user_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
139 install -m 755 deb-specific/group_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
140 # install -m 644 cronjobs/cvs-cron/default_page.php $(CURDIR)/debian/gforge-common/usr/lib/gforge/lib/
141 install -m 755 deb-specific/ssh_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
143 install -m 755 deb-specific/update-user-group-cvs.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
145 cp -r common $(CURDIR)/debian/gforge-common/usr/share/gforge/
146 ln -s database-pgsql.php $(CURDIR)/debian/gforge-common/usr/share/gforge/common/include/database.php
147 find $(CURDIR)/debian/gforge-common/usr/share/gforge/common -type d -exec chmod 0755 {} \;
148 find $(CURDIR)/debian/gforge-common/usr/share/gforge/common -type f -exec chmod 0644 {} \;
149 find $(CURDIR)/debian/gforge-common/usr/share/gforge/common/docman/engine/ -type f -name \*.php -not -name \*.inc.php -exec chmod 0755 {} \;
150 find $(CURDIR)/debian/gforge-common/usr/share/gforge/common/docman/engine/ -type f -name \*.sh -exec chmod 0755 {} \;
151 cp -r locales/* $(CURDIR)/debian/gforge-common/usr/share/locale/
153 # gforge/debian/gforge-web-apache2
154 install -m 644 $(CURDIR)/debian/gforge-web-apache2.overrides $(CURDIR)/debian/gforge-web-apache2/usr/share/lintian/overrides/gforge-web-apache2
155 cp -r www $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/
156 install -m 644 deb-specific/index_std.php $(CURDIR)/debian/gforge-web-apache2/etc/gforge/custom/
157 rm $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/index_std.php
158 find $(CURDIR)/debian/gforge-web-apache2 -name \*.uu -type f | xargs rm -f
159 rm -f $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/themes/gforge/COPYING
160 find $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www -type d -exec chmod 0755 {} \;
161 find $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www -type f -exec chmod 0644 {} \;
162 find $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www -name '*.py' -exec chmod 0755 {} \;
163 # Remove empty theme directories
164 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
166 install -o www-data -m 755 -d $(CURDIR)/debian/gforge-web-apache2/var/cache/gforge
167 install -m 755 utils/install-apache.sh $(CURDIR)/debian/gforge-web-apache2/usr/lib/gforge/bin/
168 install -m 755 deb-specific/create-vhosts.sh $(CURDIR)/debian/gforge-web-apache2/usr/lib/gforge/bin/
169 install -m 755 deb-specific/prepare-vhosts-file.pl $(CURDIR)/debian/gforge-web-apache2/usr/lib/gforge/bin/
170 install -m 644 deb-specific/index_std.php $(CURDIR)/debian/gforge-web-apache2/etc/gforge/custom/
175 find $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/scm/viewvc -type f -exec chmod 0644 {} \;
176 grep -ril '^#!' $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/scm/viewvc | xargs chmod 0755
179 #chmod 0755 $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/dojo/src/storage/storage.sh
181 # move some files from gforge/debian/gforge-web-apache2 to gforge-common as there are needed by postgress upgrade
182 # these files should be moved one day in common/
184 mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/languages \
185 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
186 mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/squal_pre.php \
187 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
188 mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/squal_exit.php \
189 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
190 mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/pre.php \
191 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
192 mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/BaseLanguage.class.php \
193 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
194 mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/vote_function.php \
195 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
197 # gforge-db-postgresql
198 install -m 644 $(CURDIR)/debian/gforge-db-postgresql.overrides $(CURDIR)/debian/gforge-db-postgresql/usr/share/lintian/overrides/gforge-db-postgresql
199 install -m 644 deb-specific/sf-2.6-complete.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
200 install -m 644 deb-specific/sf2.5-to-sf2.6.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
202 install -m 755 cronjobs/calculate_user_metric.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
203 install -m 755 cronjobs/db_trove_maint.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
204 install -m 755 cronjobs/project_cleanup.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
205 install -m 755 cronjobs/rating_stats.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
206 install -m 755 cronjobs/db_project_sums.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
207 install -m 755 cronjobs/check_stale_tracker_items.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
208 install -m 755 cronjobs/project_weekly_metric.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
209 install -m 755 cronjobs/rotate_activity.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
211 install -m 755 cronjobs/site_stats.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
212 install -m 644 cronjobs/stats_site.inc $(CURDIR)/debian/gforge-db-postgresql/usr/share/gforge/cronjobs/
213 install -m 644 cronjobs/stats_projects.inc $(CURDIR)/debian/gforge-db-postgresql/usr/share/gforge/cronjobs/
215 install -m 755 cronjobs/reporting_cron.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
217 install -m 755 cronjobs/db_stats_agg.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
218 install -m 755 cronjobs/massmail.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
219 install -m 755 cronjobs/vacuum.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
220 install -m 755 cronjobs/gforge-db-backup.sh $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
222 install -m 755 cronjobs/ftp_create_group_access.php $(CURDIR)/debian/gforge-ftp-proftpd/usr/lib/gforge/bin/
224 install -m 755 deb-specific/stats_projects_logparse.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
225 install -m 755 deb-specific/get_news_notapproved.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
226 install -m 755 deb-specific/install-db.sh $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
227 install -m 755 deb-specific/db-upgrade.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
228 install -m 644 deb-specific/sqlparser.pm $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/lib/
229 install -m 644 deb-specific/sqlhelper.pm $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/lib/
230 install -m 755 deb-specific/sf-add-skill $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
231 install -m 755 deb-specific/register-theme $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
232 install -m 755 deb-specific/unregister-theme $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
234 install -m 755 deb-specific/register-plugin $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
235 install -m 755 deb-specific/unregister-plugin $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
237 install -m 644 deb-specific/view_bug.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
238 install -m 644 deb-specific/view_patch.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
240 install -m 644 db/20021125.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
241 install -m 644 db/200212*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
242 install -m 644 db/2003*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
243 install -m 755 db/2004*php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
244 install -m 644 db/2004*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
245 install -m 755 db/2005*php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
246 install -m 644 db/2005*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
247 install -m 644 db/2006*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
248 install -m 644 db/timetracking-init.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
249 install -m 644 db/20070924-forum-perm.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
250 install -m 644 db/20070924-project-perm.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
251 install -m 644 db/20070924-artifact-perm.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
254 install -m 755 deb-specific/install-exim4.sh $(CURDIR)/debian/gforge-mta-exim4/usr/lib/gforge/bin/
257 install -m 755 deb-specific/install-postfix.sh $(CURDIR)/debian/gforge-mta-postfix/usr/lib/gforge/bin/
259 # gforge-shell-postgresql
260 install -m 755 deb-specific/install-nsspgsql.sh $(CURDIR)/debian/gforge-shell-postgresql/usr/lib/gforge/bin/
263 install -m 755 deb-specific/install-ftp.sh $(CURDIR)/debian/gforge-ftp-proftpd/usr/lib/gforge/bin/
264 install -m 644 deb-specific/sf-proftpd.conf $(CURDIR)/debian/gforge-ftp-proftpd/etc/gforge/
267 install -m 644 $(CURDIR)/debian/gforge-dns-bind9.overrides $(CURDIR)/debian/gforge-dns-bind9/usr/share/lintian/overrides/gforge-dns-bind9
268 install -m 755 deb-specific/install-dns.sh $(CURDIR)/debian/gforge-dns-bind9/usr/lib/gforge/bin/
269 install -m 644 deb-specific/dns.head.template $(CURDIR)/debian/gforge-dns-bind9/var/lib/gforge/bind/
270 install -m 644 deb-specific/dns.simple.template $(CURDIR)/debian/gforge-dns-bind9/var/lib/gforge/bind/
271 install -m 755 deb-specific/dns_conf.pl $(CURDIR)/debian/gforge-dns-bind9/usr/lib/gforge/bin/
273 # gforge-lists-mailman
274 install -m 755 deb-specific/create-mailing-lists.pl $(CURDIR)/debian/gforge-lists-mailman/usr/lib/gforge/bin/
275 install -m 755 deb-specific/fix-mailing-lists.pl $(CURDIR)/debian/gforge-lists-mailman/usr/lib/gforge/bin/
277 # Remove Snoopy class from binary packages (provided by libphp-snoopy)
278 for i in $(addprefix $(CURDIR)/debian/,$(shell dh_listpackages)) ; do find $$i -name Snoopy.class.php | xargs rm -rf ; done
280 # Remove potential SCM artefacts from binary packages
281 for i in $(addprefix $(CURDIR)/debian/,$(shell dh_listpackages)) ; do find $$i -name .svn -or -name {arch} -or -name .arch-ids -or -name .bzr | xargs rm -rf ; done
283 binary-indep: build install
297 dh_installchangelogs ChangeLog
310 binary-arch: build install
311 # (No architecture-dependent files for Gforge, doing nothing here)
313 binary: binary-indep binary-arch
314 .PHONY: build clean binary-indep binary-arch binary install configure remove-binary-files patch unpatch