Code

Added make-gosa-package for rpm's
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 2 Dec 2008 14:44:41 +0000 (14:44 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 2 Dec 2008 14:44:41 +0000 (14:44 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13122 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/redhat/make-gosa-package [new file with mode: 0755]

diff --git a/gosa-core/redhat/make-gosa-package b/gosa-core/redhat/make-gosa-package
new file mode 100755 (executable)
index 0000000..5bc5add
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+if [ $# -ne 1 ]; then
+       echo "Usage: make-all trunk"
+       exit 1
+fi
+
+what=$1
+
+svn export https://oss.gonicus.de/repositories/gosa/$what/gosa-core
+svn export https://oss.gonicus.de/repositories/gosa/$what/gosa-plugins
+
+VERSION=$(cat gosa-core/debian/changelog | head -n 1 | sed -n -e 's/.*(\([^-]*\).*/\1/p')
+
+cp -a gosa-core gosa-$VERSION
+tar cvfj /usr/src/redhat/SOURCES/gosa-$VERSION.tar.bz2 gosa-$VERSION
+cp gosa-$VERSION/redhat/0* /usr/src/redhat/SOURCES/
+sed "s/^Version:.*$/Version:            $VERSION/" gosa-$VERSION/redhat/gosa.spec > /usr/src/redhat/SPECS/gosa.spec
+
+rpmbuild -bb /usr/src/redhat/SPECS/gosa.spec
+
+cd gosa-plugins
+for plugin in *; do
+        ../gosa-core/redhat/rpm-make-gosa $plugin
+        rpmbuild -bb /usr/src/redhat/SPECS/gosa-plugin-$plugin.spec
+done
+
+rm -rf gosa-core
+rm -rf gosa-$VERSION
+rm -rf gosa-plugins