packaging/RHEL-CTDB: add "BUILD_GPFS=no configure.rpm" and "BUILD_GPFS=no makerpms.sh"
[metze/samba/wip.git] / packaging / RHEL-CTDB / makespec.sh
index a8c582b6af9a695acd1c1594015be729f3d88010..7c8a8ee4f0a5bed5c29b3f368989b44cde5c4448 100755 (executable)
@@ -45,12 +45,19 @@ else
        echo "GITHASH: ${GITHASH}"
 fi
 
+if test "x$BUILD_GPFS" = "xno"; then
+       echo "GPFS: not build by default"
+       PGPFS_DEFAULT="%{?_with_gpfs: 1} %{?!_with_gpfs: 0}"
+else
+       echo "GPFS: build by default"
+       PGPFS_DEFAULT="%{?_with_no_gpfs: 0} %{?!_with_no_gpfs: 1}"
+fi
 
 sed \
-       -e s/PVERSION/${VERSION}/g \
-       -e s/GITHASH/${GITHASH}/g \
-       -e s/LIBTDBVERSION/${LIBTDBVERSION}/g \
-       -e s/LIBTALLOCVERSION/${LIBTALLOCVERSION}/g \
+       -e "s/PVERSION/${VERSION}/g" \
+       -e "s/GITHASH/${GITHASH}/g" \
+       -e "s/PGPFS_NO_DEFAULT/${PGPFS_NO_DEFAULT}/g" \
+       -e "s/PGPFS_DEFAULT/${PGPFS_DEFAULT}/g" \
        < ${SPECFILE}.tmpl \
        > ${SPECFILE}