1.1 --- a/bacula/bacula.spec Wed Jan 07 00:25:41 2009 +0100 1.2 +++ b/bacula/bacula.spec Wed Jan 07 00:31:22 2009 +0100 1.3 @@ -32,7 +32,7 @@ 1.4 Group: System 1.5 License: GPL 1.6 Version: 2.4.3 1.7 -Release: 20081013 1.8 +Release: 20081118 1.9 1.10 # package options 1.11 %option with_server yes 1.12 @@ -62,8 +62,8 @@ 1.13 BuildRoot: %{l_buildroot} 1.14 BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes 1.15 PreReq: OpenPKG, openpkg >= 20060823 1.16 -BuildPreReq: readline, zlib 1.17 -PreReq: readline, zlib 1.18 +BuildPreReq: ncurses, readline, zlib 1.19 +PreReq: ncurses, readline, zlib 1.20 %if "%{with_ssl}" == "yes" 1.21 BuildPreReq: openssl >= 0.9.8 1.22 PreReq: openssl >= 0.9.8 1.23 @@ -129,9 +129,16 @@ 1.24 -e "s;For Bacula release @VERSION@ .*;;" \ 1.25 `find . -name "*.conf.in"` 1.26 1.27 + # help specific platforms find fdatasync(3) 1.28 + libs="" 1.29 + case "%{l_platform -t}" in 1.30 + *-sunos* ) libs="-lrt" ;; 1.31 + esac 1.32 + 1.33 # use localhost as default host 1.34 %{l_shtool} subst \ 1.35 -e 's;hostname=.*;hostname=localhost;g' \ 1.36 + -e 's;\(CONS_LIBS="-lreadline.*\)-ltermcap;\1-lncurses;g' \ 1.37 configure 1.38 1.39 # configure 1.40 @@ -141,8 +148,9 @@ 1.41 esac 1.42 CC="%{l_cc}" \ 1.43 CFLAGS="%{l_cflags -O}" \ 1.44 - CPPFLAGS="%{l_cppflags}" \ 1.45 + CPPFLAGS="%{l_cppflags ncurses}" \ 1.46 LDFLAGS="%{l_ldflags} $LIBS" \ 1.47 + LIBS="$libs" \ 1.48 ./configure \ 1.49 --prefix=%{l_prefix} \ 1.50 --with-dir-user=%{l_rusr} \ 1.51 @@ -183,11 +191,14 @@ 1.52 %endif 1.53 --enable-wx-console=no \ 1.54 --sysconfdir=%{l_prefix}/etc/bacula \ 1.55 + --libexecdir=%{l_prefix}/libexec/bacula \ 1.56 --mandir=%{l_prefix}/man \ 1.57 --with-scriptdir=%{l_prefix}/libexec/bacula \ 1.58 --with-working-dir=%{l_prefix}/var/bacula \ 1.59 --with-pid-dir=%{l_prefix}/var/bacula/run \ 1.60 --with-subsys-dir=%{l_prefix}/var/bacula/run/subsys \ 1.61 + --with-archivedir=/tmp \ 1.62 + --with-sbin-perm=0755 \ 1.63 --disable-nls 1.64 1.65 # build 1.66 @@ -217,10 +228,9 @@ 1.67 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 1.68 1.69 # strip down installation 1.70 - # do not strip binaries, to make it easier to diagnose problems 1.71 - # strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true 1.72 + strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true 1.73 ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula && 1.74 - for unwanted in bconsole startmysql stopmysql; do 1.75 + for unwanted in startmysql stopmysql; do 1.76 rm -f $unwanted 1.77 done 1.78 ) || exit $? 1.79 @@ -228,18 +238,20 @@ 1.80 # install additional files 1.81 %{l_shtool} install -c -m 754 %{l_value -s -a} \ 1.82 %{SOURCE bexec.sh} $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec 1.83 + %{l_shtool} install -c -m 640 \ 1.84 + src/console/bconsole.conf $RPM_BUILD_ROOT%{l_prefix}/etc/bacula/ 1.85 1.86 - # wrap binaries to avoid to specify "-c" for each run 1.87 - ( cd $RPM_BUILD_ROOT%{l_prefix}/sbin 1.88 - for bin in bacula-dir bacula-fd bacula-sd \ 1.89 - bconsole bcopy bextract bls bscan dbcheck \ 1.90 - tray-monitor wx-console; do 1.91 - if [ -x $bin ]; then 1.92 - mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula 1.93 - ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin 1.94 - fi 1.95 - done 1.96 - ) || exit $? 1.97 + ## wrap binaries to avoid to specify "-c" for each run 1.98 + #( cd $RPM_BUILD_ROOT%{l_prefix}/sbin 1.99 + # for bin in bacula-dir bacula-fd bacula-sd \ 1.100 + # bconsole bcopy bextract bls bscan dbcheck \ 1.101 + # tray-monitor wx-console; do 1.102 + # if [ -x $bin ]; then 1.103 + # mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula 1.104 + # ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin 1.105 + # fi 1.106 + # done 1.107 + #) || exit $? 1.108 1.109 # install run-command script 1.110 %{l_shtool} install -c -m 755 %{l_value -s -a} \