]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/platforms/redhat/bacula.spec.in
Change method to determine gcc version. Move atk-devel requirement into gnome only...
[bacula/bacula] / bacula / platforms / redhat / bacula.spec.in
index d4aea233f6ecec6369f13d42ce9e3dbb2c0c9313..545ada98a7ed82a06c79cc3db66843c548252d38 100644 (file)
@@ -6,8 +6,8 @@
 # basic defines for every build
 %define _version @VERSION@
 %define _release 1
-%define depkgs_version 25Jun06
-%define _rescuever 1.8.6
+%define depkgs_version 04Jan07
+%define _rescuever 2.0.0
 %define docs_version @VERSION@
 
 # any patches for this release
@@ -90,6 +90,8 @@ Packager: %{_packager}
 %{?build_fc4:%define fc4 1}
 %define fc5 0
 %{?build_fc5:%define fc5 1}
+%define fc6 0
+%{?build_fc6:%define fc6 1}
 # Whitebox Enterprise build
 %define wb3 0
 %{?build_wb3:%define wb3 1}
@@ -172,7 +174,7 @@ exit 1
 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4}
 %define _dist %(grep Red /etc/redhat-release)
 %endif
-%if %{fc1} || %{fc4} || %{fc5}
+%if %{fc1} || %{fc4} || %{fc5} || %{fc6}
 %define _dist %(grep Fedora /etc/redhat-release)
 %endif
 %if %{centos4} || %{centos3}
@@ -196,15 +198,12 @@ Distribution: %{_dist}
 # leaving all the BuildRequires and Requires in place below for now.
 
 %define gconsole 1
-%if %{rh7} || %{rh8} || %{rh9} || %{wb3} || %{fc1}
+%if %{rh7} || %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{su9}
 %define gconsole 0
 %endif
 %if %{mdk} && ! %{mdv}
 %define gconsole 0
 %endif
-%if %suse_version == 900 || %suse_version == 910
-%define gconsole 0
-%endif
 
 # specifically disallow gconsole if desired
 %{?nobuild_gconsole:%define gconsole 0}
@@ -218,6 +217,13 @@ Distribution: %{_dist}
 %define python 0
 %{?build_python:%define python 1}
 
+# Mandriva somehow forces the manpage file extension to bz2 rather than gz
+%if %{mdk}
+%define manpage_ext bz2
+%else
+%define manpage_ext gz
+%endif
+
 # for client only build
 %if %{client_only}
 %define mysql 0
@@ -229,11 +235,11 @@ Distribution: %{_dist}
 %define wxconsole 0
 %endif
 
-%{expand: %%define gccver %(rpm -q gcc | cut -d - -f 2)}
-%{expand: %%define gccrel %(rpm -q gcc | cut -d - -f 3)}
+%{expand: %%define gccver %(rpm -q --queryformat %%{version} gcc)}
+%{expand: %%define gccrel %(rpm -q --queryformat %%{release} gcc)}
 
 BuildRequires: gcc, gcc-c++, make, autoconf
-BuildRequires: atk-devel, ncurses-devel, perl
+BuildRequires: ncurses-devel, perl
 BuildRequires: libstdc++-devel = %{gccver}-%{gccrel}, libxml2-devel, zlib-devel
 BuildRequires: openssl-devel
 %if %{python}
@@ -241,7 +247,7 @@ BuildRequires: python, python-devel
 %{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
 %endif
 %if %{gconsole}
-BuildRequires: pkgconfig, pango-devel
+BuildRequires: pkgconfig, pango-devel, atk-devel
 %endif
 %if %{rh7}
 BuildRequires: libtermcap-devel
@@ -356,11 +362,25 @@ BuildRequires: libbonoboui-devel >= 2.14
 BuildRequires: GConf2-devel
 BuildRequires: freetype-devel
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5}
+%if %{fc6}
+BuildRequires: libtermcap-devel
+BuildRequires: glibc-devel >= 2.5
+%endif
+%if %{fc6} && %{gconsole}
+BuildRequires: gtk2-devel >= 2.10
+BuildRequires: libgnomeui-devel >= 2.16
+BuildRequires: ORBit2-devel
+BuildRequires: libart_lgpl-devel >= 2.3
+BuildRequires: libbonobo-devel >= 2.16
+BuildRequires: libbonoboui-devel >= 2.16
+BuildRequires: GConf2-devel
+BuildRequires: freetype-devel
+%endif
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6}
 BuildRequires: libtermcap-devel
 BuildRequires: glibc-devel >= 2.3
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && %{gconsole}
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && %{gconsole}
 BuildRequires: gtk2-devel >= 2.0
 BuildRequires: libgnomeui-devel >= 2.0
 BuildRequires: ORBit2-devel
@@ -438,7 +458,7 @@ Requires: libtermcap
 Requires: glibc >= 2.3
 Requires: termcap
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{fc5}
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{fc5} && ! %{fc6}
 Requires: glibc >= 2.3
 Requires: libtermcap
 %endif
