]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/platforms/suse/bacula.spec.in
Correct installed permissions of sqlite database file.
[bacula/bacula] / bacula / platforms / suse / bacula.spec.in
index 45b4e69d3ac4de522d4f527813a0c46a022699e1..fd176ac91aa97805595877d43ffe383051d3ec5d 100644 (file)
@@ -6,14 +6,13 @@
 # basic defines for every build
 %define _version @VERSION@
 %define _release 1
-%define depkgs_version 04Jan07
-%define _rescuever 2.0.0
+%define depkgs_version 09Sep07
+%define _rescuever @VERSION@
 %define docs_version @VERSION@
 
 # any patches for this release
 # be sure to check the setup section for patch macros
 
-
 #--------------------------------------------------------------------------
 # it should not be necessary to change anything below here for a release
 # except for patch macros in the setup section
@@ -97,6 +96,8 @@ Packager: %{_packager}
 %{?build_fc5:%define fc5 1}
 %define fc6 0
 %{?build_fc6:%define fc6 1}
+%define fc7 0
+%{?build_fc7:%define fc7 1}
 # Whitebox Enterprise build
 %define wb3 0
 %{?build_wb3:%define wb3 1}
@@ -107,6 +108,9 @@ Packager: %{_packager}
 %define rhel4 0
 %{?build_rhel4:%define rhel4 1}
 %{?build_rhel4:%define fc3 1}
+%define rhel5 0
+%{?build_rhel5:%define rhel5 1}
+%{?build_rhel5:%define fc6 1}
 # CentOS build
 %define centos3 0
 %{?build_centos3:%define centos3 1}
@@ -114,6 +118,9 @@ Packager: %{_packager}
 %define centos4 0
 %{?build_centos4:%define centos4 1}
 %{?build_centos4:%define fc3 1}
+%define centos5 0
+%{?build_centos5:%define centos5 1}
+%{?build_centos5:%define fc6 1}
 # SL build
 %define sl3 0
 %{?build_sl3:%define sl3 1}
@@ -121,6 +128,9 @@ Packager: %{_packager}
 %define sl4 0
 %{?build_sl4:%define sl4 1}
 %{?build_sl4:%define fc3 1}
+%define sl5 0
+%{?build_sl5:%define sl5 1}
+%{?build_sl5:%define fc6 1}
 # SuSE build
 %define su9 0
 %{?build_su9:%define su9 1}
@@ -140,7 +150,7 @@ Packager: %{_packager}
 %{?build_client_only:%define client_only 1}
 
 # test for a platform definition
-%if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{wb3} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk}
+%if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7} && ! %{wb3} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk}
 %{error: You must specify a platform. Please examine the spec file.}
 exit 1
 %endif
@@ -185,16 +195,16 @@ exit 1
 %{?build_x86_64:%define x86_64 1}
 
 # check what distribution we are
-%if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4}
+%if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4} || %{rhel5}
 %define _dist %(grep Red /etc/redhat-release)
 %endif
-%if %{fc1} || %{fc4} || %{fc5} || %{fc6}
+%if %{fc1} || %{fc4} || %{fc5} || %{fc6} || %{fc7}
 %define _dist %(grep Fedora /etc/redhat-release)
 %endif
-%if %{centos4} || %{centos3}
+%if %{centos5} || %{centos4} || %{centos3}
 %define _dist %(grep CentOS /etc/redhat-release)
 %endif
-%if %{sl4} || %{sl3}
+%if %{sl5} ||%{sl4} || %{sl3}
 %define _dist %(grep 'Scientific Linux' /etc/redhat-release)
 %endif
 %if %{fc3} && ! %{rhel4} && ! %{centos4} && ! %{sl4}
@@ -213,9 +223,11 @@ Distribution: %{_dist}
 
 # Should we build gconsole, possible only if gtk= >= 2.4 available.
 # leaving all the BuildRequires and Requires in place below for now.
+# su10, fc3 and fc4 now nobuild, tray monitor fails to build as of 2.2.1 
+# release as it needs 2.10
 
 %define gconsole 1
-%if %{rh7} || %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{su9}
+%if %{rh7} || %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{su9} || %{su10}
 %define gconsole 0
 %endif
 %if %{mdk} && ! %{mdv}
