]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/platforms/mandrake/bacula.spec.in
Add build tag for distribution name.
[bacula/bacula] / bacula / platforms / mandrake / bacula.spec.in
index 97e0fef5c795b31f0dd8183bc5d118e3a35a1481..8f9060e8f745f58293aa7fe19c0c721588784899 100644 (file)
@@ -255,6 +255,7 @@ exit 1
 %if %{mdk}
 %define _dist %(grep Mand /etc/mandrake-release)
 %endif
+%{?DISTNAME:%define _dist %{DISTNAME}}
 Distribution: %{_dist}
 
 # Should we build gconsole, possible only if gtk= >= 2.4 available.
@@ -273,9 +274,9 @@ Distribution: %{_dist}
 # specifically disallow gconsole if desired
 %{?nobuild_gconsole:%define gconsole 0}
 
-# specifically disallow rescue files if desired
-%define rescue 1
-%{?nobuild_rescue:%define rescue 0}
+# specifically disallow rescue files
+%define rescue 0
+%{?build_rescue:%define rescue 1}
 
 # Should we build wxconsole, only wxWidgets >=2.6 is supported
 # SuSE 10 and FC4 and newer
@@ -1565,6 +1566,7 @@ make
        --disable-batch-insert \
 %endif
        --mandir=%{_mandir} \
+       --with-plugindir=%{script_dir} \
         --with-subsys-dir=%{_subsysdir} \
         --with-dir-user=%{director_daemon_user} \
         --with-dir-group=%{daemon_group} \
@@ -1614,15 +1616,7 @@ mkdir -p $RPM_BUILD_ROOT/usr/bin
 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
 %endif
 
-make \
-        prefix=$RPM_BUILD_ROOT%{_prefix} \
-        sbindir=$RPM_BUILD_ROOT%{_sbindir} \
-       sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
-       scriptdir=$RPM_BUILD_ROOT%{script_dir} \
-        working_dir=$RPM_BUILD_ROOT%{working_dir} \
-       piddir=$RPM_BUILD_ROOT%{pid_dir} \
-       mandir=$RPM_BUILD_ROOT%{_mandir} \
-        install
+make DESTDIR=$RPM_BUILD_ROOT install
 
 %if ! %{client_only} && %{mtx}
 cd %{depkgs}
@@ -1856,6 +1850,11 @@ cp -p src/qt-console/bat $RPM_BUILD_ROOT%{_sbindir}/bat
 cp -p src/qt-console/bat.conf $RPM_BUILD_ROOT%{sysconf_dir}/bat.conf
 %endif
 
+# remove the docs installed by make
+%if ! %{single_dir}
+rm -rf $RPM_BUILD_ROOT/usr/share/doc
+%endif
+
 # install docs for single dir installation
 %if %{single_dir}
 mkdir $RPM_BUILD_ROOT%{_prefix}/doc
@@ -1863,6 +1862,7 @@ cp COPYING $RPM_BUILD_ROOT%{_prefix}/doc/
 cp ChangeLog $RPM_BUILD_ROOT%{_prefix}/doc/
 cp ReleaseNotes $RPM_BUILD_ROOT%{_prefix}/doc/
 cp VERIFYING $RPM_BUILD_ROOT%{_prefix}/doc/
+cp LICENSE $RPM_BUILD_ROOT%{_prefix}/doc/
 cp kernstodo $RPM_BUILD_ROOT%{_prefix}/doc/
 cp %{_docsrc}/manual/bacula.pdf $RPM_BUILD_ROOT%{_prefix}/doc/
 cp %{_docsrc}/developers/developers.pdf $RPM_BUILD_ROOT%{_prefix}/doc/
@@ -1955,11 +1955,13 @@ rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-dir
 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-fd
 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-sd
+%attr(-, root, %{daemon_group}) %{script_dir}/bpipe-fd.so
 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
 %attr(-, root, %{storage_daemon_group}) %{script_dir}/dvd-handler
 %attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
 %attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer
+%attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer.conf
 
 /etc/logrotate.d/bacula
 /etc/log.d/scripts/services/bacula
@@ -1976,6 +1978,7 @@ rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
 %{_sbindir}/bacula-dir
 %{_sbindir}/bacula-fd
 %{_sbindir}/bacula-sd
+%{_sbindir}/bacula
 %{_sbindir}/bcopy
 %{_sbindir}/bextract
 %{_sbindir}/bls
@@ -2000,6 +2003,7 @@ rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
 %{_mandir}/man8/btraceback.8.%{manpage_ext}
 %{_mandir}/man8/dbcheck.8.%{manpage_ext}
 %{_mandir}/man1/bsmtp.1.%{manpage_ext}
+%{_libdir}/libbac*
 %endif
 
 %if ! %{client_only} && %{rescue}
@@ -2007,7 +2011,7 @@ rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
 %endif
 
 %if ! %{client_only} && ! %{single_dir}
-%doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
+%doc COPYING ChangeLog ReleaseNotes LICENSE VERIFYING kernstodo 
 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
 %endif
 
@@ -2017,7 +2021,7 @@ rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
 
 %if %{mysql}
 %pre mysql
