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.
10 # This is the debhelper compatability version to use.
14 include /usr/share/dpatch/dpatch.make
17 # Remove files in contrib, especially binaries that break dpkg-source
18 # find contrib/ -name CVS -prune -not -name CVS -or -type f | xargs rm -f
20 # rm -f www/themes/gforge/images/es_*
21 sh $(CURDIR)/deb-specific/manage-uufiles.sh clean
23 configure: configure-stamp debian/po/templates.pot
24 configure-stamp: remove-binary-files
29 debian/po/templates.pot: $(wildcard debian/*.templates) $(wildcard debian/*.templates.dsfh-in) $(wildcard debian/dsf-helper/*.templates)
32 build: configure-stamp build-stamp
36 # Build man pages from Docbook sources
37 /usr/bin/docbook-to-man debian/cvssh.sgml > cvssh.1
38 /usr/bin/docbook-to-man debian/gforge-config.sgml > gforge-config.1
40 # Uudecode binary files
41 sh $(CURDIR)/deb-specific/manage-uufiles.sh decode
45 clean: remove-binary-files unpatch
48 rm -f build-stamp configure-stamp
49 rm -f cvssh.1 gforge-config.1
51 perl $(CURDIR)/deb-specific/dsf-helper.pl --clean
60 # Preprocess files with DSF-Helper
61 perl $(CURDIR)/deb-specific/dsf-helper.pl
64 # (gforge is a meta-package and needs no files)
67 cp -r plugins $(CURDIR)/debian/gforge-common/usr/share/gforge/
68 cp -r $(CURDIR)/debian/gforge-common/usr/share/gforge/plugins/*/etc/* $(CURDIR)/debian/gforge-common/etc/gforge/
69 rm -rf $(CURDIR)/debian/gforge-common/usr/share/gforge/plugins/*/etc/*
70 rm -rf $(CURDIR)/debian/gforge-common/usr/share/gforge/plugins/*/debian
71 mkdir $(CURDIR)/debian/gforge-common/usr/share/gforge/www/plugins
72 chown www-data:www-data $(CURDIR)/debian/gforge-common/usr/share/gforge/www/plugins
75 install -m 644 etc/httpd.d/[0-9][0-9]* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/httpd.d/
76 install -m 644 etc/httpd.d/httpd* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/httpd.d/
77 install -m 644 etc/local.d/[0-9][0-9]* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/local.d/
78 install -m 644 etc/templates/*\.* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/templates/
79 install -m 755 setup $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
80 install -m 755 deb-specific/cvssh.pl $(CURDIR)/debian/gforge-common/bin/cvssh
82 install -m 755 deb-specific/install-chroot.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
83 install -m 755 deb-specific/install-ssh.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
84 install -m 755 utils/fill-in-the-blanks.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
85 install -m 755 deb-specific/gforge-config $(CURDIR)/debian/gforge-common/usr/sbin/
86 install -m 644 utils/include.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/lib/
88 install -m 755 deb-specific/user_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
89 install -m 755 deb-specific/group_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
90 # install -m 644 cronjobs/cvs-cron/default_page.php $(CURDIR)/debian/gforge-common/usr/lib/gforge/lib/
91 install -m 755 deb-specific/ssh_dump_update.pl $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
93 install -m 755 deb-specific/update-user-group-cvs.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
95 cp -r common $(CURDIR)/debian/gforge-common/usr/share/gforge/
96 find $(CURDIR)/debian/gforge-common/usr/share/gforge/ -name CVS -type d | xargs rm -rf
97 cp -r common $(CURDIR)/debian/gforge-common/usr/share/gforge/
98 find $(CURDIR)/debian/gforge-common/usr/share/gforge/common -type d -exec chmod 0755 {} \;
99 find $(CURDIR)/debian/gforge-common/usr/share/gforge/common -type f -exec chmod 0644 {} \;
102 install -m 644 $(CURDIR)/debian/gforge-web-apache.overrides $(CURDIR)/debian/gforge-web-apache/usr/share/lintian/overrides/gforge-web-apache
103 cp -r www $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/
104 install -m 644 deb-specific/index_std.php $(CURDIR)/debian/gforge-web-apache/etc/gforge/custom/
105 rm $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/index_std.php
106 find $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/ -name CVS -type d | xargs rm -rf
107 find $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/ -name .cvsignore | xargs rm -f
108 find $(CURDIR)/debian/gforge-web-apache -name \*.uu -type f | xargs rm -f
109 find $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www -type d -exec chmod 0755 {} \;
110 find $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www -type f -exec chmod 0644 {} \;
111 find $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www -name '*.py' -exec chmod 0755 {} \;
112 # Remove empty theme directories
113 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
115 install -o www-data -m 755 -d $(CURDIR)/debian/gforge-web-apache/var/cache/gforge
116 install -m 755 utils/install-apache.sh $(CURDIR)/debian/gforge-web-apache/usr/lib/gforge/bin/
117 install -m 755 deb-specific/create-vhosts.sh $(CURDIR)/debian/gforge-web-apache/usr/lib/gforge/bin/
118 install -m 755 deb-specific/prepare-vhosts-file.pl $(CURDIR)/debian/gforge-web-apache/usr/lib/gforge/bin/
123 find $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/scm/viewvc -type f -exec chmod 0644 {} \;
124 grep -ri '^#!' $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/scm/viewvc | grep -v '\.svn' | cut -d: -f1 | xargs chmod 0755
127 #chmod 0755 $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/dojo/src/storage/storage.sh
129 # move some files from gforge-web-apache to gforge-common as there are needed by postgress upgrade
130 # these files should be moved one day in common/
132 mv $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/include/languages \
133 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
134 mv $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/include/squal_pre.php \
135 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
136 mv $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/include/squal_exit.php \
137 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
138 mv $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/include/pre.php \
139 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
140 mv $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/include/BaseLanguage.class \
141 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
142 mv $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/include/vote_function.php \
143 $(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
146 cp -r $(CURDIR)/debian/gforge-web-apache/* $(CURDIR)/debian/gforge-web-apache2
148 # gforge-db-postgresql
149 install -m 644 $(CURDIR)/debian/gforge-db-postgresql.overrides $(CURDIR)/debian/gforge-db-postgresql/usr/share/lintian/overrides/gforge-db-postgresql
150 install -m 644 deb-specific/sf-2.6-complete.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
151 install -m 644 deb-specific/sf2.5-to-sf2.6.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
153 install -m 755 cronjobs/calculate_user_metric.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
154 install -m 755 cronjobs/db_trove_maint.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
155 install -m 755 cronjobs/project_cleanup.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
156 install -m 755 cronjobs/rating_stats.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
157 install -m 755 cronjobs/db_project_sums.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
158 install -m 755 cronjobs/check_stale_tracker_items.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
159 install -m 755 cronjobs/project_weekly_metric.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
160 install -m 755 cronjobs/rotate_activity.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
162 install -m 755 cronjobs/site_stats.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
163 install -m 644 cronjobs/stats_site.inc $(CURDIR)/debian/gforge-db-postgresql/usr/share/gforge/cronjobs/
164 install -m 644 cronjobs/stats_projects.inc $(CURDIR)/debian/gforge-db-postgresql/usr/share/gforge/cronjobs/
166 install -m 755 cronjobs/db_stats_agg.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
167 install -m 755 cronjobs/massmail.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
168 install -m 755 cronjobs/vacuum.php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
169 install -m 755 deb-specific/stats_projects_logparse.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
170 install -m 755 deb-specific/get_news_notapproved.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
171 install -m 755 deb-specific/install-db.sh $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
172 install -m 755 deb-specific/db-upgrade.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
173 install -m 644 deb-specific/sqlparser.pm $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/lib/
174 install -m 644 deb-specific/sqlhelper.pm $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/lib/
175 install -m 755 deb-specific/sf-add-skill $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
176 install -m 755 deb-specific/register-theme $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
177 install -m 755 deb-specific/unregister-theme $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
179 install -m 755 deb-specific/register-plugin $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
180 install -m 755 deb-specific/unregister-plugin $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
182 install -m 644 deb-specific/view_bug.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
183 install -m 644 deb-specific/view_patch.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
185 install -m 644 db/20021125.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
186 install -m 644 db/200212*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
187 install -m 644 db/2003*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
188 install -m 755 db/2004*php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
189 install -m 644 db/2004*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
190 install -m 755 db/2005*php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
191 install -m 644 db/2005*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
192 install -m 644 db/2006*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
193 # install -m 644 db/timetracking-init.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
196 install -m 755 deb-specific/install-exim.sh $(CURDIR)/debian/gforge-mta-exim/usr/lib/gforge/bin/
199 install -m 755 deb-specific/install-exim4.sh $(CURDIR)/debian/gforge-mta-exim4/usr/lib/gforge/bin/
202 install -m 755 deb-specific/install-postfix.sh $(CURDIR)/debian/gforge-mta-postfix/usr/lib/gforge/bin/
205 # not needed chroot is a symlink -> ../../../
206 #cd $(CURDIR)/debian/gforge-shell-ldap/var/lib/gforge/chroot/var/lib/gforge/chroot && ln -s ../../../../home .
208 # gforge-shell-postgresql
209 install -m 755 deb-specific/install-nsspgsql.sh $(CURDIR)/debian/gforge-shell-postgresql/usr/lib/gforge/bin/
212 install -m 755 deb-specific/install-ftp.sh $(CURDIR)/debian/gforge-ftp-proftpd/usr/lib/gforge/bin/
213 install -m 644 deb-specific/sf-proftpd.conf $(CURDIR)/debian/gforge-ftp-proftpd/etc/gforge/
215 # gforge-ldap-openldap
216 install -m 755 utils/ldap/sql2ldif.pl $(CURDIR)/debian/gforge-ldap-openldap/usr/lib/gforge/bin/
217 install -m 755 deb-specific/install-ldap.sh $(CURDIR)/debian/gforge-ldap-openldap/usr/lib/gforge/bin/
218 install -m 644 deb-specific/gforge.schema $(CURDIR)/debian/gforge-ldap-openldap/etc/gforge/
221 install -m 644 $(CURDIR)/debian/gforge-dns-bind9.overrides $(CURDIR)/debian/gforge-dns-bind9/usr/share/lintian/overrides/gforge-dns-bind9
222 install -m 755 deb-specific/install-dns.sh $(CURDIR)/debian/gforge-dns-bind9/usr/lib/gforge/bin/
223 install -m 644 deb-specific/dns.head.template $(CURDIR)/debian/gforge-dns-bind9/var/lib/gforge/bind/
224 install -m 644 deb-specific/dns.simple.template $(CURDIR)/debian/gforge-dns-bind9/var/lib/gforge/bind/
225 install -m 755 deb-specific/dns_conf.pl $(CURDIR)/debian/gforge-dns-bind9/usr/lib/gforge/bin/
227 # gforge-lists-mailman
228 install -m 755 deb-specific/create-mailing-lists.pl $(CURDIR)/debian/gforge-lists-mailman/usr/lib/gforge/bin/
229 install -m 755 deb-specific/fix-mailing-lists.pl $(CURDIR)/debian/gforge-lists-mailman/usr/lib/gforge/bin/
231 binary-indep: build install
245 dh_installchangelogs ChangeLog
258 binary-arch: build install
259 # (No architecture-dependent files for Gforge, doing nothing here)
261 binary: binary-indep binary-arch
262 .PHONY: build clean binary-indep binary-arch binary install configure remove-binary-files patch unpatch