From 38592916d06e276c080a1f908e7436c7250e0e5b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 29 Jul 2009 11:34:17 +0000 Subject: [PATCH] Start reworking 3.0.2 bacula.spec file git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@9115 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/configure.in | 4 +- bacula/configure | 4 +- .../redhat/{bacula.spec.in => bacula.spec} | 220 +++++++++--------- bacula/src/version.h | 4 +- bacula/technotes | 5 + 5 files changed, 116 insertions(+), 121 deletions(-) rename bacula/platforms/redhat/{bacula.spec.in => bacula.spec} (96%) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 8da31fa007..149f9e7c3e 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -2729,9 +2729,7 @@ redhat) platforms/redhat/Makefile \ platforms/redhat/bacula-fd \ platforms/redhat/bacula-sd \ - platforms/redhat/bacula-dir \ - platforms/redhat/bacula.spec \ - platforms/redhat/bsys.spec \ + platforms/redhat/bacula-dir " ;; mandrake) diff --git a/bacula/configure b/bacula/configure index 973cf82b93..25a0a85cc8 100755 --- a/bacula/configure +++ b/bacula/configure @@ -42739,9 +42739,7 @@ redhat) platforms/redhat/Makefile \ platforms/redhat/bacula-fd \ platforms/redhat/bacula-sd \ - platforms/redhat/bacula-dir \ - platforms/redhat/bacula.spec \ - platforms/redhat/bsys.spec \ + platforms/redhat/bacula-dir " ;; mandrake) diff --git a/bacula/platforms/redhat/bacula.spec.in b/bacula/platforms/redhat/bacula.spec similarity index 96% rename from bacula/platforms/redhat/bacula.spec.in rename to bacula/platforms/redhat/bacula.spec index 07303e90a9..96f088e68e 100644 --- a/bacula/platforms/redhat/bacula.spec.in +++ b/bacula/platforms/redhat/bacula.spec @@ -4,35 +4,33 @@ # Platform Build Configuration - BuildRequires: libacl-devel # probems with mandriva build: - # nothing provides libbonobo2_0-devel, nothing provides libbonoboui2_0-devel # set Macros by opensuse_bs, see http://en.opensuse.org/Build_Service/cross_distribution_package_how_to -#openSUSE 11.1 %if 0%{?suse_version} == 1110 -#openSUSE 11.0 %if 0%{?suse_version} == 1100 -#openSUSE 10.3 %if 0%{?suse_version} == 1030 -#openSUSE 10.2 %if 0%{?suse_version} == 1020 +#openSUSE 11.1 %if 0%{?suse_version} == 1110 +#openSUSE 11.0 %if 0%{?suse_version} == 1100 +#openSUSE 10.3 %if 0%{?suse_version} == 1030 +#openSUSE 10.2 %if 0%{?suse_version} == 1020 #SUSE Linux 10.1 %if 0%{?suse_version} == 1010 #SUSE Linux 10.0 %if 0%{?suse_version} == 1000 #SUSE Linux 9.3 %if 0%{?suse_version} == 930 -#SLES 9 %if 0%{?sles_version} == 9 also set: %if 0%{?suse_version} == 910 -#SLE 10 %if 0%{?sles_version} == 10 also set: %if 0%{?suse_version} == 1010 -#SLE 11 %if 0%{?sles_version} == 11 also set: %if 0%{?suse_version} == 1110 -#CentOS 5 %if 0%{?centos_version} == 501 -#RHEL 4 %if 0%{?rhel_version} == 406 -#RHEL 5 %if 0%{?rhel_version} == 501 +#SLES 9 %if 0%{?sles_version} == 9 also set: %if 0%{?suse_version} == 910 +#SLE 10 %if 0%{?sles_version} == 10 also set: %if 0%{?suse_version} == 1010 +#SLE 11 %if 0%{?sles_version} == 11 also set: %if 0%{?suse_version} == 1110 +#CentOS 5 %if 0%{?centos_version} == 501 +#RHEL 4 %if 0%{?rhel_version} == 406 +#RHEL 5 %if 0%{?rhel_version} == 501 #Fedora 6 with Extras %if 0%{?fedora_version} == 6 #Fedora 7 with Extras %if 0%{?fedora_version} == 7 #Fedora 8 with Extras %if 0%{?fedora_version} == 8 #Fedora 9 with Extras %if 0%{?fedora_version} == 9 #Fedora 10 with Extras %if 0%{?fedora_version} == 10 -#Mandriva 2006 %if 0%{?mandriva_version} == 2006 -#Mandriva 2007 %if 0%{?mandriva_version} == 2007 -#Mandriva 2008 %if 0%{?mandriva_version} == 2008 +#Mandriva 2006 %if 0%{?mandriva_version} == 2006 +#Mandriva 2007 %if 0%{?mandriva_version} == 2007 +#Mandriva 2008 %if 0%{?mandriva_version} == 2008 %if 0%{?opensuse_bs} @@ -58,8 +56,6 @@ BuildRequires: shadow-utils %endif - - %if 0%{?mandriva_version} == 2007 %define build_mdv 1 %define _dist "Mandriva 2007" @@ -93,9 +89,6 @@ BuildRequires: PolicyKit-gnome BuildRequires: fedora-release %endif - - - %if 0%{?rhel_version} == 501 %define build_rhel5 1 %define _dist "Red Hat Enterprise Linux Server release 5" @@ -159,17 +152,56 @@ BuildRequires: suse-release %define _dist "SLES 11" %endif - - %endif # opensuse-bs? # basic defines for every build -%define _version @VERSION@ +%define _version 3.0.2 %define _release 1 %define depkgs_version 18Feb09 -%define _rescuever @VERSION@ -%define docs_version @VERSION@ +%define depkgs_qt_version 28Jul09 +%define _rescuever 3.0.2 +%define docs_version 3.0.2 +%define _packager D. Scott Barninger + +%define single_dir 0 +%{?single_dir_install:%define single_dir 1} + +# Installation Directory locations +%if %{single_dir} +%define _prefix /opt/bacula +%define _sbindir /opt/bacula/bin +%define _subsysdir /opt/bacula/working +%define sqlite_bindir /opt/bacula/sqlite +%define _mandir /usr/share/man +%define sysconf_dir /opt/bacula/etc +%define script_dir /opt/bacula/scripts +%define working_dir /opt/bacula/working +%define pid_dir /opt/bacula/working +%define plugin_dir /opt/bacula/plugins +%define lib_dir /opt/bacula/lib +%else +%define _prefix /usr +%define _sbindir %_prefix/sbin +%define _subsysdir /var/lock/subsys +%define sqlite_bindirf %_libdir/bacula/sqlite +%define _mandir %_prefix/share/man +%define sysconf_dir /etc/bacula +%define script_dir %_libdir/bacula +%define working_dir /var/lib/bacula +%define pid_dir /var/run +%define plugin_dir %_libdir/bacula/plugins +%define lib_dir %_libdir/bacula/lib +%endif + +# Daemon user:group Don't change them unless you know what you are doing +%define director_daemon_user bacula +%define storage_daemon_user bacula +%define file_daemon_user root +%define daemon_group bacula +# group that has write access to tape devices, usually disk on Linux +%define storage_daemon_group disk + # any patches for this release # be sure to check the setup section for patch macros @@ -179,16 +211,6 @@ BuildRequires: suse-release # except for patch macros in the setup section #-------------------------------------------------------------------------- -%define single_dir 0 -%{?single_dir_install:%define single_dir 1} -%if %{single_dir} -%define _prefix /opt/bacula -%else -%define _prefix /usr -%endif - -# third party packagers -%define _packager D. Scott Barninger %{?contrib_packager:%define _packager %{contrib_packager}} Summary: Bacula - The Network Backup Solution @@ -203,6 +225,7 @@ Source2: Release_Notes-%{version}-%{release}.tar.gz Source3: http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{docs_version}.tar.gz Source4: http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz Source5: bacula-2.2.7-postgresql.patch +Source6: depkgs-qt-%{depkgs_qt_version}.tar.gz BuildRoot: %{_tmppath}/%{name}-root URL: http://www.bacula.org/ Vendor: The Bacula Team @@ -219,47 +242,19 @@ Prefix: %{_prefix} %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. -# source directory locations +# Source directory locations %define _docsrc ../%{name}-docs-%{docs_version} %define _rescuesrc ../%{name}-rescue-%{_rescuever} %define depkgs ../depkgs +%define depkgs_qt ../depkgs-qt -# directory locations -%if %{single_dir} -%define _sbindir /opt/bacula -%define _subsysdir /opt/bacula/working -%define sqlite_bindir /opt/bacula/sqlite -%define _mandir /usr/share/man -%define sysconf_dir /opt/bacula -%define script_dir /opt/bacula/scripts -%define working_dir /opt/bacula/working -%define pid_dir /opt/bacula/working -%else -%define _sbindir %_prefix/sbin -%define _subsysdir /var/lock/subsys -%define sqlite_bindir %_libdir/bacula/sqlite -%define _mandir %_prefix/share/man -%define sysconf_dir /etc/bacula -%define script_dir %_libdir/bacula -%define working_dir /var/lib/bacula -%define pid_dir /var/run -%endif - -# NOTE these defines are used in some rather complex useradd and groupadd -# commands. If you change them examine the post scripts for consequences. -%define director_daemon_user bacula -%define storage_daemon_user bacula -%define file_daemon_user root -%define daemon_group bacula -# group that has write access to tape devices, usually disk on Linux -%define storage_daemon_group disk %define user_file /etc/passwd %define group_file /etc/group # program locations -%define useradd /usr/sbin/useradd +%define useradd /usr/sbin/useradd %define groupadd /usr/sbin/groupadd -%define usermod /usr/sbin/usermod +%define usermod /usr/sbin/usermod # platform defines - set one below or define the build_xxx on the command line # RedHat builds @@ -416,23 +411,6 @@ exit 1 %if %{mdk} %define _dist %(grep Mand /etc/mandrake-release) %endif - -# opensuse build service start -%if 0%{?sles_version} == 9 -%define _dist "SLES 9" -%endif - -%if 0%{?sles_version} == 10 -%define _dist "SLE 10" -%endif - - -%if 0%{?sles_version} == 11 -%define _dist "SLE 11" -%endif - -# opensuse build service end - %{?DISTNAME:%define _dist %{DISTNAME}} Distribution: %{_dist} @@ -471,7 +449,7 @@ Distribution: %{_dist} %{?build_python:%define python 1} # specifically disallow build of mtx package if desired -%define mtx 1 +%define mtx 0 %{?nobuild_mtx:%define mtx 0} # do we need to patch for old postgresql version? @@ -496,9 +474,12 @@ Distribution: %{_dist} %define wxconsole 0 %endif +%{expand: %%define gccver %(rpm -q --queryformat %%{version} gcc)} +%{expand: %%define gccrel %(rpm -q --queryformat %%{release} gcc)} + BuildRequires: gcc, gcc-c++, make, autoconf BuildRequires: ncurses-devel, perl -BuildRequires: libstdc++-devel, zlib-devel +BuildRequires: libstdc++-devel = %{gccver}-%{gccrel}, zlib-devel BuildRequires: openssl-devel %if ! %{rh7} BuildRequires: libxml2-devel @@ -850,7 +831,7 @@ Obsoletes: bacula-rescue Conflicts: bacula %endif -Requires: ncurses, libstdc++, zlib, openssl, mtx +Requires: ncurses, libstdc++, zlib, openssl %if %{rh7} Requires: glibc >= 2.2 @@ -1594,6 +1575,8 @@ the client or server packages. %setup -T -D -b 2 %setup -T -D -b 3 %setup -T -D -b 4 +%setup -T -D -b 5 +%setup -T -D -b 6 %build @@ -1601,14 +1584,24 @@ the client or server packages. export LDFLAGS="${LDFLAGS} -L/usr/lib/termcap" %endif +cwd=${PWD} %if %{bat} -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} +#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} +cd %{depkgs_qt} +make qt4 <