]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/platforms/rpm/bacula-bat.spec
Tweak spec files
[bacula/bacula] / bacula / platforms / rpm / bacula-bat.spec
index a407fa55ef66b0fb9c134d28938bc045488154b6..a1abad03e9b69624eee0670a016bc88c98379588 100644 (file)
@@ -1,13 +1,17 @@
 # Bacula RPM spec file
 #
-# Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
+# Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
 
 # Platform Build Configuration
 
 # basic defines for every build
 %define _release           1
-%define _version           5.0.0
+%define _version           5.0.3
 %define depkgs_qt_version  28Jul09
+
+# this is the QT version in depkgs_qt
+%define qt4ver             4.3.4
+
 %define _packager D. Scott Barninger <barninger@fairfieldcomputers.com>
 
 %define manpage_ext gz
 
 %{?contrib_packager:%define _packager %{contrib_packager}}
 
+%{expand: %%define gccver %(rpm -q --queryformat %%{version} gcc)}
+%{expand: %%define gccrel %(rpm -q --queryformat %%{release} gcc)}
+
+%define staticqt 1
+%{?nobuild_staticqt:%define staticqt 0}
+
 # determine what platform we are building on
 %define fedora 0
 %define suse 0
 %define mdk 0
 
 %if %{_vendor} == redhat
-       %define fedora 1
-       %define _dist %(cat /etc/redhat-release)
+        %define fedora 1
+        %define _dist %(cat /etc/redhat-release)
 %endif
 %if %{_vendor} == suse
-       %define suse 1
-       %define _dist %(grep -i SuSE /etc/SuSE-release)
+        %define suse 1
+        %define _dist %(grep -i SuSE /etc/SuSE-release)
 %endif
 %if %{_vendor} == Mandriva
-       %define mdk 1
-       %define _dist %(grep Mand /etc/mandrake-release)
+        %define mdk 1
+        %define _dist %(grep Mand /etc/mandrake-release)
 %endif
 %if ! %{fedora} && ! %{suse} && ! %{mdk}
 %{error: Unknown platform. Please examine the spec file.}
@@ -82,7 +92,7 @@ Name: bacula-bat
 Version: %{_version}
 Release: %{_release}
 Group: System Environment/Daemons
-License: GPL v2
+License: AGPLv3
 BuildRoot: %{_tmppath}/%{name}-root
 URL: http://www.bacula.org/
 Vendor: The Bacula Team
@@ -93,19 +103,40 @@ Distribution: %{_dist}
 Source0: http://www.prdownloads.sourceforge.net/bacula/bacula-%{version}.tar.gz
 Source1: http://www.prdownloads.sourceforge.net/bacula/depkgs-qt-%{depkgs_qt_version}.tar.gz
 
+BuildRequires: gcc, gcc-c++, make, autoconf
+BuildRequires: libstdc++-devel = %{gccver}-%{gccrel}, zlib-devel
+BuildRequires: openssl-devel, fontconfig-devel, libpng-devel, libstdc++-devel, zlib-devel
+
+Requires: openssl
+Requires: fontconfig
+Requires: libgcc
+Requires: libpng
+Requires: libstdc++
+Requires: zlib
+Requires: bacula-libs
+
+%if %{suse}
+Requires: /usr/bin/kdesu
+Requires: freetype2
+BuildRequires: freetype2-devel
+%else
+Requires: usermode
+Requires: freetype
+BuildRequires: freetype-devel
+%endif
 
 # Source directory locations
 %define depkgs_qt ../depkgs-qt
 
 # define the basic package description
-%define blurb Bacula - It comes by night and sucks the vital essence from your computers.
+%define blurb Bacula - The Leading Open Source Backup Solution.
 %define blurb2 Bacula is a set of computer programs that permit you (or the system
 %define blurb3 administrator) to manage backup, recovery, and verification of computer
 %define blurb4 data across a network of computers of different kinds. In technical terms,
 %define blurb5 it is a network client/server based backup program. Bacula is relatively
 %define blurb6 easy to use and efficient, while offering many advanced storage management
 %define blurb7 features that make it easy to find and recover lost or damaged files.
-%define blurb8 Bacula source code has been released under the GPL version 2 license.
+%define blurb8 Bacula source code has been released under the AGPL version 3 license.
 
 Summary: Bacula - The Network Backup Solution
 Group: System Environment/Daemons
@@ -132,10 +163,12 @@ It is an add-on to the client or server packages.
 
 
 cwd=${PWD}
-#export QTDIR=$(pkg-config --variable=prefix QtCore)
-#export QTINC=$(pkg-config --variable=includedir QtCore)
-#export QTLIB=$(pkg-config --variable=libdir QtCore)
-#export PATH=${QTDIR}/bin/:${PATH}
+%if ! %{staticqt}
+export QTDIR=$(pkg-config --variable=prefix QtCore)
+export QTINC=$(pkg-config --variable=includedir QtCore)
+export QTLIB=$(pkg-config --variable=libdir QtCore)
+export PATH=${QTDIR}/bin/:${PATH}
+%else
 cd %{depkgs_qt}
 make qt4 <<EOF
 yes
@@ -145,7 +178,9 @@ export PATH=${qtdir}/qt4/bin:$PATH
 export QTDIR=${qtdir}/qt4/
 export QTINC=${qtdir}/qt4/include/
 export QTLIB=${qtdir}/qt4/lib/
+export QMAKESPEC=${qtdir}/qt-x11-opensource-src-%{qt4ver}/mkspecs/linux-g++/
 cd ${cwd}
+%endif
 
 # Main Bacula configuration with bat
 %configure \
@@ -197,6 +232,7 @@ rm -rf $RPM_BUILD_ROOT%{_prefix}/share/doc/bacula
 %if %{suse}
 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
+touch $RPM_BUILD_ROOT%{sysconf_dir}/bat.kdesu
 %else
 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
 cp -p scripts/bat.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
@@ -207,12 +243,17 @@ ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bat
 
 %files
 %defattr(-,root,root)
-%{_sbindir}/bat
+%attr(-, root, %{daemon_group}) %{_sbindir}/bat
 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
 /usr/share/pixmaps/bat_icon.png
 /usr/share/applications/bat.desktop
 
+# if user is a member of daemon_group then kdesu will run bat as user
+%if %{suse}
+%attr(0660, root, %{daemon_group}) %{sysconf_dir}/bat.kdesu
+%endif
+
 %if ! %{suse}
 # add the console helper files
 %config(noreplace,missingok) /etc/pam.d/bat
@@ -261,6 +302,14 @@ fi
 rm -rf $RPM_BUILD_DIR/depkgs-qt
 
 %changelog
+* Sun Mar 14 2010 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- Fix for QT mkspecs location on FC12
+- allow user to build without embedded static QT
+* Sat Feb 27 2010 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- add dependency on bacula-libs
+* Sat Feb 13 2010 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- create file to allow bat to run nonroot with kdesu
+- add dependency information
 * Sat Jan 30 2010 D. Scott Barninger <barninger@fairfieldcomputers.com>
 - fix consolehelper/xsu for suse packages
 * Sat Aug 1 2009 Kern Sibbald <kern@sibbald.com>