From ced655967ee33d55e388ed904bc2e87348c0c320 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 23 Feb 2009 08:02:58 +0000 Subject: [PATCH] Updated make gosa script git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13439 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/redhat/make-gosa-package | 37 +++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/gosa-core/redhat/make-gosa-package b/gosa-core/redhat/make-gosa-package index d5acc74ea..5cbca5bc2 100755 --- a/gosa-core/redhat/make-gosa-package +++ b/gosa-core/redhat/make-gosa-package @@ -47,13 +47,18 @@ VERSION=$(cat rpm_src/gosa-core/debian/changelog | head -n 1 | sed -n -e 's/.*(\ case "$distribution" in "RHEL" ) + rm -rf /var/tmp/gosa* build_path='/usr/src/redhat' + target='redhat' ;; "SLES" ) build_path='/usr/src/packages' + target='SLES' ;; "OpenSuse" ) + rm -rf /var/tmp/rpm-tmp* build_path='/usr/src/packages' + target='suse' ;; * ) echo "$distribution is unknown" @@ -64,7 +69,6 @@ esac # Clean up ## echo ".. some cleanup in '$build_path'" -rm -rf /var/tmp/gosa* rm -rf $build_path/RPMS/noarch/gosa* rm -rf $build_path/SOURCES/gosa* rm -rf $build_path/SPECS/gosa* @@ -101,7 +105,7 @@ sed "s/^Version:.*$/Version: $VERSION/" \ # Build GOsa RPM ## echo "Try to build package ... rpmbuild" -rpmbuild --quiet -bb $build_path/SPECS/gosa.spec +rpmbuild -bb $build_path/SPECS/gosa.spec if [ $? != 0 ] then echo "Error: Build error" @@ -136,10 +140,37 @@ for plugin in $MAKE_PLUGINS; do exit 1 fi - rpmbuild --quiet -bb $build_path/SPECS/gosa-plugin-$plugin.spec + rpmbuild -bb $build_path/SPECS/gosa-plugin-$plugin.spec if [ $? != 0 ] then echo "Error: Build error in $plugin" exit 1 fi done + +echo "" +echo "" +echo "" +echo "#### Build done " + +if [ ! -d "RPMS/$target" ] +then + mkdir -p "RPMS/$target" + + echo "Copying rpms to '$curdir/RPMS/$target'" + curdir=`pwd` + cp $build_path/RPMS/noarch/gosa* "RPMS/$target" +fi + + +if [ "$distribution" == "OpenSuse" ] +then + cd "RPMS/$target" + curdir=`pwd` + echo "Creating repostory in '$curdir'" + createrepo . +fi + + + + -- 2.30.2