diff -r 8adc5213fd55 -r 5ba5c2911c12 bacula/bacula.spec --- a/bacula/bacula.spec Wed Jan 07 00:25:41 2009 +0100 +++ b/bacula/bacula.spec Wed Jan 07 00:31:22 2009 +0100 @@ -32,7 +32,7 @@ Group: System License: GPL Version: 2.4.3 -Release: 20081013 +Release: 20081118 # package options %option with_server yes @@ -62,8 +62,8 @@ BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes PreReq: OpenPKG, openpkg >= 20060823 -BuildPreReq: readline, zlib -PreReq: readline, zlib +BuildPreReq: ncurses, readline, zlib +PreReq: ncurses, readline, zlib %if "%{with_ssl}" == "yes" BuildPreReq: openssl >= 0.9.8 PreReq: openssl >= 0.9.8 @@ -129,9 +129,16 @@ -e "s;For Bacula release @VERSION@ .*;;" \ `find . -name "*.conf.in"` + # help specific platforms find fdatasync(3) + libs="" + case "%{l_platform -t}" in + *-sunos* ) libs="-lrt" ;; + esac + # use localhost as default host %{l_shtool} subst \ -e 's;hostname=.*;hostname=localhost;g' \ + -e 's;\(CONS_LIBS="-lreadline.*\)-ltermcap;\1-lncurses;g' \ configure # configure @@ -141,8 +148,9 @@ esac CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ - CPPFLAGS="%{l_cppflags}" \ + CPPFLAGS="%{l_cppflags ncurses}" \ LDFLAGS="%{l_ldflags} $LIBS" \ + LIBS="$libs" \ ./configure \ --prefix=%{l_prefix} \ --with-dir-user=%{l_rusr} \ @@ -183,11 +191,14 @@ %endif --enable-wx-console=no \ --sysconfdir=%{l_prefix}/etc/bacula \ + --libexecdir=%{l_prefix}/libexec/bacula \ --mandir=%{l_prefix}/man \ --with-scriptdir=%{l_prefix}/libexec/bacula \ --with-working-dir=%{l_prefix}/var/bacula \ --with-pid-dir=%{l_prefix}/var/bacula/run \ --with-subsys-dir=%{l_prefix}/var/bacula/run/subsys \ + --with-archivedir=/tmp \ + --with-sbin-perm=0755 \ --disable-nls # build @@ -217,10 +228,9 @@ %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT # strip down installation - # do not strip binaries, to make it easier to diagnose problems - # strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true + strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2>/dev/null || true ( cd $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula && - for unwanted in bconsole startmysql stopmysql; do + for unwanted in startmysql stopmysql; do rm -f $unwanted done ) || exit $? @@ -228,18 +238,20 @@ # install additional files %{l_shtool} install -c -m 754 %{l_value -s -a} \ %{SOURCE bexec.sh} $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec + %{l_shtool} install -c -m 640 \ + src/console/bconsole.conf $RPM_BUILD_ROOT%{l_prefix}/etc/bacula/ - # wrap binaries to avoid to specify "-c" for each run - ( cd $RPM_BUILD_ROOT%{l_prefix}/sbin - for bin in bacula-dir bacula-fd bacula-sd \ - bconsole bcopy bextract bls bscan dbcheck \ - tray-monitor wx-console; do - if [ -x $bin ]; then - mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula - ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin - fi - done - ) || exit $? + ## wrap binaries to avoid to specify "-c" for each run + #( cd $RPM_BUILD_ROOT%{l_prefix}/sbin + # for bin in bacula-dir bacula-fd bacula-sd \ + # bconsole bcopy bextract bls bscan dbcheck \ + # tray-monitor wx-console; do + # if [ -x $bin ]; then + # mv $bin $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula + # ln $RPM_BUILD_ROOT%{l_prefix}/libexec/bacula/bexec ./$bin + # fi + # done + #) || exit $? # install run-command script %{l_shtool} install -c -m 755 %{l_value -s -a} \