Code

Updated debian infrastructure
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 12 Dec 2007 08:59:23 +0000 (08:59 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 12 Dec 2007 08:59:23 +0000 (08:59 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8089 594d385d-05f5-0310-b6e9-bd551577e9d8

debian/control.sarge [deleted file]
debian/rules

diff --git a/debian/control.sarge b/debian/control.sarge
deleted file mode 100644 (file)
index c14904d..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-Source: gosa
-Section: web
-Priority: optional
-Maintainer: Cajus Pollmeier <cajus@debian.org>
-Build-Depends-Indep: debhelper(>= 4.1.16), dpatch
-Standards-Version: 3.7.2.0
-
-Package: gosa
-Architecture: all
-Depends: php5 | php4 (>= 4:4.3.10-16), apache | apache-ssl | apache2-mpm-worker | apache2-mpm-threadpool | apache2-mpm-prefork | apache2-mpm-perchild, exim4 | mail-transport-agent, php4-gd | php5-gd, php4-imap | php5-imap, php4-ldap | php5-ldap, php4-mhash | php5-mhash, php4-mysql | php5-mysql, php4-imagick | php5-imagick | imagemagick (>= 5.4.4.5-1) | graphicsmagick-im-compat, fping, libcrypt-smbhash-perl, php4-recode | php5-recode, wwwconfig-common
-Suggests: cyrus21-imapd (>= 2.1.11), postfix-ldap, php4-kadm5, etherwake, slapd, gosa-schema
-Description: Web Based LDAP Administration Program
- Provided is access to posix, shadow, samba, proxy, fax, pureftp and
- kerberos accounts. It is able to manage the postfix/cyrus server
- combination and can write user adapted sieve scripts.
- .
- GOsa is a combination of system-administrator and end-user web
- interface, designed to handle LDAP based setups.
-
-Package: gosa-desktop
-Architecture: all
-Depends: iceweasel | mozilla | firefox, debconf, po-debconf
-Suggests: xbase-clients
-Description: Desktop integration for GOsa
- This package includes a menu definition for your desktop
- environment.
- .
- GOsa is a combination of system-administrator and end-user web
- interface, designed to handle LDAP based setups.
-
-Package: gosa-schema
-Architecture: all
-Depends: slapd
-Description: LDAP schema for GOsa
- This package includes the LDAP schema needed by GOsa.
- .
- GOsa is a combination of system-administrator and end-user web
- interface, designed to handle LDAP based setups.
-
-Package: gosa-help-de
-Architecture: all
-Depends: gosa
-Description: German online help for GOsa
- This package includes the German online documentation for GOsa
- .
- GOsa is a combination of system-administrator and end-user web
- interface, designed to handle LDAP based setups.
-
-Package: gosa-help-fr
-Architecture: all
-Depends: gosa
-Description: French online help for GOsa
- This package includes the French online documentation for GOsa
- .
- GOsa is a combination of system-administrator and end-user web
- interface, designed to handle LDAP based setups.
-
-Package: gosa-help-nl
-Architecture: all
-Depends: gosa
-Description: Dutch online help for GOsa
- This package includes the Dutch online documentation for GOsa
- .
- GOsa is a combination of system-administrator and end-user web
- interface, designed to handle LDAP based setups.
-
-Package: gosa-help-en
-Architecture: all
-Depends: gosa
-Description: English online help for GOsa
- This package includes the English online documentation for GOsa
- .
- GOsa is a combination of system-administrator and end-user web
- interface, designed to handle LDAP based setups.
-
index 25b91fcedee80f6d3f8567826f9bde5081e1533c..b095ca434a19be3c39e271ea7db01bfc2dd58ee3 100755 (executable)
@@ -1,11 +1,11 @@
 #!/usr/bin/make -f
-# Made with the aid of dh_make, by Craig Small
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
-# Some lines taken from debmake, by Cristoph Lameter.
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+# Configure smarty location
+export SMARTY_LOCATION=/usr/share/php/smarty/libs
+
 build: patch 
        #*************************************************
        #* Building GOsa into a Debian/GNU Linux Package *
@@ -31,79 +31,92 @@ install-stamp:
        dh_clean -k
        dh_installdirs
 
+       # Move everything but debian to the destination directory
        for i in `ls | grep -v debian`; do \
          cp -R $$i debian/gosa/usr/share/gosa ; \
        done
+
+       # Clean up with SVN directories
        -find debian/gosa -type d -name ".svn" -exec rm -rf {} \; &> /dev/null || /bin/true
-       -cp -R debian/gosa/usr/share/gosa/contrib/* debian/gosa/usr/share/doc/gosa/contrib/
-       -cp debian/gosa/usr/share/gosa/contrib/openldap/go*.schema debian/gosa-schema/etc/ldap/schema
+
+       # Move schema files to the schema package
+       -mv debian/gosa/usr/share/gosa/contrib/openldap/go*.schema debian/gosa-schema/etc/ldap/schema
+
+       # Install changelogs
+       -for package in gosa gosa-schema gosa-desktop gosa-help-de gosa-help-en gosa-help-fr gosa-help-nl smarty-render; do \
+               [[ ! -d debian/$package/usr/share/doc/$package ]] && mkdir -p debian/$package/usr/share/doc/$package ; \
+               gzip -c9 debian/changelog > debian/$package/usr/share/doc/$package/changelog.Debian.gz ; \
+       done
+
+       # Move contrib to doc
+       -mv -R debian/gosa/usr/share/gosa/contrib debian/gosa/usr/share/doc/gosa/
+
+       # Put docs in shape
        -cp -R INSTALL debian/gosa/usr/share/doc/gosa/README.INSTALL
-       -gzip -c9 debian/changelog > debian/gosa/usr/share/doc/gosa/changelog.Debian.gz
-       -mkdir -p debian/gosa-schema/usr/share/doc/gosa-schema
-       -gzip -c9 debian/changelog > debian/gosa-schema/usr/share/doc/gosa-schema/changelog.Debian.gz
-       -mkdir -p debian/gosa-desktop/usr/share/doc/gosa-desktop
-       -gzip -c9 debian/changelog > debian/gosa-desktop/usr/share/doc/gosa-desktop/changelog.Debian.gz
-       -mkdir -p debian/gosa-help-de/usr/share/doc/gosa-help-de
-       -gzip -c9 debian/changelog > debian/gosa-help-de/usr/share/doc/gosa-help-de/changelog.Debian.gz
-       -mkdir -p debian/gosa-help-en/usr/share/doc/gosa-help-en
-       -gzip -c9 debian/changelog > debian/gosa-help-en/usr/share/doc/gosa-help-en/changelog.Debian.gz
-       -mkdir -p debian/gosa-help-fr/usr/share/doc/gosa-help-fr
-       -gzip -c9 debian/changelog > debian/gosa-help-fr/usr/share/doc/gosa-help-fr/changelog.Debian.gz
-       -mkdir -p debian/gosa-help-nl/usr/share/doc/gosa-help-nl
-       -gzip -c9 debian/changelog > debian/gosa-help-nl/usr/share/doc/gosa-help-nl/changelog.Debian.gz
-       -gzip -c9 Changelog > debian/gosa/usr/share/doc/gosa/changelog.gz
-       -mkdir -p debian/smarty-render/usr/share/doc/smarty-render
-       -gzip -c9 debian/changelog > debian/smarty-render/usr/share/doc/smarty-render/changelog.Debian.gz
        -cp AUTHORS README FAQ doc/README.pptp doc/README.xls-export doc/README.glpi doc/README.nagios doc/README.phpscheduleit doc/README.safemode doc/README.devel doc/README.openxchange debian/gosa/usr/share/doc/gosa/
+
+       # Remove docs that are located in the wrong location
        -rm debian/gosa/usr/share/gosa/doc/README.ssh
-       -rm debian/gosa/usr/share/gosa/README debian/gosa/usr/share/gosa/INSTALL
-       -rm debian/gosa/usr/share/gosa/AUTHORS debian/gosa/usr/share/gosa/Changelog
-       -rm debian/gosa/usr/share/gosa/COPYING debian/gosa/usr/share/gosa/TODO
-       -rm debian/gosa/usr/share/gosa/FAQ
-       -mkdir -p debian/gosa/var/spool/gosa/compile
-       -mkdir -p debian/gosa/var/spool/gosa/config
-       -mkdir -p debian/gosa/var/spool/gosa/cache
-       -rm -rf debian/gosa/usr/share/gosa/compile
-       -mv debian/gosa/usr/share/gosa/fix_config.sh debian/gosa/usr/share/doc/gosa/contrib
+       -for doc in README INSTALL AUTHORS Changelog COPYING TODO FAQ; do \
+               rm debian/gosa/usr/share/gosa/$doc ; \
+       done
+
+       # Create missing directories
+       -for dir in compile config cache; do \
+               mkdir -p debian/gosa/var/spool/gosa/dir ; \
+       done
        -mkdir -p debian/gosa/etc/gosa/vacation
+       -mkdir -p debian/gosa/usr/lib/gosa
+       -mkdir -p debian/smarty-render/usr/share/php/smarty/libs/plugins
+
+       # Feed etc directory
        -cp -R debian/apache.conf debian/gosa/etc/gosa/apache.conf
        -cp -R contrib/encodings debian/gosa/etc/gosa/encodings
        -cp -R plugins/personal/mail/sieve-*.txt debian/gosa/etc/gosa
        -cp contrib/shells debian/gosa/etc/gosa
-       -rm debian/gosa/usr/share/gosa/bin/gosa
-       -mkdir -p debian/gosa/usr/lib/gosa
+
+       # Install binaries
        -mv debian/gosa/usr/share/gosa/bin/* debian/gosa/usr/bin
-       -rm -rf debian/gosa/usr/share/gosa/bin
-       -rm -rf debian/gosa/usr/share/doc/gosa/marketing
-       -find debian/gosa -type f -exec chmod -x {} \; &> /dev/null
-       -chmod +x debian/gosa/usr/bin/mkntpasswd
-       -rm -rf debian/gosa/usr/share/gosa/doc/guide/user/*/lyx-source
-       -rm -rf debian/gosa/usr/share/gosa/doc/guide/admin
-       -rm -rf debian/gosa/usr/share/gosa/doc/guide/devel
+
+       # Install documentation
        -for lang in en de fr nl; do mkdir -p debian/gosa-help-$$lang/usr/share/gosa/doc/guide/user/$$lang; done
        -for lang in en de fr nl; do mv debian/gosa/usr/share/gosa/doc/guide/user/$$lang/* debian/gosa-help-$$lang/usr/share/gosa/doc/guide/user/$$lang/; done
-       -cp -R debian/gosa/usr/share/gosa/doc/* debian/gosa/usr/share/doc/gosa
+
+       # Create gosa-desktop package
        -cp -R contrib/scripts/desktoprc debian/gosa-desktop/etc/gosa/desktoprc
-       -cp -R contrib/scripts/start-gosa.sh debian/gosa-desktop/usr/bin/gosa
+       -cp -R contrib/scripts/gosa debian/gosa-desktop/usr/bin/gosa
        -cp -R debian/gosa*.xpm debian/gosa-desktop/usr/share/pixmaps
        -cp -R debian/gosa-desktop.desktop debian/gosa-desktop/usr/share/applications/gosa.desktop
+
+       # Clean up
        -rm -rf debian/gosa/usr/share/gosa/contrib
        -rm -rf debian/gosa/usr/share/gosa/locale/en
        -rm -rf debian/gosa/usr/share/gosa/update-locale
        -rm -rf debian/gosa/usr/share/gosa/update-pdf-help
        -rm -rf debian/gosa/usr/share/gosa/patch-stamp
        -rm -rf debian/gosa/usr/share/gosa/update-online-help
+       -rm -rf debian/gosa/usr/share/gosa/bin
+       -rm -rf debian/gosa/usr/share/gosa/doc/guide/user/*/lyx-source
+       -rm -rf debian/gosa/usr/share/gosa/doc/guide/admin
+       -rm -rf debian/gosa/usr/share/gosa/doc/guide/devel
        -rm -rf debian/gosa/usr/share/doc/gosa/guide*
-       sed 's%"CONFIG_TEMPLATE_DIR", "../contrib/"%"CONFIG_TEMPLATE_DIR", "/usr/share/doc/gosa/contrib/"%g' debian/gosa/usr/share/gosa/include/functions.inc > debian/gosa/usr/share/gosa/include/functions.inc.new; \
-       mv debian/gosa/usr/share/gosa/include/functions.inc.new debian/gosa/usr/share/gosa/include/functions.inc;
-       mkdir -p debian/smarty-render/usr/share/php/smarty/libs/plugins
+       -rm -rf debian/gosa/usr/share/doc/gosa/marketing
+
+       # Configure smarty location - hey ubuntu's please change SMARTY_LOCATION up there
+       sed -i 's%"CONFIG_TEMPLATE_DIR", "../contrib/"%"CONFIG_TEMPLATE_DIR", "/usr/share/doc/gosa/contrib/"%g' debian/gosa/usr/share/gosa/include/functions.inc 
        cp include/smarty/plugins/block.render.php debian/smarty-render/usr/share/php/smarty/libs/plugins
-       chmod -x debian/smarty-render/usr/share/php/smarty/libs/plugins/*
        rm -rf debian/gosa/usr/share/gosa/include/smarty; \
-       sed 's%require("smarty/Smarty.class.php");%require("/usr/share/php/smarty/libs/Smarty.class.php");%g' debian/gosa/usr/share/gosa/include/php_setup.inc > debian/gosa/usr/share/gosa/include/php_setup.inc.new; \
-       mv debian/gosa/usr/share/gosa/include/php_setup.inc.new debian/gosa/usr/share/gosa/include/php_setup.inc; \
+       sed -i "s%require(\"smarty/Smarty.class.php\");%require(\"$SMARTY_LOCATION/Smarty.class.php\");%g" debian/gosa/usr/share/gosa/include/php_setup.inc
+
+       # Fix permissions
+       -find debian/gosa -type f -exec chmod -x {} \; &> /dev/null
+       -find debian/smarty-render -type f -exec chmod -x {} \; &> /dev/null
+       -chmod +x debian/gosa/usr/bin/mkntpasswd
+
+       # Install lintian/linda overrides
        install -D -m 644 debian/overrides-lintian debian/gosa/usr/share/lintian/overrides/gosa
        install -D -m 644 debian/overrides-linda debian/gosa/usr/share/linda/overrides/gosa
+
        touch install-stamp
 
 patch: patch-stamp