Struktur in Tar-File gepackt
authorHolger Lindemann <hli@lenny.hoch.ul>
Thu, 27 Jan 2011 07:59:38 +0000 (08:59 +0100)
committerHolger Lindemann <hli@lenny.hoch.ul>
Thu, 27 Jan 2011 07:59:38 +0000 (08:59 +0100)
Script zum Paketbau geƤndert

DEBIAN/DEBIAN/conffiles
DEBIAN/DEBIAN/postinst
DEBIAN/files/lx-office-erp [deleted file]
DEBIAN/files/lx-office-erp.1.gz [deleted file]
DEBIAN/files/lx-office-erp.apache2.conf [deleted file]
DEBIAN/files/lx-office-erp.cherokee [deleted file]
DEBIAN/files/lx-office-erp.cherokee.handler [deleted file]
DEBIAN/mk_erp_deb.sh
DEBIAN/struktur.tgz [new file with mode: 0644]

index 4cb0a3b..1a88f8f 100644 (file)
@@ -1,3 +1,6 @@
 /etc/lx-office-erp/lx-office-erp.apache2.conf
 /etc/lx-office-erp/lx-office-erp.cherokee
 /etc/lx-office-erp/lx-office-erp.cherokee.handler
+/etc/lx-office-erp/lx-erp.conf.default
+/etc/lx-office-erp/console.conf.default
+/etc/lx-office-erp/authentication.pl.default
index 54b53e5..0e0da13 100755 (executable)
@@ -81,17 +81,12 @@ set_lx_office_erp_web_admin_password() {
        db_get lx-office-erp/admin-password
        ADMINPASSWORD="$RET"
 
-       #cat /usr/lib/lx-office-erp/config/authentication.pl.default | \
        cat /etc/lx-office-erp/authentication.pl.default | \
        sed --expression "s/\$self->{admin_password} = 'admin';/\$self->{admin_password} = '$ADMINPASSWORD';/g" \
        > /tmp/1.txt
 
-       #mv /tmp/1.txt /usr/lib/lx-office-erp/config/authentication.pl
        mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
 
-       #chmod 0600 /usr/lib/lx-office-erp/config/authentication.pl
-       #chown www-data:www-data /usr/lib/lx-office-erp/config/authentication.pl
-
 }
 
 
@@ -99,12 +94,10 @@ set_lx_office_erp_authentication_db_password() {
        db_get lx-office-erp/lx-office-erp-user-postgresql-password
        PASSWORD="$RET"
 
-       #cat /usr/lib/lx-office-erp/config/authentication.pl | \
        cat /etc/lx-office-erp/authentication.pl | \
        sed --expression "s/'password' => '',/'password' => '$PASSWORD',/g" \
        > /tmp/1.txt
 
-       #mv /tmp/1.txt /usr/lib/lx-office-erp/config/authentication.pl
        mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
 
 }
