[Fusionforge-commits] r9041 - in trunk/gforge/plugins/helloworld: . debian debian/po packaging packaging/control packaging/dirs packaging/docs packaging/install packaging/links translations utils

Christian Bayle cbayle at libremir.placard.fr.eu.org
Fri Mar 12 11:42:03 CET 2010


Author: cbayle
Date: 2010-03-12 11:42:03 +0100 (Fri, 12 Mar 2010)
New Revision: 9041

Added:
   trunk/gforge/plugins/helloworld/debian/dsf-po/
   trunk/gforge/plugins/helloworld/debian/po/
   trunk/gforge/plugins/helloworld/debian/po/templates.pot
   trunk/gforge/plugins/helloworld/packaging/
   trunk/gforge/plugins/helloworld/packaging/control/
   trunk/gforge/plugins/helloworld/packaging/control/000source
   trunk/gforge/plugins/helloworld/packaging/control/222plugin-helloworld
   trunk/gforge/plugins/helloworld/packaging/cron.d/
   trunk/gforge/plugins/helloworld/packaging/dirs/
   trunk/gforge/plugins/helloworld/packaging/dirs/plugin-helloworld
   trunk/gforge/plugins/helloworld/packaging/docs/
   trunk/gforge/plugins/helloworld/packaging/docs/plugin-helloworld
   trunk/gforge/plugins/helloworld/packaging/install/
   trunk/gforge/plugins/helloworld/packaging/install/plugin-helloworld
   trunk/gforge/plugins/helloworld/packaging/links/
   trunk/gforge/plugins/helloworld/packaging/links/plugin-helloworld
   trunk/gforge/plugins/helloworld/translations/
   trunk/gforge/plugins/helloworld/translations/en.po
   trunk/gforge/plugins/helloworld/translations/gforge.pot
   trunk/gforge/plugins/helloworld/utils/
   trunk/gforge/plugins/helloworld/utils/manage-translations.sh
Modified:
   trunk/gforge/plugins/helloworld/debian/changelog
   trunk/gforge/plugins/helloworld/debian/control
   trunk/gforge/plugins/helloworld/debian/rules
Log:
Make the package build more or less like core


