1.1 --- a/bacula/bacula.spec Tue Aug 28 18:35:45 2012 +0200 1.2 +++ b/bacula/bacula.spec Tue Aug 28 18:36:20 2012 +0200 1.3 @@ -1,6 +1,6 @@ 1.4 ## 1.5 ## bacula.spec -- OpenPKG RPM Package Specification 1.6 -## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> 1.8 ## 1.9 ## Permission to use, copy, modify, and distribute this software for 1.10 ## any purpose with or without fee is hereby granted, provided that 1.11 @@ -40,8 +40,8 @@ 1.12 Class: PLUS 1.13 Group: System 1.14 License: GPL 1.15 -Version: 3.0.3 1.16 -Release: 20091028 1.17 +Version: 5.0.3 1.18 +Release: 20120208 1.19 1.20 # package options 1.21 %option with_server yes 1.22 @@ -50,7 +50,15 @@ 1.23 %option with_dvd no 1.24 %option with_mtx no 1.25 %option with_python no 1.26 -%option with_dbback sqlite 1.27 +%option with_db_sqlite no 1.28 +%option with_db_pgsql no 1.29 +%option with_db_mysql no 1.30 + 1.31 +# package option sanity check 1.32 +%if "%{with_db_sqlite}" == "no" && "%{with_db_mysql}" == "no" && "%{with_db_pgsql}" == "no" 1.33 +%undefine with_db_sqlite 1.34 +%define with_db_sqlite yes 1.35 +%endif 1.36 1.37 # list of sources 1.38 Source0: http://switch.dl.sourceforge.net/bacula/bacula-%{version}.tar.gz 1.39 @@ -63,8 +71,8 @@ 1.40 BuildRoot: %{l_buildroot} 1.41 BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes 1.42 PreReq: OpenPKG, openpkg >= 20060823 1.43 -BuildPreReq: ncurses, readline, zlib, gawk 1.44 -PreReq: ncurses, readline, zlib, gawk 1.45 +BuildPreReq: ncurses, readline, zlib 1.46 +PreReq: ncurses, readline, zlib 1.47 %if "%{with_ssl}" == "yes" 1.48 BuildPreReq: openssl >= 0.9.8, openssl::with_threads = yes 1.49 PreReq: openssl >= 0.9.8, openssl::with_threads = yes 1.50 @@ -73,15 +81,15 @@ 1.51 BuildPreReq: tcpwrappers 1.52 PreReq: tcpwrappers 1.53 %endif 1.54 -%if "%{with_dbback}" == "sqlite" 1.55 +%if "%{with_db_sqlite}" == "yes" 1.56 BuildPreReq: sqlite 1.57 PreReq: sqlite 1.58 %endif 1.59 -%if "%{with_dbback}" == "mysql" 1.60 +%if "%{with_db_mysql}" == "yes" 1.61 BuildPreReq: mysql 1.62 PreReq: mysql 1.63 %endif 1.64 -%if "%{with_dbback}" == "postgresql" 1.65 +%if "%{with_db_pgsql}" == "yes" 1.66 BuildPreReq: postgresql 1.67 PreReq: postgresql 1.68 %endif 1.69 @@ -112,7 +120,7 @@ 1.70 %track 1.71 prog bacula = { 1.72 version = %{version} 1.73 - url = http://prdownloads.sourceforge.net/bacula/ 1.74 + url = http://sourceforge.net/projects/bacula/files/ 1.75 regex = bacula-(\d+\.\d*[02468]\.\d+)\.tar\.gz 1.76 } 1.77 1.78 @@ -145,13 +153,14 @@ 1.79 # configure 1.80 LIBS= 1.81 case "%{l_platform -t}" in 1.82 - *-linux*) LIBS="-L/usr/lib/termcap";; 1.83 + *-linux*) ldfl="-L/usr/lib/termcap" ;; 1.84 + *-sunos*) ldfl="-ldl" ;; 1.85 esac 1.86 CC="%{l_cc}" \ 1.87 CFLAGS="%{l_cflags -O}" \ 1.88 CPPFLAGS="%{l_cppflags ncurses}" \ 1.89 - LDFLAGS="%{l_ldflags} $LIBS" \ 1.90 - LIBS="$libs" \ 1.91 + LDFLAGS="%{l_ldflags} $ldfl" \ 1.92 + LIBS="$libs -lz" \ 1.93 GREP="grep" \ 1.94 ./configure \ 1.95 --prefix=%{l_prefix} \ 1.96 @@ -179,13 +188,13 @@ 1.97 %if "%{with_wrap}" == "yes" 1.98 --with-tcp-wrappers=yes \ 1.99 %endif 1.100 -%if "%{with_dbback}" == "sqlite" 1.101 +%if "%{with_db_sqlite}" == "yes" 1.102 --with-sqlite3=%{l_prefix} \ 1.103 %endif 1.104 -%if "%{with_dbback}" == "mysql" 1.105 +%if "%{with_db_mysql}" == "yes" 1.106 --with-mysql=%{l_prefix} \ 1.107 %endif 1.108 -%if "%{with_dbback}" == "postgresql" 1.109 +%if "%{with_db_pgsql}" == "yes" 1.110 --with-postgresql=%{l_prefix} \ 1.111 %endif 1.112 %if "%{with_python}" == "yes" || "%{with_dvd}" == "yes" 1.113 @@ -209,6 +218,7 @@ 1.114 %{l_make} %{l_mflags -O} 1.115 1.116 %install 1.117 + # clean up build cruft 1.118 rm -rf $RPM_BUILD_ROOT 1.119 1.120 # create installation hierarchy