[kune-commits] r1794 - trunk/debian

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Mon Mar 26 05:18:43 CEST 2012


Author: vjrj_
Date: 2012-03-26 05:18:42 +0200 (Mon, 26 Mar 2012)
New Revision: 1794

Added:
   trunk/debian/config
   trunk/debian/docs
Modified:
   trunk/debian/control
   trunk/debian/install
   trunk/debian/kune.debhelper.log
   trunk/debian/kune.dirs
   trunk/debian/kune.postinst
   trunk/debian/kune.postrm
   trunk/debian/kune.postrm.debhelper
   trunk/debian/kune.preinst
   trunk/debian/kune.substvars
   trunk/debian/rules
Log:
debian package (work in progress)

Added: trunk/debian/config
===================================================================
--- trunk/debian/config	                        (rev 0)
+++ trunk/debian/config	2012-03-26 03:18:42 UTC (rev 1794)
@@ -0,0 +1,12 @@
+#!/bin/sh
+# config maintainer script for kune-mysql
+	     
+# source debconf stuff
+. /usr/share/debconf/confmodule
+
+# source dbconfig-common shell library, and call the hook function
+  	 			         
+if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
+   . /usr/share/dbconfig-common/dpkg/config.mysql 
+   dbc_go kune $@
+fi
\ No newline at end of file

Modified: trunk/debian/control
===================================================================
--- trunk/debian/control	2012-03-26 00:54:07 UTC (rev 1793)
+++ trunk/debian/control	2012-03-26 03:18:42 UTC (rev 1794)
@@ -10,12 +10,11 @@
 
 Package: kune
 Pre-Depends: 
-Depends: libjmagick6-jni, sun-java6-jre | openjdk-6-jdk, mysql-server (>= 5.1) , adduser
-Recommends: openfire (>= 3.7.1)
+Depends: libjmagick6-jni, sun-java6-jre | openjdk-6-jdk, mysql-server (>= 5.1) , adduser, dbconfig-common
+Recommends: openfire (>= 3.7.1), mysql-client
 Suggests:
 Architecture: all
-#Extra-Files: ../BUGS, ../COPYRIGHT, ../CREDITS, ../INSTALL, ../README, ../TROUBLESHOOT, ../TODO
-Description: distributed social network of collaborative tools for groups
+Description: Distributed social net of collaborative web tools
  Kune (which means together in esperanto) is a web tool, for creating 
  environments of constant inter-communication, collective intelligence, 
  knowledge and shared work. It integrates Apache Wave.

Added: trunk/debian/docs
===================================================================
--- trunk/debian/docs	                        (rev 0)
+++ trunk/debian/docs	2012-03-26 03:18:42 UTC (rev 1794)
@@ -0,0 +1,9 @@
+BUGS
+CREDITS
+INSTALL
+README
+TROUBLESHOOT
+DEV-GUIDE
+TODO
+ChangeLog
+

Modified: trunk/debian/install
===================================================================
--- trunk/debian/install	2012-03-26 00:54:07 UTC (rev 1793)
+++ trunk/debian/install	2012-03-26 03:18:42 UTC (rev 1794)
@@ -0,0 +1 @@
+src/main/resources/kune-production.properties /usr/share/kune/templates/

Modified: trunk/debian/kune.debhelper.log
===================================================================
--- trunk/debian/kune.debhelper.log	2012-03-26 00:54:07 UTC (rev 1793)
+++ trunk/debian/kune.debhelper.log	2012-03-26 03:18:42 UTC (rev 1794)
@@ -1,6 +1,8 @@
 dh_prep
 dh_installdirs
 dh_installdirs
+dh_installdebconf
+dh_installdeb
 dh_installdocs
 dh_installexamples
 dh_installman

Modified: trunk/debian/kune.dirs
===================================================================
--- trunk/debian/kune.dirs	2012-03-26 00:54:07 UTC (rev 1793)
+++ trunk/debian/kune.dirs	2012-03-26 03:18:42 UTC (rev 1794)
@@ -4,7 +4,9 @@
 /usr/share/kune/lib/
 /usr/share/kune/custom/
 /usr/share/kune/webapp/
+/usr/share/kune/templates/
 /usr/share/kune/webclient/
 /usr/share/kune/webclient/ws/
 /var/lib/kune/uploads/
 /var/lib/kune/lucene/kune_prod/indexes/
+/usr/share/dbconfig-common/data/kune/install/
\ No newline at end of file

Modified: trunk/debian/kune.postinst
===================================================================
--- trunk/debian/kune.postinst	2012-03-26 00:54:07 UTC (rev 1793)
+++ trunk/debian/kune.postinst	2012-03-26 03:18:42 UTC (rev 1794)
@@ -17,9 +17,18 @@
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
 
+. /usr/share/debconf/confmodule
 
 case "$1" in
     configure)
+	alias ucf="ucf --debconf-ok"
+	dbc_generate_include=template:/etc/kune/kune.properties
+	dbc_generate_include_args="-o template_infile=/usr/share/kune/templates/kune-production.properties -U"
+	dbc_dbname="kune_prod"
+	dbc_dbuser="kune"
+	#dbc_sql_substitutions=yes
+	. /usr/share/dbconfig-common/dpkg/postinst.mysql
+	dbc_go kune $@
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