Modified: trunk/gforge/plugins/helloworld/debian/changelog
===================================================================
--- trunk/gforge/plugins/helloworld/debian/changelog	2010-03-12 09:18:51 UTC (rev 9040)
+++ trunk/gforge/plugins/helloworld/debian/changelog	2010-03-12 10:42:03 UTC (rev 9041)
@@ -1,4 +1,4 @@
-helloworld (1.0-1) unstable; urgency=low
+fusionforge-plugin-helloworld (1.0-1) unstable; urgency=low
 
   * Initial release (Closes: #nnnn)  <nnnn is the bug number of your ITP>
 

Modified: trunk/gforge/plugins/helloworld/debian/control
===================================================================
--- trunk/gforge/plugins/helloworld/debian/control	2010-03-12 09:18:51 UTC (rev 9040)
+++ trunk/gforge/plugins/helloworld/debian/control	2010-03-12 10:42:03 UTC (rev 9041)
@@ -1,13 +1,16 @@
-Source: helloworld
-Section: unknown
-Priority: extra
+Source: fusionforge-plugin-helloworld
+Section: devel
+Priority: optional
 Maintainer: Christian Bayle <bayle at debian.org>
-Build-Depends: debhelper (>= 7)
+Uploaders: Roland Mas <lolando at debian.org>
+Build-Depends-Indep: devscripts
+Build-Depends: debhelper (>= 7), perl, gettext
 Standards-Version: 3.8.4
-Homepage: <insert the upstream URL, if relevant>
+Homepage: http://fusionforge.org/
+Vcs-Bzr: http://scm.fusionforge.org/bzr/fusionforge/svn-trunk-ro/
 
-Package: helloworld
+Package: fusionforge-plugin-helloworld
 Architecture: all
-Depends: ${misc:Depends}
-Description: <insert up to 60 chars description>
- <insert long description, indented with spaces>
+Depends: gforge-common, gforge-db-postgresql | gforge-db, gforge-web-apache2 | gforge-web, gforge-shell-postgresql | gforge-shell, php5-cli, ${misc:Depends}
+Description: collaborative development tool - Helloworld plugin
+

Modified: trunk/gforge/plugins/helloworld/debian/rules
===================================================================
--- trunk/gforge/plugins/helloworld/debian/rules	2010-03-12 09:18:51 UTC (rev 9040)
+++ trunk/gforge/plugins/helloworld/debian/rules	2010-03-12 10:42:03 UTC (rev 9041)
@@ -8,6 +8,71 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
+SRCPACKAGE=$(shell head -1 $(CURDIR)/debian/changelog | sed 's/\(.[^ ]*\) .*/\1/')
+MAJOR=$(shell head -1 $(CURDIR)/debian/changelog | sed 's/.*(\(.*\)-[^-]*).*/\1/')
+ORIGFILE=$(SRCPACKAGE)_$(MAJOR).orig.tar.gz
+OLDPACKAGE=gforge
+PACKAGE=fusionforge
+FORGENAME=FusionForge
 
+SED_REPLACE=sed -e 's/@PACKAGE@/$(PACKAGE)/g' -e 's/@SRCPACKAGE@/$(SRCPACKAGE)/g' -e 's/@FORGENAME@/$(FORGENAME)/g' -e 's/@OLDPACKAGE@/$(OLDPACKAGE)/g'
+
+CRONDFILES=$(patsubst packaging/cron.d/%,debian/$(PACKAGE)-%.cron.d,$(wildcard packaging/cron.d/[a-z]*))
+DIRSFILES=$(patsubst packaging/dirs/%,debian/$(PACKAGE)-%.dirs,$(wildcard packaging/dirs/[a-z]*))
+LINKSFILES=$(patsubst packaging/links/%,debian/$(PACKAGE)-%.links,$(wildcard packaging/links/[a-z]*))
+INSTALLFILES=$(patsubst packaging/install/%,debian/$(PACKAGE)-%.install,$(wildcard packaging/install/[a-z]*))
+DOCSFILES=$(patsubst packaging/docs/%,debian/$(PACKAGE)-%.docs,$(wildcard packaging/docs/[a-z]*))
+POFILES=$(patsubst debian/dsf-po/%,debian/po/%,$(wildcard debian/dsf-po/*) debian/po/POTFILES.in)
+
+.PHONY: conffiles
+conffiles: $(CRONDFILES) $(DIRSFILES) $(LINKSFILES) $(INSTALLFILES) $(DOCSFILES) debian/control
+
+debian/$(PACKAGE)-%.cron.d:
+	(cat $(CURDIR)/packaging/cron.d/00phpcron ; sed -e 's/\$$FFUSER/$(PACKAGE)/g' $(CURDIR)/packaging/cron.d/$*) > $@
+
+debian/$(PACKAGE)-%.dirs:
+	cp $(CURDIR)/packaging/dirs/$* $@ 
+
+debian/$(PACKAGE)-%.links:
+	cp $(CURDIR)/packaging/links/$* $@ 
+
+debian/$(PACKAGE)-%.install:
+	cp $(CURDIR)/packaging/install/$* $@ 
+
+debian/$(PACKAGE)-%.docs:
+	cp $(CURDIR)/packaging/docs/$* $@
+
+debian/control: $(wildcard packaging/control/*)
+	ls $(CURDIR)/packaging/control/[0-9][0-9][0-9]* | grep -v shortdesc | grep -v scmcpold | while read file ; do cat $${file}; if [ -f $${file}.shortdesc ] ; then cat $(CURDIR)/packaging/control/AAAdesc; echo ' .'; cat $${file}.shortdesc; fi; echo '';  done | $(SED_REPLACE) > $@
+
+debian/po/templates.pot: $(wildcard debian/dsf-in/*.templates.dsfh-in) $(wildcard debian/dsf-helper/*.templates)
+        @debconf-updatepo --podir=debian/dsf-po
+
+debian/po/%:
+	cat $(patsubst debian/po/%,debian/dsf-po/%,$@) | $(SED_REPLACE) > $@
+
+build: debian/po/templates.pot conffiles
+	dh $@
+	# Build gettext *.mo files
+	utils/manage-translations.sh build
+
+clean:
+	dh $@
+	rm -f $(CURDIR)/debian/*.cron.d
+	rm -f $(CURDIR)/debian/*.dirs
+	rm -f $(CURDIR)/debian/*.links
+	rm -f $(CURDIR)/debian/*.install
+	rm -f $(CURDIR)/debian/*.docs
+	rm -rf locales
+	rm -f $(POFILES)
+
+makeorig: 
+	find $(PKGDIR) -type f -or -type l | grep -v '/CVS/' | \
+	grep -v '/.svn/' | grep -v '/.testbox/' | \
+	grep -v rpm-specific | grep -v docs/phpdoc/docs | \
+	grep -v ^./debian/ | grep -v \\.jar$$ | \
+	grep -v \\.pdf$$ | grep -v plugins/fckeditor/www/_samples | \
+	cpio -o -H ustar | gzip > ../$(ORIGFILE)
+
 %:
 	dh  $@

Added: trunk/gforge/plugins/helloworld/packaging/control/000source
===================================================================
--- trunk/gforge/plugins/helloworld/packaging/control/000source	                        (rev 0)
+++ trunk/gforge/plugins/helloworld/packaging/control/000source	2010-03-12 10:42:03 UTC (rev 9041)
@@ -0,0 +1,10 @@
+Source: @SRCPACKAGE@
+Section: devel
+Priority: optional
+Maintainer: Christian Bayle <bayle at debian.org>
+Uploaders: Roland Mas <lolando at debian.org>
+Build-Depends-Indep: devscripts
+Build-Depends: debhelper (>= 7), perl, gettext
+Standards-Version: 3.8.4
+Homepage: http://fusionforge.org/
+Vcs-Bzr: http://scm.fusionforge.org/bzr/fusionforge/svn-trunk-ro/

Added: trunk/gforge/plugins/helloworld/packaging/control/222plugin-helloworld
===================================================================
--- trunk/gforge/plugins/helloworld/packaging/control/222plugin-helloworld	                        (rev 0)
+++ trunk/gforge/plugins/helloworld/packaging/control/222plugin-helloworld	2010-03-12 10:42:03 UTC (rev 9041)
@@ -0,0 +1,4 @@
+Package: @SRCPACKAGE@
+Architecture: all
+Depends: @OLDPACKAGE at -common, @OLDPACKAGE at -db-postgresql | @OLDPACKAGE at -db, @OLDPACKAGE at -web-apache2 | @OLDPACKAGE at -web, @OLDPACKAGE at -shell-postgresql | @OLDPACKAGE at -shell, php5-cli, ${misc:Depends}
+Description: collaborative development tool - Helloworld plugin

Added: trunk/gforge/plugins/helloworld/packaging/dirs/plugin-helloworld
===================================================================
--- trunk/gforge/plugins/helloworld/packaging/dirs/plugin-helloworld	                        (rev 0)
+++ trunk/gforge/plugins/helloworld/packaging/dirs/plugin-helloworld	2010-03-12 10:42:03 UTC (rev 9041)
@@ -0,0 +1,5 @@
+etc/gforge/httpd.d
+etc/gforge/plugins/helloworld
+usr/share/gforge/plugins/helloworld/cgi-bin
+usr/share/gforge/plugins/helloworld/common
+usr/share/gforge/plugins/helloworld/www

Added: trunk/gforge/plugins/helloworld/packaging/docs/plugin-helloworld
===================================================================
--- trunk/gforge/plugins/helloworld/packaging/docs/plugin-helloworld	                        (rev 0)
+++ trunk/gforge/plugins/helloworld/packaging/docs/plugin-helloworld	2010-03-12 10:42:03 UTC (rev 9041)
@@ -0,0 +1 @@
+debian/README.Debian

Added: trunk/gforge/plugins/helloworld/packaging/install/plugin-helloworld
===================================================================
--- trunk/gforge/plugins/helloworld/packaging/install/plugin-helloworld	                        (rev 0)
+++ trunk/gforge/plugins/helloworld/packaging/install/plugin-helloworld	2010-03-12 10:42:03 UTC (rev 9041)
@@ -0,0 +1,3 @@
+common/*                  /usr/share/gforge/plugins/helloworld/common/
+www/*                     /usr/share/gforge/plugins/helloworld/www/
+etc/plugins/helloworld/*  /etc/gforge/plugins/helloworld/

Added: trunk/gforge/plugins/helloworld/packaging/links/plugin-helloworld
===================================================================
--- trunk/gforge/plugins/helloworld/packaging/links/plugin-helloworld	                        (rev 0)
+++ trunk/gforge/plugins/helloworld/packaging/links/plugin-helloworld	2010-03-12 10:42:03 UTC (rev 9041)
@@ -0,0 +1 @@
+/usr/share/gforge/plugins/helloworld/www /usr/share/gforge/www/plugins/helloworld

Added: trunk/gforge/plugins/helloworld/utils/manage-translations.sh
===================================================================
--- trunk/gforge/plugins/helloworld/utils/manage-translations.sh	                        (rev 0)
+++ trunk/gforge/plugins/helloworld/utils/manage-translations.sh	2010-03-12 10:42:03 UTC (rev 9041)
@@ -0,0 +1,56 @@
+#! /bin/sh -e
+
+if [ -e gforge/translations/gforge.pot ] ; then        # We're in the parent dir
+    cd gforge
+elif [ -e translations/gforge.pot ] ; then             # probably in gforge/ (or a renamed gforge/)
+    cd . # do nothing, but shell syntax requires an instruction in a then-block
+elif [ -e ../gforge/translations/gforge.pot ] ; then   # in tools/ or tests/ or something
+    cd ../gforge
+elif [ -e ../translations/gforge.pot ] ; then          # In a subdir of gforge/
+    cd ..
+else
+    echo "Couldn't find translations directory..."
+    exit 1
+fi
+
+locales=$(ls translations/*.po \
+    | xargs -n1 -iFILE basename FILE .po \
+    | egrep '^[a-z][a-z](_[A-Z][A-Z]$)?' \
+    | sort)
+
+print_stats () {
+    for l in $(echo $locales | xargs -n 1 | sort) ; do
+	printf "* %5s: " $l
+	msgfmt --statistics -o /dev/null translations/$l.po
+    done
+}
+
+case $1 in
+    stats)
+	print_stats
+	;;
+    refresh)
+	rm translations/gforge.pot
+	
+	find -type f -\( -name \*.php -or -name users -or -name projects -\) \
+	    | grep -v -e {arch} -e svn-base \
+	    | grep -v ^./plugins/wiki \
+	    | LANG=C sort \
+	    | xargs xgettext -d gforge -o translations/gforge.pot -L PHP --from-code=iso-8859-1
+	    
+	for l in $locales ; do
+	    echo "Processing $l..."
+	    msgmerge -U translations/$l.po translations/gforge.pot
+	done
+	;;
+    build)
+	for l in $locales ; do
+	    mkdir -p locales/$l/LC_MESSAGES
+	    msgfmt -o locales/$l/LC_MESSAGES/gforge.mo translations/$l.po
+	done
+	;;
+    *)
+	echo "Unknown operation"
+	exit 1
+	;;
+esac


Property changes on: trunk/gforge/plugins/helloworld/utils/manage-translations.sh
___________________________________________________________________
Added: svn:executable
   + *




More information about the Fusionforge-commits mailing list