@@ -446,6 +466,10 @@ Requires: libtermcap
 Requires: glibc >= 2.4
 Requires: libtermcap
 %endif
+%if %{fc6}
+Requires: glibc >= 2.5
+Requires: libtermcap
+%endif
 
 %if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4} && ! %{mysql5}
 Requires: mysql >= 3.23
@@ -566,7 +590,7 @@ Requires: libtermcap
 Requires: glibc >= 2.3
 Requires: termcap
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{fc5}
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{fc5} && ! %{fc6}
 Requires: glibc >= 2.3
 Requires: libtermcap
 %endif
@@ -574,6 +598,10 @@ Requires: libtermcap
 Requires: glibc >= 2.4
 Requires: libtermcap
 %endif
+%if %{fc6}
+Requires: glibc >= 2.5
+Requires: libtermcap
+%endif
 
 %if %{python}
 Requires: python >= %{pyver}
@@ -712,7 +740,18 @@ Requires: libbonoboui >= 2.14
 Requires: GConf2
 Requires: freetype
 %endif
-%if %{gconsole} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5}
+%if %{gconsole} && %{fc6}  
+Requires: gtk2 >= 2.10
+Requires: libgnomeui >= 2.16
+Requires: glibc >= 2.5
+Requires: ORBit2
+Requires: libart_lgpl >= 2.3
+Requires: libbonobo >= 2.16
+Requires: libbonoboui >= 2.16
+Requires: GConf2
+Requires: freetype
+%endif
+%if %{gconsole} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6}
 Requires: gtk2 >= 2.0
 Requires: libgnomeui >= 2.0
 Requires: glibc >= 2.3
@@ -774,6 +813,10 @@ Requires: gtk2 >= 2.6
 Requires: gtk2 >= 2.8
 %endif
 
+%if %{wxconsole} && %{fc6}  
+Requires: gtk2 >= 2.10
+%endif
+
 %if %{wxconsole}
 %description wxconsole
 %{blurb}
@@ -820,7 +863,8 @@ cd ${cwd}
 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
 
 # patch the create_sqlite_database script for installation bindir
-patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
+# not necessary after 1.39.26 no longer references sqlite binary
+#patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
 
 # patch the make_catalog_backup script for installation bindir
 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
@@ -954,13 +998,6 @@ make \
        mandir=$RPM_BUILD_ROOT%{_mandir} \
         install
 
-cd manpages
-make \
-       mandir=$RPM_BUILD_ROOT%{_mandir} \
-        install
-cd ${cwd}
-
-
 %if ! %{client_only}
 cd %{depkgs}
 make \
@@ -1121,7 +1158,7 @@ mv $RPM_BUILD_ROOT/etc/bacula/wx-console.conf $RPM_BUILD_ROOT/etc/bacula/wxconso
 %if ! %{client_only}
 chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
 %endif
-chmod o-rwx $RPM_BUILD_ROOT/var/bacula
+chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
 %if %{gconsole} && ! %{rh8}
 chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
 chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf
@@ -1220,7 +1257,8 @@ rm -rf $RPM_BUILD_ROOT/etc/bacula/updatedb
 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/services/bacula.conf
 %attr(-, root, %{daemon_group}) /etc/bacula/query.sql
-%attr(-, root, %{daemon_group}) %dir %{working_dir}
+
+%attr(-, %{storage_daemon_user}, %{daemon_group}) %dir %{working_dir}
 
 /usr/sbin/bacula-dir
 /usr/sbin/bacula-fd
@@ -1236,19 +1274,19 @@ rm -rf $RPM_BUILD_ROOT/etc/bacula/updatedb
 /usr/sbin/bsmtp
 /usr/sbin/bregex
 /usr/sbin/bwild
-%{_mandir}/man8/bacula-fd.8.gz
-%{_mandir}/man8/bacula-dir.8.gz
-%{_mandir}/man8/bacula-sd.8.gz
-%{_mandir}/man8/bacula.8.gz
-%{_mandir}/man8/bconsole.8.gz
-%{_mandir}/man8/bcopy.8.gz
-%{_mandir}/man8/bextract.8.gz
-%{_mandir}/man8/bls.8.gz
-%{_mandir}/man8/bscan.8.gz
-%{_mandir}/man8/btape.8.gz
-%{_mandir}/man8/btraceback.8.gz
-%{_mandir}/man8/dbcheck.8.gz
-%{_mandir}/man1/bsmtp.1.gz
+%{_mandir}/man8/bacula-fd.8.%{manpage_ext}
+%{_mandir}/man8/bacula-dir.8.%{manpage_ext}
+%{_mandir}/man8/bacula-sd.8.%{manpage_ext}
+%{_mandir}/man8/bacula.8.%{manpage_ext}
+%{_mandir}/man8/bconsole.8.%{manpage_ext}
+%{_mandir}/man8/bcopy.8.%{manpage_ext}
+%{_mandir}/man8/bextract.8.%{manpage_ext}
+%{_mandir}/man8/bls.8.%{manpage_ext}
+%{_mandir}/man8/bscan.8.%{manpage_ext}
+%{_mandir}/man8/btape.8.%{manpage_ext}
+%{_mandir}/man8/btraceback.8.%{manpage_ext}
+%{_mandir}/man8/dbcheck.8.%{manpage_ext}
+%{_mandir}/man1/bsmtp.1.%{manpage_ext}
 %endif
 
 %if %{mysql}