Modified: trunk/debian/kune.postrm
===================================================================
--- trunk/debian/kune.postrm	2012-03-26 00:54:07 UTC (rev 1793)
+++ trunk/debian/kune.postrm	2012-03-26 03:18:42 UTC (rev 1794)
@@ -23,7 +23,8 @@
     purge)
 	rm -rf /etc/kune
         
-        #TODO (the rest) and deluser/group
+        #TODO (the rest) and deluser/group, database
+
     ;; 
 
     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

Modified: trunk/debian/kune.postrm.debhelper
===================================================================
--- trunk/debian/kune.postrm.debhelper	2012-03-26 00:54:07 UTC (rev 1793)
+++ trunk/debian/kune.postrm.debhelper	2012-03-26 03:18:42 UTC (rev 1794)
@@ -1,3 +1,9 @@
+# Automatically added by dh_installdebconf
+if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
+	. /usr/share/debconf/confmodule
+	db_purge
+fi
+# End automatically added section
 # Automatically added by dh_installinit
 if [ "$1" = "purge" ] ; then
 	update-rc.d kune remove >/dev/null
@@ -3,2 +9,8 @@
 fi
 # End automatically added section
+# Automatically added by dh_installdebconf
+if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
+	. /usr/share/debconf/confmodule
+	db_purge
+fi
+# End automatically added section

Modified: trunk/debian/kune.preinst
===================================================================
--- trunk/debian/kune.preinst	2012-03-26 00:54:07 UTC (rev 1793)
+++ trunk/debian/kune.preinst	2012-03-26 03:18:42 UTC (rev 1794)
@@ -32,6 +32,7 @@
     mkdir -p /usr/share/kune/lib
     mkdir -p /usr/share/kune/webapp
     mkdir -p /usr/share/kune/custom
+    mkdir -p /usr/share/kune/templates
     mkdir -p /var/lib/kune/uploads
     mkdir -p /var/lib/kune/lucene/kune_prod/indexes
 
@@ -43,6 +44,7 @@
     chown kune:kune /usr/share/kune/lib
     chown kune:kune /usr/share/kune/webapp
     chown kune:kune /usr/share/kune/custom
+    chown kune:kune /usr/share/kune/templates
     chown kune:kune /var/lib/kune/uploads
     chown kune:kune /var/lib/kune/lucene/kune_prod/indexes
 
@@ -54,6 +56,7 @@
     chown 0755 /usr/share/kune/lib
     chown 0755 /usr/share/kune/webapp
     chown 0755 /usr/share/kune/custom
+    chown 0755 /usr/share/kune/templates
     chmod 0755 /var/lib/kune/uploads
     chmod 0755 /var/lib/kune/lucene/kune_prod/indexes
 

Modified: trunk/debian/kune.substvars
===================================================================
--- trunk/debian/kune.substvars	2012-03-26 00:54:07 UTC (rev 1793)
+++ trunk/debian/kune.substvars	2012-03-26 03:18:42 UTC (rev 1794)
@@ -1 +1 @@
-misc:Depends=
+misc:Depends=debconf (>= 0.5) | debconf-2.0

Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules	2012-03-26 00:54:07 UTC (rev 1793)
+++ trunk/debian/rules	2012-03-26 03:18:42 UTC (rev 1794)
@@ -30,34 +30,42 @@
 
 #	mvn assembly:assembly -Dgwt.compiler.skip=$(NO_GWT)
 
-binary/kune::
+binary-indep: build install/kune
+binary-arch: binary-indep
+binary: binary-indep
 
-binary-arch/kune::
-
-binary-indep/kune::
-
-reverse-config/kune::
-
 clean/kune::
 
 	mvn clean:clean
 
 install/kune::
 
+#	dh_testdir
+#	dh_clean -k
+#	dh_installdirs
 # FIXME make this via http://www.debian.org/doc/manuals/maint-guide/dother.en.html#conffiles
 # FIXME user owner and perms of this
 	cp $(CURDIR)/script/server.sh $(KUNE)/bin/
 	cp $(TARGET)/kune-0.1.0-SNAPSHOT-complete.jar $(KUNE)/lib/kune-complete.jar
-	cp $(RESOURCES)/kune-production.properties $(ETCDIR)
+#FIXME this fails
 	cp $(RESOURCES)/wave-server-production.properties $(ETCDIR)/wave-server.properties
 	cp $(RESOURCES)/server.federation.config.example $(ETCDIR)
 	cp $(RESOURCES)/jaas.config $(ETCDIR)
 	cp $(RESOURCES)/mail-notif-template.html $(ETCDIR)
+	cp $(CURDIR)/script/kune_initialize.sql $(DEST)/usr/share/dbconfig-common/data/kune/install/mysql
+#	cp upgrade_0.6.0.sql $(DEST)/usr/share/dbconfig-common/data/confusa/upgrade/mysql/0.6.0.sql
 
+# FIXME
+#	cp logrotate $(DEST)/etc/logrotate.d/
+
 # FIXME find another better way to do this (and remove rsync build dep)
 # FIXME user owner and perms of this
 	rsync -aC $(CURDIR)/src/main/webapp/* $(KUNE)/webapp
 	rsync -aC $(TARGETC)/ws/* $(KUNE)/webclient/ws
 
+	dh_installdebconf
+	dh_installdeb
+
+
 #get-orig-source:
 #        sh -e debian/orig-tar.sh




More information about the kune-commits mailing list