]> git.sur5r.net Git - bacula/bacula/commitdiff
initial import
authorScott Barninger <scott@barninger.com>
Sat, 15 Apr 2006 11:03:07 +0000 (11:03 +0000)
committerScott Barninger <scott@barninger.com>
Sat, 15 Apr 2006 11:03:07 +0000 (11:03 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2919 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/platforms/build_rpm.sh [new file with mode: 0755]

diff --git a/bacula/platforms/build_rpm.sh b/bacula/platforms/build_rpm.sh
new file mode 100755 (executable)
index 0000000..c4c9413
--- /dev/null
@@ -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