Code

Added make-gosa-package for rpm's
[gosa.git] / gosa-core / redhat / make-gosa-package
1 #!/bin/sh
3 if [ $# -ne 1 ]; then
4         echo "Usage: make-all trunk"
5         exit 1
6 fi
8 what=$1
10 svn export https://oss.gonicus.de/repositories/gosa/$what/gosa-core
11 svn export https://oss.gonicus.de/repositories/gosa/$what/gosa-plugins
13 VERSION=$(cat gosa-core/debian/changelog | head -n 1 | sed -n -e 's/.*(\([^-]*\).*/\1/p')
15 cp -a gosa-core gosa-$VERSION
16 tar cvfj /usr/src/redhat/SOURCES/gosa-$VERSION.tar.bz2 gosa-$VERSION
17 cp gosa-$VERSION/redhat/0* /usr/src/redhat/SOURCES/
18 sed "s/^Version:.*$/Version:            $VERSION/" gosa-$VERSION/redhat/gosa.spec > /usr/src/redhat/SPECS/gosa.spec
20 rpmbuild -bb /usr/src/redhat/SPECS/gosa.spec
22 cd gosa-plugins
23 for plugin in *; do
24         ../gosa-core/redhat/rpm-make-gosa $plugin
25         rpmbuild -bb /usr/src/redhat/SPECS/gosa-plugin-$plugin.spec
26 done
28 rm -rf gosa-core
29 rm -rf gosa-$VERSION
30 rm -rf gosa-plugins