From: Scott Barninger Date: Sat, 15 Apr 2006 11:03:07 +0000 (+0000) Subject: initial import X-Git-Tag: Release-7.0.0~8072 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=42f31fe3889cf8387a80ac9e178a3f4a2b3edc0b;p=bacula%2Fbacula initial import git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2919 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/platforms/build_rpm.sh b/bacula/platforms/build_rpm.sh new file mode 100755 index 0000000000..c4c94134bc --- /dev/null +++ b/bacula/platforms/build_rpm.sh @@ -0,0 +1,64 @@ +#!/bin/sh + +# shell script to build bacula rpm release +# copy this script into your SPECS directory along with the spec file +# 09 Apr 2006 D. Scott Barninger + +# usage: ./build_rpm.sh platform mysql_version + +if [ "$1" = "--help" ]; then + echo + echo usage: ./build_rpm.sh platform mysql_version + echo + echo You must specify a platform: + echo rh7,rh8,rh9,fc1,fc3,fc4,wb3,rhel3,rhel4,centos3,centos4,su9,su10,mdk + echo + echo You must specify a MySQL version either 3 or 4. + echo + echo Example: ./build_rpm.sh fc4 4 + exit 1 +fi + +PLATFORM=$1 +MYSQL=$2 + +if [ -z "$PLATFORM" ]; then + echo + echo usage: ./build_rpm.sh platform mysql_version + echo + echo You must specify a platform: + echo rh7,rh8,rh9,fc1,fc3,fc4,wb3,rhel3,rhel4,centos3,centos4,su9,su10,mdk + exit 1 +fi +if [ -z "$MYSQL" ]; then + echo + echo usage: ./build_rpm.sh platform mysql_version + echo + echo You must specify a MySQL version either 3 or 4. + exit 1 +fi + +if [ "$MYSQL" = "3" ]; then + MYSQL_VER=mysql +fi +if [ "$MYSQL" = "4" ]; then + MYSQL_VER=mysql4 +fi + +echo Building MySQL packages for "$PLATFORM"... +sleep 5 +rpmbuild -ba --define "build_${PLATFORM} 1" \ + --define "build_${MYSQL_VER} 1" \ + bacula.spec + +echo Building PostgreSQL packages for "$PLATFORM"... +sleep 5 +rpmbuild -bb --define "build_${PLATFORM} 1" \ + --define "build_postgresql 1" \ + bacula.spec + +echo Building SQLite packages for "$PLATFORM"... +sleep 5 +rpmbuild -bb --define "build_${PLATFORM} 1" \ + --define "build_sqlite 1" \ + bacula.spec