summaryrefslogtreecommitdiff
path: root/bin/build-rpm-package
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-11-29 23:45:32 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2013-11-29 23:45:32 +0100
commit98c2c20b15e64d3730ec32b6019e5d72f070fa24 (patch)
treee64fbb70fdd837c2d45415ce9d51cbff1f1f6e1c /bin/build-rpm-package
parent7774c9200054ed4d18d50cf4964b912cdb3aaafe (diff)
downloadbuildscripts-98c2c20b15e64d3730ec32b6019e5d72f070fa24.tar.gz
buildscripts-98c2c20b15e64d3730ec32b6019e5d72f070fa24.tar.bz2
buildscripts-98c2c20b15e64d3730ec32b6019e5d72f070fa24.zip
manipulate %_topdir macro when evoking rpmbuild
Diffstat (limited to 'bin/build-rpm-package')
-rwxr-xr-xbin/build-rpm-package3
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index ab85fcc..2fcdb59 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -95,7 +95,6 @@ prepare_workspace() {
mkdir -p $PKGDIST/rpmbuild/SOURCES
# make sure our local working copy is up to date...
-
if [ -d "$PROJECT_DIR/.git" ]; then
cd "$PROJECT_DIR" && git reset --hard
git checkout --force $CHECKOUT || git checkout --force -b $CHECKOUT
@@ -180,7 +179,7 @@ build_packages() {
tar -czf $PKGDIST/rpmbuild/SOURCES/$PROJECT-$UPSTREAM_VERSION.tar.gz $PROJECT-$UPSTREAM_VERSION
# create the SRPM package
- rpmbuild --dbpath $PKGDIST/rpmbuild -bs $PROJECT.spec
+ rpmbuild -D "%_topdir $PKGDIST/rpmbuild" -bs $PROJECT.spec
# clean up the Git clone from the temp folder
cd && rm $TEMP_DIR/$PROJECT -Rf