# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-# This is the debhelper compatability version to use.
-export DH_COMPAT=4
-
PACKAGE=gforge
include /usr/share/dpatch/dpatch.make
# Uudecode binary files
sh $(CURDIR)/deb-specific/manage-uufiles.sh decode
+ # Build gettext *.mo files
+ 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
+
touch build-stamp
clean: remove-binary-files unpatch
rm -f build-stamp configure-stamp
rm -f cvssh.1 gforge-config.1
+ rm -rf locales/*
+
perl $(CURDIR)/deb-specific/dsf-helper.pl --clean
dh_clean
# gforge
# (gforge is a meta-package and needs no files)
+ # gforge-plugins-extra
+ cp -r plugins $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/
+ cp -r $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/*/etc/* $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/etc/
+ rm -rf $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/*/etc/*
+ rm -rf $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/*/debian
+ ln -s /var/lib/gforge/www/plugins $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/www
+ chown www-data:www-data $(CURDIR)/debian/gforge-plugins-extra/var/lib/gforge/www/plugins
+ chmod 755 $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/*/sbin/*
+ chmod 755 $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/*/bin/*
+ rm -f $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/*/COPYING
+ # mediawiki plugin
+ cp -r $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/mediawiki/usr $(CURDIR)/debian/gforge-plugins-extra/
+ rm -rf $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/mediawiki/usr
+ mv $(CURDIR)/debian/gforge-plugins-extra/usr/share/mediawiki1.7/LocalLdapSettings.php \
+ $(CURDIR)/debian/gforge-plugins-extra/usr/share/mediawiki1.7/LocalLdapSettings.php.example
+ mv $(CURDIR)/debian/gforge-plugins-extra/usr/share/mediawiki1.7/LocalSettings.php \
+ $(CURDIR)/debian/gforge-plugins-extra/usr/share/mediawiki1.7/LocalSettings.php.gforge_example
+ 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
+ # cvstracker plugin
+ chmod +x $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/svntracker/postcommit.example
+ # fckeditor plugin
+ chmod +x $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/fckeditor/www/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl
+ chmod +x $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/fckeditor/www/editor/filemanager/browser/mcpuk/connectors/php/Commands/helpers/*.cgi
+ # webcalendar plugin
+ mv $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/webcalendar/www/includes/settings.php \
+ $(CURDIR)/debian/gforge-plugins-extra/var/lib/gforge/www/plugins/webcalendar/www/includes
+ chown www-data $(CURDIR)/debian/gforge-plugins-extra/var/lib/gforge/www/plugins/webcalendar/www/includes/settings.php
+ chmod 600 $(CURDIR)/debian/gforge-plugins-extra/var/lib/gforge/www/plugins/webcalendar/www/includes/settings.php
+ ln -s /var/lib/gforge/www/plugins/webcalendar/www/includes/settings.php \
+ $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/webcalendar/www/includes/settings.php
+ chmod +x $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/webcalendar/www/tools/*.pl
+
+ # Remove files that are in other packages
+ rm -r $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/scmcvs/
+ rm -r $(CURDIR)/debian/gforge-plugins-extra/usr/share/gforge/plugins/scmsvn/
+
+ # gforge-plugin-scmcvs
+ install -m 755 deb-specific/install-cvs.sh $(CURDIR)/debian/gforge-plugin-scmcvs/usr/lib/gforge/bin/
+ cp -r deb-specific/scmcvs/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/share/gforge/plugins/scmcvs/cronjobs
+ cp -r plugins/scmcvs/bin/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/lib/gforge/plugins/scmcvs/bin/
+ cp -r plugins/scmcvs/common/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/share/gforge/plugins/scmcvs/common/
+ cp -r plugins/scmcvs/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmcvs/usr/share/gforge/plugins/scmcvs/cronjobs/
+ cp -r plugins/scmcvs/etc/plugins/scmcvs/* $(CURDIR)/debian/gforge-plugin-scmcvs/etc/gforge/plugins/scmcvs/
+
+ # gforge-plugin-scmsvn
+ install -m 755 deb-specific/install-svn.sh $(CURDIR)/debian/gforge-plugin-scmsvn/usr/lib/gforge/bin/
+ cp -r deb-specific/scmsvn/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/cronjobs
+ cp -r plugins/scmsvn/bin/* $(CURDIR)/debian/gforge-plugin-scmsvn/usr/lib/gforge/plugins/scmsvn/bin/
+ cp -r plugins/scmsvn/common/* $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/common/
+ cp -r plugins/scmsvn/cronjobs/* $(CURDIR)/debian/gforge-plugin-scmsvn/usr/share/gforge/plugins/scmsvn/cronjobs/
+ cp -r plugins/scmsvn/etc/plugins/scmsvn/* $(CURDIR)/debian/gforge-plugin-scmsvn/etc/gforge/plugins/scmsvn/
+
# gforge-common
install -m 644 etc/httpd.d/[0-9][0-9]* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/httpd.d/
install -m 644 etc/httpd.d/httpd* $(CURDIR)/debian/gforge-common/usr/share/gforge/etc/httpd.d/
install -m 755 deb-specific/update-user-group-cvs.sh $(CURDIR)/debian/gforge-common/usr/lib/gforge/bin/
#
cp -r common $(CURDIR)/debian/gforge-common/usr/share/gforge/
- find $(CURDIR)/debian/gforge-common/usr/share/gforge/ -name CVS -type d | xargs rm -rf
+ ln -s database-pgsql.php $(CURDIR)/debian/gforge-common/usr/share/gforge/common/include/database.php
find $(CURDIR)/debian/gforge-common/usr/share/gforge/common -type d -exec chmod 0755 {} \;
find $(CURDIR)/debian/gforge-common/usr/share/gforge/common -type f -exec chmod 0644 {} \;
-
- # gforge-web-apache
- install -m 644 $(CURDIR)/debian/gforge-web-apache.overrides $(CURDIR)/debian/gforge-web-apache/usr/share/lintian/overrides/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
- 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 {} \;
+ cp -r locales/* $(CURDIR)/debian/gforge-common/usr/share/locale/
+
+ # gforge/debian/gforge-web-apache2
+ install -m 644 $(CURDIR)/debian/gforge-web-apache2.overrides $(CURDIR)/debian/gforge-web-apache2/usr/share/lintian/overrides/gforge-web-apache2
+ cp -r www $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/
+ install -m 644 deb-specific/index_std.php $(CURDIR)/debian/gforge-web-apache2/etc/gforge/custom/
+ rm $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/index_std.php
+ find $(CURDIR)/debian/gforge-web-apache2 -name \*.uu -type f | xargs rm -f
+ rm -f $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/themes/gforge/COPYING
+ find $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www -type d -exec chmod 0755 {} \;
+ find $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www -type f -exec chmod 0644 {} \;
+ find $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www -name '*.py' -exec chmod 0755 {} \;
# 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
+ 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
+
+ install -o www-data -m 755 -d $(CURDIR)/debian/gforge-web-apache2/var/cache/gforge
+ install -m 755 utils/install-apache.sh $(CURDIR)/debian/gforge-web-apache2/usr/lib/gforge/bin/
+ install -m 755 deb-specific/create-vhosts.sh $(CURDIR)/debian/gforge-web-apache2/usr/lib/gforge/bin/
+ install -m 755 deb-specific/prepare-vhosts-file.pl $(CURDIR)/debian/gforge-web-apache2/usr/lib/gforge/bin/
+ install -m 644 deb-specific/index_std.php $(CURDIR)/debian/gforge-web-apache2/etc/gforge/custom/
+
+
- install -o www-data -m 755 -d $(CURDIR)/debian/gforge-web-apache/var/cache/gforge
- install -m 755 utils/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/
+ # viewvc rights
+ find $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/scm/viewvc -type f -exec chmod 0644 {} \;
+ grep -ril '^#!' $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/scm/viewvc | xargs chmod 0755
- # move some files from gforge-web-apache to gforge-common as there are needed by postgress upgrade
+ # dojo toolkit
+ #chmod 0755 $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/dojo/src/storage/storage.sh
+
+ # move some files from gforge/debian/gforge-web-apache2 to gforge-common as there are needed by postgress upgrade
# these files should be moved one day in common/
- mv $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/include/languages \
+ mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/languages \
$(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
- mv $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/include/squal_pre.php \
+ mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/squal_pre.php \
$(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
- mv $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/include/squal_exit.php \
+ mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/squal_exit.php \
$(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
- mv $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/include/pre.php \
+ mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/pre.php \
$(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
- mv $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/include/BaseLanguage.class \
+ mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/BaseLanguage.class.php \
$(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
- mv $(CURDIR)/debian/gforge-web-apache/usr/share/gforge/www/include/vote_function.php \
+ mv $(CURDIR)/debian/gforge-web-apache2/usr/share/gforge/www/include/vote_function.php \
$(CURDIR)/debian/gforge-common/usr/share/gforge/www/include
# gforge-db-postgresql
install -m 644 cronjobs/stats_site.inc $(CURDIR)/debian/gforge-db-postgresql/usr/share/gforge/cronjobs/
install -m 644 cronjobs/stats_projects.inc $(CURDIR)/debian/gforge-db-postgresql/usr/share/gforge/cronjobs/
#
+ install -m 755 cronjobs/reporting_cron.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/massmail.php $(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/gforge-db-backup.sh $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
+ #
+ install -m 755 cronjobs/ftp_create_group_access.php $(CURDIR)/debian/gforge-ftp-proftpd/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 deb-specific/get_news_notapproved.pl $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
install -m 755 deb-specific/install-db.sh $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/bin/
install -m 644 db/2004*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
install -m 755 db/2005*php $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
install -m 644 db/2005*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
-# install -m 644 db/timetracking-init.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/
+ install -m 644 db/2006*.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
+ install -m 644 db/timetracking-init.sql $(CURDIR)/debian/gforge-db-postgresql/usr/lib/gforge/db/
# 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
- # not needed chroot is a symlink -> ../../../
- #cd $(CURDIR)/debian/gforge-shell-ldap/var/lib/gforge/chroot/var/lib/gforge/chroot && ln -s ../../../../home .
-
# gforge-shell-postgresql
install -m 755 deb-specific/install-nsspgsql.sh $(CURDIR)/debian/gforge-shell-postgresql/usr/lib/gforge/bin/
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 644 $(CURDIR)/debian/gforge-dns-bind9.overrides $(CURDIR)/debian/gforge-dns-bind9/usr/share/lintian/overrides/gforge-dns-bind9
install -m 755 deb-specific/install-dns.sh $(CURDIR)/debian/gforge-dns-bind9/usr/lib/gforge/bin/
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/
+ # Remove potential SCM artefacts from binary packages
+ 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 echo rm -rf ; done
+
binary-indep: build install
dh_testdir
dh_testroot