diff -r b3a1e74cc78b -r e3c6a8f912f4 bacula/bacula.spec
--- a/bacula/bacula.spec Tue Aug 28 18:35:45 2012 +0200
+++ b/bacula/bacula.spec Tue Aug 28 18:36:20 2012 +0200
@@ -1,6 +1,6 @@
##
## bacula.spec -- OpenPKG RPM Package Specification
-## Copyright (c) 2000-2008 OpenPKG Foundation e.V.
+## Copyright (c) 2000-2010 OpenPKG Foundation e.V.
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
@@ -40,8 +40,8 @@
Class: PLUS
Group: System
License: GPL
-Version: 3.0.3
-Release: 20091028
+Version: 5.0.3
+Release: 20120208
# package options
%option with_server yes
@@ -50,7 +50,15 @@
%option with_dvd no
%option with_mtx no
%option with_python no
-%option with_dbback sqlite
+%option with_db_sqlite no
+%option with_db_pgsql no
+%option with_db_mysql no
+
+# package option sanity check
+%if "%{with_db_sqlite}" == "no" && "%{with_db_mysql}" == "no" && "%{with_db_pgsql}" == "no"
+%undefine with_db_sqlite
+%define with_db_sqlite yes
+%endif
# list of sources
Source0: http://switch.dl.sourceforge.net/bacula/bacula-%{version}.tar.gz
@@ -63,8 +71,8 @@
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes
PreReq: OpenPKG, openpkg >= 20060823
-BuildPreReq: ncurses, readline, zlib, gawk
-PreReq: ncurses, readline, zlib, gawk
+BuildPreReq: ncurses, readline, zlib
+PreReq: ncurses, readline, zlib
%if "%{with_ssl}" == "yes"
BuildPreReq: openssl >= 0.9.8, openssl::with_threads = yes
PreReq: openssl >= 0.9.8, openssl::with_threads = yes
@@ -73,15 +81,15 @@
BuildPreReq: tcpwrappers
PreReq: tcpwrappers
%endif
-%if "%{with_dbback}" == "sqlite"
+%if "%{with_db_sqlite}" == "yes"
BuildPreReq: sqlite
PreReq: sqlite
%endif
-%if "%{with_dbback}" == "mysql"
+%if "%{with_db_mysql}" == "yes"
BuildPreReq: mysql
PreReq: mysql
%endif
-%if "%{with_dbback}" == "postgresql"
+%if "%{with_db_pgsql}" == "yes"
BuildPreReq: postgresql
PreReq: postgresql
%endif
@@ -112,7 +120,7 @@
%track
prog bacula = {
version = %{version}
- url = http://prdownloads.sourceforge.net/bacula/
+ url = http://sourceforge.net/projects/bacula/files/
regex = bacula-(\d+\.\d*[02468]\.\d+)\.tar\.gz
}
@@ -145,13 +153,14 @@
# configure
LIBS=
case "%{l_platform -t}" in
- *-linux*) LIBS="-L/usr/lib/termcap";;
+ *-linux*) ldfl="-L/usr/lib/termcap" ;;
+ *-sunos*) ldfl="-ldl" ;;
esac
CC="%{l_cc}" \
CFLAGS="%{l_cflags -O}" \
CPPFLAGS="%{l_cppflags ncurses}" \
- LDFLAGS="%{l_ldflags} $LIBS" \
- LIBS="$libs" \
+ LDFLAGS="%{l_ldflags} $ldfl" \
+ LIBS="$libs -lz" \
GREP="grep" \
./configure \
--prefix=%{l_prefix} \
@@ -179,13 +188,13 @@
%if "%{with_wrap}" == "yes"
--with-tcp-wrappers=yes \
%endif
-%if "%{with_dbback}" == "sqlite"
+%if "%{with_db_sqlite}" == "yes"
--with-sqlite3=%{l_prefix} \
%endif
-%if "%{with_dbback}" == "mysql"
+%if "%{with_db_mysql}" == "yes"
--with-mysql=%{l_prefix} \
%endif
-%if "%{with_dbback}" == "postgresql"
+%if "%{with_db_pgsql}" == "yes"
--with-postgresql=%{l_prefix} \
%endif
%if "%{with_python}" == "yes" || "%{with_dvd}" == "yes"
@@ -209,6 +218,7 @@
%{l_make} %{l_mflags -O}
%install
+ # clean up build cruft
rm -rf $RPM_BUILD_ROOT
# create installation hierarchy