@@ -1270,6 +1308,7 @@ if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
 %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."
         echo "You appear to be running database version $DB_VER. You must first update"
@@ -1279,6 +1318,7 @@ if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "9" ]; then
         echo "database older than version 9 can be found in the release notes."
         exit 1
 fi
+%endif
 
 %if %{sqlite}
 fi
@@ -1481,10 +1521,10 @@ fi
 %attr(-, root, %{storage_daemon_group}) /usr/sbin/mtx
 %attr(-, root, %{storage_daemon_group}) /usr/sbin/scsitape
 %attr(-, root, %{storage_daemon_group}) /usr/sbin/tapeinfo
-%{_mandir}/man1/loaderinfo.1.gz
-%{_mandir}/man1/mtx.1.gz
-%{_mandir}/man1/scsitape.1.gz
-%{_mandir}/man1/tapeinfo.1.gz
+%{_mandir}/man1/loaderinfo.1.%{manpage_ext}
+%{_mandir}/man1/mtx.1.%{manpage_ext}
+%{_mandir}/man1/scsitape.1.%{manpage_ext}
+%{_mandir}/man1/tapeinfo.1.%{manpage_ext}
 %endif
 
 
@@ -1503,6 +1543,7 @@ fi
 
 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bacula-fd.conf
 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/bconsole.conf
+
 %attr(-, root, %{daemon_group}) %dir %{working_dir}
 
 /usr/sbin/bacula-fd
@@ -1510,10 +1551,10 @@ fi
 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.gdb
 %attr(-, root, %{daemon_group}) /etc/bacula/btraceback.dbx
 /usr/sbin/bconsole
-%{_mandir}/man8/bacula-fd.8.gz
-%{_mandir}/man8/bacula.8.gz
-%{_mandir}/man8/bconsole.8.gz
-%{_mandir}/man8/btraceback.8.gz
+%{_mandir}/man8/bacula-fd.8.%{manpage_ext}
+%{_mandir}/man8/bacula.8.%{manpage_ext}
+%{_mandir}/man8/bconsole.8.%{manpage_ext}
+%{_mandir}/man8/btraceback.8.%{manpage_ext}
 
 
 %pre client
@@ -1593,7 +1634,7 @@ echo "The database update scripts were installed to /etc/bacula/updatedb"
 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/gnome-console.conf
 /usr/share/pixmaps/bacula.png
 /usr/share/applications/bacula.desktop
-%{_mandir}/man1/bacula-console-gnome.1.gz
+%{_mandir}/man1/bacula-console-gnome.1.%{manpage_ext}
 %endif
 
 %if %{gconsole} && ! %{rh8}
@@ -1601,7 +1642,7 @@ echo "The database update scripts were installed to /etc/bacula/updatedb"
 %config(noreplace) /etc/bacula/tray-monitor.conf
 /usr/share/pixmaps/bacula-tray-monitor.xpm
 /usr/share/applications/bacula-tray-monitor.desktop
-%{_mandir}/man1/bacula-tray-monitor.1.gz
+%{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
 %endif
 
 %if %{gconsole} && ! %{su9} && ! %{su10}
@@ -1646,7 +1687,7 @@ fi
 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/bacula/wxconsole.conf
 /usr/share/pixmaps/wxwin16x16.xpm
 /usr/share/applications/wxconsole.desktop
-%{_mandir}/man1/bacula-wxconsole.1.gz
+%{_mandir}/man1/bacula-wxconsole.1.%{manpage_ext}
 %endif
 
 %if %{wxconsole} && ! %{su9} && ! %{su10}
@@ -1684,6 +1725,22 @@ fi
 %endif
 
 %changelog
+* Sun Jan 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 2.0.1 release
+- change determination of gcc version per patch from Marc Hennes
+- move BuildRequire for atk-devel to gnome only builds
+- add fc6 build tag
+* Sat Jan 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 2.0.0 release
+* Sun Oct 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 1.39.26 remove create_sqlite_database.in.patch
+* Sun Sep 24 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- change ownership of working_dir on server packages to bacula.bacula so that
+- bacula-sd can create bootstrap files
+* Sat Sep 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 1.39.22 remove separate cd and make of manpages the main Makefile does it now
+* Sun Aug 06 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- fix manpages file extension for mdk
 * Sat Aug 05 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
 - bug 648 re-enable and update sqlite patches
 - 1.39.18 changes