# 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
+# Copyright 2002 to 2008 by Roland Mas and Christian Bayle for the Gforge package
+# Copyright 2008 to 2009 by Roland Mas and Christian Bayle for the FusionForge package
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PACKAGE=gforge
include /usr/share/dpatch/dpatch.make
-# This one should be declared like other when it will be unified with rpm
-CRONFILESLIST=debian/$(PACKAGE)-lists-mailman.cron.d debian/$(PACKAGE)-web-apache2.cron.d debian/$(PACKAGE)-db-postgresql.cron.d debian/$(PACKAGE)-dns-bind9.cron.d debian/$(PACKAGE)-plugin-scmcvs.cron.d debian/$(PACKAGE)-ftp-proftpd.cron.d debian/$(PACKAGE)-shell-postgresql.cron.d debian/$(PACKAGE)-plugin-scmsvn.cron.d
-DIRSFILESLIST=$(patsubst dirs/%,debian/$(PACKAGE)-%.dirs,$(wildcard dirs/[a-z]*))
-INSTALLFILESLIST=$(patsubst install/%,debian/$(PACKAGE)-%.install,$(wildcard install/[a-z]*))
+CRONFILESLIST=$(patsubst packaging/cron.d/%,debian/$(PACKAGE)-%.cron.d,$(wildcard packaging/cron.d/[a-z]*))
+DIRSFILESLIST=$(patsubst packaging/dirs/%,debian/$(PACKAGE)-%.dirs,$(wildcard packaging/dirs/[a-z]*))
+INSTALLFILESLIST=$(patsubst packaging/install/%,debian/$(PACKAGE)-%.install,$(wildcard packaging/install/[a-z]*))
+DOCSFILESLIST=$(patsubst packaging/docs/pkgname%,debian/$(PACKAGE)%.docs,$(wildcard packaging/docs/pkgname*))
listecho:
@echo $(CRONFILESLIST)
@echo $(DIRSFILESLIST)
@echo $(INSTALLFILESLIST)
+listechod:
+ @echo $(DOCSFILESLIST)
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_*
sh $(CURDIR)/deb-specific/manage-uufiles.sh clean
cronfiles: $(CRONFILESLIST)
installfiles: $(INSTALLFILESLIST)
-conffiles: cronfiles dirsfiles installfiles gencontrol
+docsfiles: $(DOCSFILESLIST)
+
+conffiles: cronfiles dirsfiles installfiles gencontrol docsfiles
debian/$(PACKAGE)-%.cron.d:
@echo "Creating $@"
- @if [ "$@" = "debian/$(PACKAGE)-db-postgresql.cron.d" ] ; then \
- cat $(CURDIR)/cron.d/00phpcron > $@ ; \
- cat $(CURDIR)/cron.d/db-postgresql >> $@ ; \
- else \
- echo "copy $(CURDIR)/cron.d/$* to $@" ; \
- cp $(CURDIR)/cron.d/$* $@ ; \
- fi
+ (cat $(CURDIR)/packaging/cron.d/00phpcron ; sed -e 's/\$$FFUSER/$(PACKAGE)/g' $(CURDIR)/packaging/cron.d/$*) > $@
debian/$(PACKAGE)-%.dirs:
@echo "Creating $@"
- cp $(CURDIR)/dirs/$* $@
+ cp $(CURDIR)/packaging/dirs/$* $@
debian/$(PACKAGE)-%.install:
@echo "Creating $@"
- cp $(CURDIR)/install/$* $@
+ cp $(CURDIR)/packaging/install/$* $@
+
+debian/%.docs:
+ @echo "Creating $@"
+ cp $(CURDIR)/packaging/docs/$(patsubst $(PACKAGE)%,pkgname%,$*) $@
gencontrol:
- ls $(CURDIR)/control/[0-9][0-9][0-9]* | grep -v shortdesc | while read file ; do cat $${file}; if [ -f $${file}.shortdesc ] ; then cat $(CURDIR)/control/AAAdesc; echo ' .'; cat $${file}.shortdesc; fi; echo ''; done | sed 's/@PACKAGE@/$(PACKAGE)/g' > $(CURDIR)/debian/control
+ ls $(CURDIR)/packaging/control/[0-9][0-9][0-9]* | grep -v shortdesc | while read file ; do cat $${file}; if [ -f $${file}.shortdesc ] ; then cat $(CURDIR)/packaging/control/AAAdesc; echo ' .'; cat $${file}.shortdesc; fi; echo ''; done | sed 's/@PACKAGE@/$(PACKAGE)/g' > $(CURDIR)/debian/control
configure: configure-stamp debian/po/templates.pot
configure-stamp: remove-binary-files
dh_testdir
# Build man pages from Docbook sources
+ cat debian/dsf-in/config.sgml | sed 's/pkgname/$(PACKAGE)/g' > debian/$(PACKAGE)-config.sgml
+ cat debian/dsf-in/common.manpages | sed 's/pkgname/$(PACKAGE)/g' > $(PACKAGE)-common.manpages
/usr/bin/docbook-to-man debian/cvssh.sgml > cvssh.1
- /usr/bin/docbook-to-man debian/gforge-config.sgml > gforge-config.1
+ /usr/bin/docbook-to-man debian/$(PACKAGE)-config.sgml > $(PACKAGE)-config.1
# Uudecode binary files
sh $(CURDIR)/deb-specific/manage-uufiles.sh decode
rm -f $(CURDIR)/debian/*.cron.d
rm -f $(CURDIR)/debian/*.dirs
rm -f $(CURDIR)/debian/*.install
- rm -f cvssh.1 gforge-config.1
+ rm -f $(CURDIR)/debian/*.docs
+ rm -f $(CURDIR)/debian/$(PACKAGE)-config.sgml
+ rm -f $(CURDIR)/debian/$(PACKAGE)-common.manpages
+ rm -f cvssh.1 $(PACKAGE)-config.1
rm -rf locales/*
dh_testroot
dh_clean -k
- # Generate conffiles *.cron.d *.dirs *.install
+ # Generate conffiles *.cron.d *.dirs *.install control
$(CURDIR)/debian/rules conffiles
dh_installdirs
$(CURDIR)/debian/*/usr/share/*/plugins/*/cronjobs/*
#
chmod 755 $(CURDIR)/debian/$(PACKAGE)-db-postgresql/usr/share/*/db/*.php
- chmod 644 $(CURDIR)/debian/$(PACKAGE)-db-postgresql/usr/share/gforge/cronjobs/*.inc
-
- # gforge-plugin-globalsearch
- iinstall -m 755 plugins/globalsearch/bin/* $(CURDIR)/debian/gforge-plugin-globalsearch/usr/lib/gforge/plugins/globalsearch/bin/
- cp -r plugins/globalsearch/lib/* $(CURDIR)/debian/gforge-plugin-globalsearch/usr/lib/gforge/plugins/globalsearch/lib/
- cp -r plugins/globalsearch/common/* $(CURDIR)/debian/gforge-plugin-globalsearch/usr/share/gforge/plugins/globalsearch/common/
- cp -r plugins/globalsearch/www/* $(CURDIR)/debian/gforge-plugin-globalsearch/usr/share/gforge/www/plugins/globalsearch/
+ chmod 644 $(CURDIR)/debian/$(PACKAGE)-db-postgresql/usr/share/$(PACKAGE)/cronjobs/*.inc
# viewvc rights
find $(CURDIR)/debian/$(PACKAGE)-web-apache2/usr/share/*/www/scm/viewvc -type f -exec chmod 0644 {} \;
# remove windows files
rm -rf $(CURDIR)/debian/$(PACKAGE)-web-apache2/usr/share/*/www/scm/viewvc/windows
#
- rm -f $(CURDIR)/debian/$(PACKAGE)-web-apache2/usr/share/*/www/themes/gforge/COPYING
+ rm -f $(CURDIR)/debian/$(PACKAGE)-web-apache2/usr/share/*/www/themes/$(PACKAGE)/COPYING
# Remove Snoopy class from binary packages (provided by libphp-snoopy)
for i in $(addprefix $(CURDIR)/debian/,$(shell dh_listpackages)) ; do find $$i -name Snoopy.class.php | xargs rm -rf ; done