gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r4280 - in i18nHTML: . debian


From: grothoff
Subject: [GNUnet-SVN] r4280 - in i18nHTML: . debian
Date: Wed, 10 Jan 2007 19:46:32 -0800 (PST)

Author: grothoff
Date: 2007-01-10 19:46:18 -0800 (Wed, 10 Jan 2007)
New Revision: 4280

Added:
   i18nHTML/debian/postinst
   i18nHTML/debian/postrm
Modified:
   i18nHTML/debian/config
   i18nHTML/debian/control
   i18nHTML/todo
Log:
better debianization -- untested

Modified: i18nHTML/debian/config
===================================================================
--- i18nHTML/debian/config      2007-01-11 03:25:36 UTC (rev 4279)
+++ i18nHTML/debian/config      2007-01-11 03:46:18 UTC (rev 4280)
@@ -1,5 +1,6 @@
 #!/bin/bash
 # Debconf config script for i18nhtml
+package_name="i18nhtml"
  
 db_input high ${package_name}/askpassword || true
 db_go

Modified: i18nHTML/debian/control
===================================================================
--- i18nHTML/debian/control     2007-01-11 03:25:36 UTC (rev 4279)
+++ i18nHTML/debian/control     2007-01-11 03:46:18 UTC (rev 4280)
@@ -1,14 +1,14 @@
 Source: i18nhtml
 Priority: extra
 Maintainer: Christian Grothoff <address@hidden>
-Build-Depends: debhelper (>= 5), debconf (>= 1.2.0), apache2 | apache, 
php4-mysql | php5-mysql, mysql-client | virtual-mysql-client, makepasswd
+Build-Depends: debhelper (>= 5)
 Standards-Version: 3.7.2
 Section: libs
 
 Package: i18nhtml
 Section: libs
 Architecture: all
-Depends: mysql-client, apache2, mysql-server
+Depends:  debconf (>= 1.2.0), apache2, php4-mysql | php5-mysql, mysql-client | 
virtual-mysql-client, makepasswd, mysql-server
 Description: PHP scripts for generating translated webpages
  i18nHTML is a collection of PHP files that can be used to write
  webpages that visitors can translate into their respective native

Added: i18nHTML/debian/postinst
===================================================================
--- i18nHTML/debian/postinst    2007-01-11 03:25:36 UTC (rev 4279)
+++ i18nHTML/debian/postinst    2007-01-11 03:46:18 UTC (rev 4280)
@@ -0,0 +1,57 @@
+#!/bin/bash
+# postinst script for i18nhtml
+
+. /usr/share/debconf/confmodule
+
+package_name="i18nhtml"
+
+case "$1" in
+    configure)
+
+       OLDVERSION="$2"
+
+       # Get Debconf variables
+
+        db_get ${package_name}/askpassword || true
+       dbpass="$RET"
+       #if [ ! -z "$OLDVERSION" ] && \
+       #    dpkg --compare-versions "$OLDVERSION" lt X.X; then
+       # do version specific update code here
+       #fi
+       if [ -z "$OLDVERSION" ]; then
+           # Generate database and configure
+           i18npass=`makepasswd`
+           mysql -u root --password="$dbpass" <<EOF
+CREATE DATABASE translation;
+GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,ALTER,DROP
+     ON translation.* TO address@hidden;
+EOF
+            echo "SET PASSWORD FOR address@hidden('${i18npass}');" | mysql -u 
root --password="$dbpass"
+           echo "FLUSH PRIVILEGES;" | mysql -u root --password="$dbpass"
+
+           cat /usr/share/php/i18nHTML/i18nhtml_config.php | sed -e 
"s/\$i18nHTMLsqlPass = \"pass\"/\$i18nHTMLsqlPass = \"$i18npass\"/" >  
/usr/share/php/i18nHTML/i18nhtml_config.php.deb
+           mv /usr/share/php/i18nHTML/i18nhtml_config.php.deb 
/usr/share/php/i18nHTML/i18nhtml_config.php
+           mkdir -p /etc/apache2/sites-enabled/
+            cat > /etc/apache2/sites-enabled/i18nhtml <<EOF
+Alias /i18nhtml/ "/usr/share/i18nhtml/"
+<Directory "/usr/share/i18nhtml/">
+  AllowOverride None
+  Order allow,deny
+  Allow from all
+</Directory>
+EOF
+            /etc/init.d/apache2 reload
+       fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+    echo "postinst called with unknown argument \`$1'" >&2
+         exit 1
+    ;;
+esac
+
+exit 0


Property changes on: i18nHTML/debian/postinst
___________________________________________________________________
Name: svn:executable
   + *

Added: i18nHTML/debian/postrm
===================================================================
--- i18nHTML/debian/postrm      2007-01-11 03:25:36 UTC (rev 4279)
+++ i18nHTML/debian/postrm      2007-01-11 03:46:18 UTC (rev 4280)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# postrm script for i18nhtml
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+package_name="i18nhtml"
+
+case "$1" in
+    purge|remove)
+        rm -f /etc/apache2/sites-enabled/i18nhtml
+       # we do NOT drop the database,
+       # this is just too risky...
+    ;;
+
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+# 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
+
+
+exit 0
+


Property changes on: i18nHTML/debian/postrm
___________________________________________________________________
Name: svn:executable
   + *

Modified: i18nHTML/todo
===================================================================
--- i18nHTML/todo       2007-01-11 03:25:36 UTC (rev 4279)
+++ i18nHTML/todo       2007-01-11 03:46:18 UTC (rev 4280)
@@ -2,10 +2,4 @@
 
 Administration:
 * enable default translation feature
-
-Installation:
-* finish debian package:
-  - automatically setup mysql database
-  - automatically install apache configuration file
-  - restart apache2
-
+* show all translations by IP/translator (link from dig)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]