From 598fc1457622fc46f8ecf5fd0ddc8cb06cf55323 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Tue, 14 Jul 2015 17:16:48 -0400 Subject: [PATCH] gh-8: Allow RPMs to be built on non-Linux hosts Patch provided by Bill Cole --- generate.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generate.sh b/generate.sh index 6748863..d6c6ec7 100755 --- a/generate.sh +++ b/generate.sh @@ -39,6 +39,8 @@ DESCRIPTION=${DESCRIPTION:-$DESC} PACKAGE_TYPE=${PACKAGE_TYPE:-deb} URL=${URL:-http://opennebula.org} +[ $PACKAGE_TYPE = rpm ] && PKGARGS="--rpm-os linux" + SCRIPTS_DIR=$PWD NAME="${PACKAGE_NAME}_${VERSION}.${PACKAGE_TYPE}" rm $NAME @@ -54,7 +56,7 @@ done cd tmp -fpm -n "$PACKAGE_NAME" -t "$PACKAGE_TYPE" -s dir --vendor "$VENDOR" \ +fpm -n "$PACKAGE_NAME" -t "$PACKAGE_TYPE" $PKGARGS -s dir --vendor "$VENDOR" \ --license "$LICENSE" --description "$DESCRIPTION" --url "$URL" \ -m "$MAINTAINER" -v "$VERSION" --after-install $SCRIPTS_DIR/postinstall \ -a all -p $SCRIPTS_DIR/$NAME *