@@ -231,7 +243,7 @@ Distribution: %{_dist}
 %{?build_wxconsole:%define wxconsole 1}
 
 # Should we build bat
-# requires QT4
+# requires >= Qt-4.2
 %define bat 0
 %{?build_bat:%define bat 1}
 
@@ -272,7 +284,7 @@ BuildRequires: python, python-devel
 BuildRequires: pkgconfig, pango-devel, atk-devel
 %endif
 %if %{bat}
-BuildRequires: qt-devel >= 4
+BuildRequires: qt-devel >= 4.2
 %endif
 %if %{rh7}
 BuildRequires: libtermcap-devel
@@ -421,11 +433,25 @@ BuildRequires: libbonoboui-devel >= 2.16
 BuildRequires: GConf2-devel
 BuildRequires: freetype-devel
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6}
+%if %{fc7}
+BuildRequires: libtermcap-devel
+BuildRequires: glibc-devel >= 2.5
+%endif
+%if %{fc7} && %{gconsole}
+BuildRequires: gtk2-devel >= 2.10
+BuildRequires: libgnomeui-devel >= 2.18
+BuildRequires: ORBit2-devel
+BuildRequires: libart_lgpl-devel >= 2.3
+BuildRequires: libbonobo-devel >= 2.18
+BuildRequires: libbonoboui-devel >= 2.18
+BuildRequires: GConf2-devel
+BuildRequires: freetype-devel
+%endif
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7}
 BuildRequires: libtermcap-devel
 BuildRequires: glibc-devel >= 2.3
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && %{gconsole}
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7} && %{gconsole}
 BuildRequires: gtk2-devel >= 2.0
 BuildRequires: libgnomeui-devel >= 2.0
 BuildRequires: ORBit2-devel
@@ -507,7 +533,7 @@ Requires: termcap
 Requires: glibc >= 2.5
 Requires: termcap
 %endif
-%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{fc5} && ! %{fc6}
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{fc5} && ! %{fc6} && ! %{fc7}
 Requires: glibc >= 2.3
 Requires: libtermcap
 %endif
@@ -515,7 +541,7 @@ Requires: libtermcap
 Requires: glibc >= 2.4
 Requires: libtermcap
 %endif
-%if %{fc6}
+%if %{fc6} || %{fc7}
 Requires: glibc >= 2.5
 Requires: libtermcap
 %endif
@@ -655,7 +681,7 @@ Requires: libtermcap
 Requires: glibc >= 2.4
 Requires: libtermcap
 %endif
-%if %{fc6}
+%if %{fc6} || %{fc7}
 Requires: glibc >= 2.5
 Requires: libtermcap
 %endif
@@ -825,7 +851,18 @@ Requires: libbonoboui >= 2.16
 Requires: GConf2
 Requires: freetype
 %endif
-%if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6}
+%if %{gconsole} && %{fc7}  
+Requires: gtk2 >= 2.10
+Requires: libgnomeui >= 2.18
+Requires: glibc >= 2.5
+Requires: ORBit2
+Requires: libart_lgpl >= 2.3
+Requires: libbonobo >= 2.18
+Requires: libbonoboui >= 2.18
+Requires: GConf2
+Requires: freetype
+%endif
+%if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{mdk} && ! %{fc3} && ! %{fc4} && ! %{fc5} && ! %{fc6} && ! %{fc7}
 Requires: gtk2 >= 2.0
 Requires: libgnomeui >= 2.0
 Requires: glibc >= 2.3
@@ -898,6 +935,10 @@ Requires: gtk2 >= 2.8
 Requires: gtk2 >= 2.10
 %endif
 
+%if %{wxconsole} && %{fc7}  
+Requires: gtk2 >= 2.10
+%endif
+
 %if %{wxconsole}
 %description wxconsole
 %{blurb}
@@ -920,6 +961,18 @@ Summary: Bacula - The Network Backup Solution
 Group: System Environment/Daemons
 %endif
 
+%if %{bat} && %{su10}
+Requires: openssl
+Requires: glibc >= 2.4
+Requires: fontconfig
+Requires: freetype2
+Requires: libgcc
+Requires: libpng
+Requires: qt >= 4.2
+Requires: libstdc++
+Requires: zlib
+%endif
+
 %if %{bat} && %{su102}
 Requires: openssl
 Requires: glibc >= 2.5
