Code

Added changelog entry.
[gosa.git] / gosa-core / contrib / make-gosa-package
index a276427410df61226565e5e8533dc5031ed4fce5..ae0f2b12e57f50a0d55a1424411cfb5a4b38ec4e 100755 (executable)
@@ -26,6 +26,7 @@ SI_SECTION="utils"
 TARGET_RELEASE="etch"
 MAKE_PLUGINS=""
 NOT_RELEASED="heimdal dak dfs glpi opsi apache2 ssh"
+DEBIAN_PKG="remove"
 
 usage() {
        cat <<-EOF
@@ -33,14 +34,15 @@ usage() {
        Usage: ${0##*/} [options]
        
        Options:
-         -b|--branch      Branch to export [$BRANCH]
-         -p|--plugins     Comma seperate list of plugins to build. Leave empty to build all.
-         -r|--release     Debian release to build for [$TARGET_RELEASE]
-         -c|--changelog   Debian changelog entry [$RELEASE_REASON]
-         -s|--section     Debian section to place GOsa in [$SECTION]
-         -i|--si-section  Debian section to place GOsa-SI in [$SI_SECTION]
-          -d|--debian-pkg  Don't clear up debian packages for plugins (for developers only)
-         -h|--help        this help
+         -b|--branch       Branch to export [$BRANCH]
+         -p|--plugins      Comma seperate list of plugins to build. Leave empty to build all.
+         -e|--experimental Build not released plugins (for testers and developers only)
+         -r|--release      Debian release to build for [$TARGET_RELEASE]
+         -c|--changelog    Debian changelog entry [$RELEASE_REASON]
+         -s|--section      Debian section to place GOsa in [$SECTION]
+         -i|--si-section   Debian section to place GOsa-SI in [$SI_SECTION]
+          -d|--debian-pkg   Don't clear up debian packages for plugins (for developers only)
+         -h|--help         this help
 
        EOF
        exit 1
@@ -54,7 +56,7 @@ for cmd in dh-make-gosa debchange dpkg-buildpackage dpkg-source svn; do
 done
 
 # Import command line parameters
-PARMS=`getopt -o d::b:r:s:c:i:p:,h --long branch:,changelog:,plugins:,section:,si-section:,release:,help -n "${0##*/}" -- "$@"`
+PARMS=`getopt -o e::d::b:r:s:c:i:p:,h --long branch:,changelog:,plugins:,section:,si-section:,release:,help -n "${0##*/}" -- "$@"`
 eval set -- "$PARMS"
 
 while true; do
@@ -67,12 +69,14 @@ while true; do
                        RELEASE_REASON=$2; shift 2 ;;
                 -p|--plugins)
                        MAKE_PLUGINS=$(echo $2 | tr ',' ' '); shift 2 ;;
+               -e|--experimental)
+                       NOT_RELEASED=""; shift 2;;
                 -s|--section)
                        SECTION=$2; shift 2 ;;
                 -i|--si-section)
                        SI_SECTION=$2; shift 2 ;;
                 -d|--debian-pkg)
-                        DEBIAN_PKG=$2; shift 2 ;;
+                        DEBIAN_PKG=""; shift 2 ;;
                 -h|--help)
                        usage ;;
                 --)
@@ -116,12 +120,16 @@ fi
 GOSA_DIR="gosa-${GOSA_VER}"
 GOSA_SI_DIR="gosa-si-${GOSA_VER}"
 
-if [ -d "gosa-${GOSA_VER}" ]
+if [ "$BNAME" != "$GOSA_VER" ]
 then
        rm -rf "gosa-${GOSA_VER}"
 fi
-mv "gosa-${BNAME}" "gosa-${GOSA_VER}"
-mv "gosa-si-${BNAME}" "gosa-si-${GOSA_VER}"
+
+if [ "$BNAME" != "$GOSA_VER" ]
+then
+       mv "gosa-${BNAME}" "gosa-${GOSA_VER}"
+       mv "gosa-si-${BNAME}" "gosa-si-${GOSA_VER}"
+fi
 
 echo "Creating original sources 'gosa-${GOSA_VER}'..."
 tar -c -f "gosa_${GOSA_VER}.orig.tar" "${GOSA_DIR}"