-# test for bacula database older than version 9
+# test for bacula database older than version 10
 # note: this ASSUMES no password has been set for bacula database
 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
 %endif
@@ -2046,7 +2050,7 @@ if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
        echo "chown bacula.bacula bacula.db"
        exit 1
 fi
-# test for bacula database older than version 9 and sqlite3
+# test for bacula database older than version 10 and sqlite3
 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite3 ];then
         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite3 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
 %endif
@@ -2057,13 +2061,13 @@ DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head
 %endif
 
 %if ! %{client_only}
-if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "9" ]; then
-        echo "This bacula upgrade will update a bacula database from version 9 to 10."
+if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "10" ]; then
+        echo "This bacula upgrade will update a bacula database from version 10 to 11."
         echo "You appear to be running database version $DB_VER. You must first update"
-        echo "your database to version 9 and then install this upgrade. The alternative"
+        echo "your database to version 10 and then install this upgrade. The alternative"
        echo "is to use %{script_dir}/drop_%{db_backend}_tables to delete all your your current"
         echo "catalog information, then do the upgrade. Information on updating a"
-        echo "database older than version 9 can be found in the release notes."
+        echo "database older than version 10 can be found in the release notes."
         exit 1
 fi
 %endif
@@ -2163,8 +2167,8 @@ if [ -z "$DB_VER" ]; then
         echo "Creating bacula tables..."
        %{script_dir}/make_mysql_tables
 
-# check to see if we need to upgrade a 1.38 or lower database
-elif [ "$DB_VER" -lt "10" ]; then
+# check to see if we need to upgrade a 2.x database
+elif [ "$DB_VER" -lt "11" ]; then
         echo "This release requires an upgrade to your bacula database."
         echo "Backing up your current database..."
         mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
@@ -2179,8 +2183,8 @@ fi
 # test for an existing database
 if [ -s %{working_dir}/bacula.db ]; then
         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite3 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
-        # check to see if we need to upgrade a 1.38 or lower database
-        if [ "$DB_VER" -lt "10" ] && [ "$DB_VER" -ge "9" ]; then
+        # check to see if we need to upgrade a 2.x database
+        if [ "$DB_VER" -lt "11" ] && [ "$DB_VER" -ge "10" ]; then
                 echo "This release requires an upgrade to your bacula database."
                 echo "Backing up your current database..."
                 echo ".dump" | %{sqlite_bindir}/sqlite3 %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
@@ -2214,8 +2218,8 @@ if [ -z "$DB_VER" ]; then
         echo "Granting privileges for PostgreSQL user bacula..."
        %{script_dir}/grant_postgresql_privileges
 
-# check to see if we need to upgrade a 1.38 or lower database
-elif [ "$DB_VER" -lt "10" ]; then
+# check to see if we need to upgrade a 2.x database
+elif [ "$DB_VER" -lt "11" ]; then
         echo "This release requires an upgrade to your bacula database."
         echo "Backing up your current database..."
         pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
@@ -2243,6 +2247,8 @@ if [ -d %{sysconf_dir} ]; then
 fi
 %endif
 
+/sbin/ldconfig
+
 %if %{mysql}
 %preun mysql
 %endif
@@ -2262,6 +2268,18 @@ if [ $1 = 0 ]; then
 fi
 %endif
 
+%if %{mysql}
+%postun mysql
+%endif
+%if %{sqlite}
+%postun sqlite
+%endif
+%if %{postgresql}
+%postun postgresql
+%endif
+
+/sbin/ldconfig
+
 
 %if ! %{client_only} && %{mtx}
 %files mtx
@@ -2288,7 +2306,7 @@ fi
 %endif
 
 %if ! %{single_dir}
-%doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
+%doc COPYING ChangeLog ReleaseNotes LICENSE VERIFYING kernstodo 
 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
 %else
 %{_prefix}/doc
@@ -2310,6 +2328,7 @@ fi
 %{_mandir}/man8/bacula.8.%{manpage_ext}
 %{_mandir}/man8/bconsole.8.%{manpage_ext}
 %{_mandir}/man8/btraceback.8.%{manpage_ext}
+%{_libdir}/libbac*
 
 
 %pre client
@@ -2356,12 +2375,17 @@ if [ -d %{sysconf_dir} ]; then
         done
 fi
 
+/sbin/ldconfig
+
 %preun client
 # delete our link
 if [ $1 = 0 ]; then
 /sbin/chkconfig --del bacula-fd
 fi
 
+%postun client
+/sbin/ldconfig
+
 %if ! %{client_only}
 %files updatedb
 %defattr(-,root,%{daemon_group})
@@ -2525,6 +2549,13 @@ fi
 %endif
 
 %changelog
+* Sat Apr 25 2009 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- add switch to pass Distribution tag
+* Sun Apr 5 2009 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 3.0.0 release
+- database update version 10 to 11
+- make now installs docs so we rm from buildroot
+- add shared libs in %_libdir and other misc new files
 * Wed Dec 31 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
 - add su111 target
 * Sat Nov 08 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>