@@ -927,7 +980,19 @@ Requires: fontconfig
 Requires: freetype2
 Requires: libgcc
 Requires: libpng
-Requires: qt >= 4
+Requires: qt >= 4.2
+Requires: libstdc++
+Requires: zlib
+%endif
+
+%if %{bat} && %{fc5}
+Requires: openssl
+Requires: glibc >= 2.4
+Requires: fontconfig
+Requires: freetype
+Requires: libgcc
+Requires: libpng
+Requires: qt >= 4.2
 Requires: libstdc++
 Requires: zlib
 %endif
@@ -939,7 +1004,19 @@ Requires: fontconfig
 Requires: freetype
 Requires: libgcc
 Requires: libpng
-Requires: qt >= 4
+Requires: qt >= 4.2
+Requires: libstdc++
+Requires: zlib
+%endif
+
+%if %{bat} && %{fc7}
+Requires: openssl
+Requires: glibc >= 2.5
+Requires: fontconfig
+Requires: freetype
+Requires: libgcc
+Requires: libpng
+Requires: qt >= 4.2
 Requires: libstdc++
 Requires: zlib
 %endif
@@ -982,6 +1059,9 @@ make sqlite
 %if ! %{client_only}
 make mtx
 %endif
+%if %{bat}
+make qwt
+%endif
 cd ${cwd}
 
 # patches for the bundled sqlite scripts
@@ -1067,12 +1147,16 @@ make
 %endif
 %if %{bat}
        --enable-bat \
+       --with-qwt=${cwd}/%{depkgs}/qwt \
 %endif
 %if %{python}
        --with-python \
 %endif
 %if %{client_only}
        --enable-client-only \
+%endif
+%if %{rh7} || %{rh8} || %{rh9} || %{fc1} || %{fc3} || %{wb3} 
+       --disable-batch-insert \
 %endif
        --mandir=%{_mandir} \
         --with-subsys-dir=/var/lock/subsys \
@@ -1245,7 +1329,7 @@ cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxcon
 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
 cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
 %endif
-%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{mdk}
+%if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{fc6} || %{fc7} || %{mdk}
 %define iftrick 1
 %else
 %define iftrick 0
@@ -1612,6 +1696,7 @@ else
         echo "Hmm, doesn't look like you have an existing database."
         echo "Creating SQLite database..."
        %{script_dir}/create_sqlite_database
+       chown %{director_daemon_user}.%{daemon_group} %{working_dir}/bacula.db
         echo "Creating the SQLite tables..."
        %{script_dir}/make_sqlite_tables
 fi
@@ -1688,10 +1773,13 @@ 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
+%attr(-, root, %{storage_daemon_group}) /usr/sbin/nsmhack
+%attr(-, root, %{storage_daemon_group}) /usr/sbin/scsieject
 %{_mandir}/man1/loaderinfo.1.%{manpage_ext}
 %{_mandir}/man1/mtx.1.%{manpage_ext}
 %{_mandir}/man1/scsitape.1.%{manpage_ext}
 %{_mandir}/man1/tapeinfo.1.%{manpage_ext}
+%{_mandir}/man1/scsieject.1.%{manpage_ext}
 %endif
 
 %files client
@@ -1936,6 +2024,26 @@ fi
 %endif
 
 %changelog
+* Mon Oct 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- correct ownership when creating sqlite db file in post script
+* Sun Sep 16 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- fix disable-batch-insert
+* Fri Sep 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 2.2.4 release
+- turn off gconsole build for fc3, tray monitor fails to build
+- add new files for mtx package (09Sep07 depkgs update)
+* Sat Sep 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- add --disable-batch-insert for older platforms
+- add build targets for rhel5 and clones
+* Mon Sep 03 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 2.2.1 release
+- turn off gconsole build for su10 & fc4, tray monitor fails to build
+* Sat Jul 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 2.1.26 add make of qwt in depkgs for bat
+* Sat Jun 02 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- upgrade Qt requirement for bat to 4.2
+* Sun May 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- add fc7 build target
 * Sun Apr 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
 - 2.1.8
 - gnome-console now bgnome-console