[X2Go-Commits] [buildscripts] 01/01: don't build via SRPMs, obs-build can build from spec files directly

git-admin at x2go.org git-admin at x2go.org
Sun Oct 12 20:41:52 CEST 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository buildscripts.

commit aebc423fdce17c19e997d3706c93036037dd91a5
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Oct 12 20:41:43 2014 +0200

    don't build via SRPMs, obs-build can build from spec files directly
---
 bin/build-rpm-package |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 5013093..5754b75 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -210,7 +210,11 @@ build_packages() {
 				tar -czf $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SOURCES/$PROJECT-$UPSTREAM_VERSION.tar.gz $PROJECT-$UPSTREAM_VERSION
 
 				# create the SRPM package
-				rpmbuild -D "%_topdir $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild" -bs $PROJECT.spec
+				if [ "x$l_DIST" != "xopensuse" ]; then
+					rpmbuild -D "%_topdir $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild" -bs $PROJECT.spec
+				else
+					cp $PROJECT.spec $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SOURCES
+				fi
 
 				# clean up the Git clone from the temp folder
 				cd && rm $TEMP_DIR/$PROJECT -Rf
@@ -236,7 +240,7 @@ build_packages() {
 						             --repo "$OPENSUSE_DOWNLOAD_URL" \
 						             --root "/var/cache/obs-build/$l_DIST/$l_CODENAME/x86_64/" \
 						             --clean \
-						             $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SRPMS/$PROJECT-$UPSTREAM_VERSION-$PKG_SRCRELEASE.$IS_RELEASE.git$DATE.$GITREV.$COMPONENT.src.rpm; then
+						             $PKGDIST/$l_DIST/$l_CODENAME/$l_ARCH/rpmbuild/SOURCES/$PROJECT.spec; then
 							mkdir -p "$PKGDIST/$l_DIST/$l_CODENAME/x86_64/"
 							find "/var/cache/obs-build/$l_DIST/$l_CODENAME/x86_64/home/abuild/rpmbuild/RPMS/" -type f | egrep '.*\.rpm$' | while read rpmfile; do
 								cp "$rpmfile" "$PKGDIST/$l_DIST/$l_CODENAME/x86_64/"

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git


More information about the x2go-commits mailing list