@@ -112,23 +105,21 @@ set_lx_office_erp_authentication_db_password() {
 set_lx_office_erp_authentication_db_user() {
        USER="lxoffice"
 
-       #cat /usr/lib/lx-office-erp/config/authentication.pl | \
        cat /etc/lx-office-erp/authentication.pl | \
        sed --expression "s/'user'     => 'postgres',/'user'     => '$USER',/g" \
        > /tmp/1.txt
 
-       #mv /tmp/1.txt /usr/lib/lx-office-erp/config/authentication.pl
        mv /tmp/1.txt /etc/lx-office-erp/authentication.pl
 }
 
 set_user_rights() {
        chown -R www-data:www-data /usr/lib/lx-office-erp/users
        chown -R www-data:www-data /usr/lib/lx-office-erp/templates
-    chown www-data:www-data /etc/lx-office-erp/lx-erp.conf
-    chown www-data:www-data /usr/lib/lx-office-erp/menu.ini
-    chown www-data:www-data /etc/lx-office-erp/authentication.pl
-    chmod 0600 /etc/lx-office-erp/lx-erp.conf
-    chmod 0600 /etc/lx-office-erp/authentication.pl
+       chown www-data:www-data /etc/lx-office-erp/lx-erp.conf
+       chown www-data:www-data /usr/lib/lx-office-erp/menu.ini
+       chown www-data:www-data /etc/lx-office-erp/authentication.pl
+       chmod 0600 /etc/lx-office-erp/lx-erp.conf
+       chmod 0600 /etc/lx-office-erp/authentication.pl
 }
 
 disable_ipv6_on_lo_interface() {
@@ -159,6 +150,9 @@ mk_new_config() {
     if ! [ -f /etc/lx-office-erp/lx-erp.conf ] ; then
         cp /etc/lx-office-erp/lx-erp.conf.default /etc/lx-office-erp/lx-erp.conf
     fi
+    if ! [ -f /etc/lx-office-erp/console.conf ] ; then
+        cp /etc/lx-office-erp/console.conf.default /etc/lx-office-erp/console.conf
+    fi
 }  
 
 mk_links() {
@@ -168,6 +162,9 @@ mk_links() {
     if ! [ -f /usr/lib/lx-office-erp/config/lx-erp.conf ] ; then
         ln -s /etc/lx-office-erp/lx-erp.conf /usr/lib/lx-office-erp/config/lx-erp.conf
     fi;
+    if ! [ -f /usr/lib/lx-office-erp/config/console.conf ] ; then
+        ln -s /etc/lx-office-erp/console.conf /usr/lib/lx-office-erp/config/console.conf
+    fi;
     if [ -e /etc/apache2 ] ; then 
         if ! [ -f /etc/apache2/conf.d/lx-office-erp.apache2.conf ] ; then
             ln -s /etc/lx-office-erp/lx-office-erp.apache2.conf /etc/apache2/conf.d/lx-office-erp.apache2.conf
diff --git a/DEBIAN/files/lx-office-erp b/DEBIAN/files/lx-office-erp
deleted file mode 100755 (executable)
index 7f41914..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-#
-## shell script for lx-office-erp to start the login manager in a browser
-
-set -e
-
-/usr/bin/sensible-browser http://localhost/lx-office-erp/login.pl
-
-
diff --git a/DEBIAN/files/lx-office-erp.1.gz b/DEBIAN/files/lx-office-erp.1.gz
deleted file mode 100644 (file)
index d68e3a6..0000000
Binary files a/DEBIAN/files/lx-office-erp.1.gz and /dev/null differ
diff --git a/DEBIAN/files/lx-office-erp.apache2.conf b/DEBIAN/files/lx-office-erp.apache2.conf
deleted file mode 100644 (file)
index b9a4aaf..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-AddHandler cgi-script .pl
-Alias /lx-office /usr/lib/lx-office-erp/
-Alias /lx-office-erp /usr/lib/lx-office-erp/
-
-<Directory /usr/lib/lx-office-erp>
-  Options ExecCGI Includes FollowSymlinks
-  DirectoryIndex login.pl
-  AddDefaultCharset UTF-8
-</Directory>
-
-<Directory /usr/lib/lx-office-erp/users>
-  Order Deny,Allow
-  Deny from All
-</Directory>
\ No newline at end of file
diff --git a/DEBIAN/files/lx-office-erp.cherokee b/DEBIAN/files/lx-office-erp.cherokee
deleted file mode 100644 (file)
index 6ea1e95..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-##
-## Virtual server for lx-office-erp
-##
-Directory /lx-office-erp {
-      Handler common
-         DocumentRoot /usr/lib/lx-office-erp/
-}        
-Directory /lx-office-erp/image {
-         DocumentRoot /usr/share/lx-office-erp/
-}        
-Directory /lx-office-erp/css{
-         DocumentRoot /var/lib/lx-office-erp/css
-}        
-Directory /lx-office-erp/templates{
-         DocumentRoot /var/lib/lx-office-erp/templates
-}        
-Directory /lx-office-erp/users{
-         DocumentRoot /var/lib/lx-office-erp/users
-}        
-Directory /lx-office-erp/webdav{
-         DocumentRoot /var/lib/lx-office-erp/webdav
-}        
-Directory /lx-office-erp/spool{
-         DocumentRoot /var/lib/lx-office-erp/spool
-}        
diff --git a/DEBIAN/files/lx-office-erp.cherokee.handler b/DEBIAN/files/lx-office-erp.cherokee.handler
deleted file mode 100644 (file)
index c932e3c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Extension pl {
-    Handler cgi
-}
index 60fe00e..4fb7c00 100755 (executable)
@@ -4,10 +4,10 @@
 NR="0"
 
 #hier wurde das Git-Paket entpakt:
-SRC=/tmp/deb_test/unstable
+SRC=/tmp/lx-office-erp
 
 #hier wird das Debian-Paket gebaut:
-DST=/tmp/deb_test/package
+DST=/tmp/package
 
 
 ################################################
@@ -17,70 +17,13 @@ DST=/tmp/deb_test/package
 VER=`cat VERSION`
 DEST=$DST/lx-office-erp_$VER-$NR-all
 
-FILES='
-usr/lib/lx-office-erp/
-usr/share/lx-office-erp/
-usr/share/doc/lx-office-erp/
-var/lib/lx-office-erp/spool/
-var/lib/lx-office-erp/users/
-var/lib/lx-office-erp/css/
-var/lib/lx-office-erp/xslt/
-var/lib/lx-office-erp/templates/
-var/lib/lx-office-erp/webdav/lieferantenbestellungen/
-var/lib/lx-office-erp/webdav/anfragen/
-var/lib/lx-office-erp/webdav/gutschriften/
-var/lib/lx-office-erp/webdav/einkaufsrechnungen/
-var/lib/lx-office-erp/webdav/rechnungen/
-var/lib/lx-office-erp/webdav/bestellungen/
-var/lib/lx-office-erp/webdav/angebote/
-usr/lib/lx-office-erp/
-usr/share/lx-office-erp/
-usr/share/doc/lx-office-erp/
-usr/share/man/man1/:lx-office-erp.1.gz
-etc/lx-office-erp/:lx-office-erp.cherokee.handler
-etc/lx-office-erp/:lx-office-erp.apache2.conf
-etc/lx-office-erp/:lx-office-erp.cherokee
-usr/bin/:lx-office-erp
-'
-
-for filespec in $FILES; do
-  set - `echo $filespec | sed -e 's/:/ /g'`
-  dir=$1
-  file=$2
-  mkdir -p $SRC/DEBIAN/$dir
-  if [ -f $SRC/DEBIAN/files/$file ]; then
-    cp  $SRC/DEBIAN/files/$file $SRC/DEBIAN/$dir/$file
-  else
-    echo '1' > $SRC/DEBIAN/$dir/.dummy
-  fi
-done
-
-SYMLINKS='
-css:/var/lib/lx-office-erp/css
-doc:/usr/share/doc/lx-office-erp/
-image:/usr/share/lx-office-erp
-spool:/var/lib/lx-office-erp/spool
-templates:/var/lib/lx-office-erp/templates
-users:/var/lib/lx-office-erp/users/
-webdav:/var/lib/lx-office-erp/webdav
-xslt:/var/lib/lx-office-erp/xslt
-'
-
-for symspec in $SYMLINKS; do
-  set - `echo $symspec | sed -e 's/:/ /g'`
-  src=$1
-  tar=$2
-
-  ln -s $tar $SRC/DEBIAN/usr/lib/lx-office-erp/$src
-done
-#fertig
 
 mkdir -p $DEST
 cd $DEST
 
 #Struktur anlegen:
-cp -a $SRC/DEBIAN/* .
-rm ./mk*.sh
+cp -a $SRC/DEBIAN/DEBIAN .
+tar xzf $SRC/DEBIAN/struktur.tgz
 
 #Dateien kopieren:
 #aber keine fertigen Konfigurationen, nur *.default
@@ -97,6 +40,7 @@ cp -a $SRC/*.pl usr/lib/lx-office-erp
 cp $SRC/VERSION usr/lib/lx-office-erp
 cp $SRC/index.html usr/lib/lx-office-erp
 cp $SRC/config/lx-erp.conf  etc/lx-office-erp/lx-erp.conf.default
+cp $SRC/config/console.conf.default etc/lx-office-erp/
 cp $SRC/config/authentication.pl.default etc/lx-office-erp/
 cp $SRC/menu.ini usr/lib/lx-office-erp/menu.default
 cp -a $SRC/css var/lib/lx-office-erp
diff --git a/DEBIAN/struktur.tgz b/DEBIAN/struktur.tgz
new file mode 100644 (file)
index 0000000..a1b01c2
Binary files /dev/null and b/DEBIAN/struktur.tgz differ