]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/platforms/rpms/redhat/bacula.spec.in
rpm: Fix MySQL dependency on bacula-postgresql package
[bacula/bacula] / bacula / platforms / rpms / redhat / bacula.spec.in
index a158d43a99f360ef5d92b022864dd927bc3f03f1..7563c275d81da3640fb3b06f3df825cddcc82880 100644 (file)
@@ -126,13 +126,15 @@ Source2: Release_Notes-%{version}-%{release}.tar.gz
 %{?build_fc18:%define fc18 1}
 %define fc22 0
 %{?build_fc22:%define fc22 1}
-# Whitebox Enterprise build
-%define wb3 0
-%{?build_wb3:%define wb3 1}
+%define fc25 0
+%{?build_fc25:%define fc25 1}
+%define fc26 0
+%{?build_fc26:%define fc26 1}
+%define fc27 0
+%{?build_fc27:%define fc27 1}
 # RedHat Enterprise builds
 %define rhel3 0
 %{?build_rhel3:%define rhel3 1}
-%{?build_rhel3:%define wb3 1}
 %define rhel4 0
 %{?build_rhel4:%define rhel4 1}
 %{?build_rhel4:%define fc3 1}
@@ -152,7 +154,6 @@ Source2: Release_Notes-%{version}-%{release}.tar.gz
 # CentOS build
 %define centos3 0
 %{?build_centos3:%define centos3 1}
-%{?build_centos3:%define wb3 1}
 %define centos4 0
 %{?build_centos4:%define centos4 1}
 %{?build_centos4:%define fc3 1}
@@ -166,7 +167,6 @@ Source2: Release_Notes-%{version}-%{release}.tar.gz
 # SL build
 %define sl3 0
 %{?build_sl3:%define sl3 1}
-%{?build_sl3:%define wb3 1}
 %define sl4 0
 %{?build_sl4:%define sl4 1}
 %{?build_sl4:%define fc3 1}
@@ -208,7 +208,7 @@ Source2: Release_Notes-%{version}-%{release}.tar.gz
 # if the platform is using systemd
 %define usesystemd 0
 
-%if %{rhel7} || %{fc22} || %{centos7}
+%if %{rhel7} || %{fc22}|| %{fc25} || %{fc26} || %{fc27} || %{centos7}
 %define usesystemd 1
 %endif
 
@@ -227,7 +227,7 @@ Source2: Release_Notes-%{version}-%{release}.tar.gz
 %define rhat 1
 %endif
 %define fed 0
-%if %{fc16} || %{fc17} || %{fc18} || %{fc22}
+%if %{fc16} || %{fc17} || %{fc18} || %{fc22} || %{fc25} || %{fc26} || %{fc27}
 %define fed 1
 %endif
 %define suse 0
@@ -245,13 +245,13 @@ Source2: Release_Notes-%{version}-%{release}.tar.gz
 
 
 # test for a platform definition
-%if !%{rhat} && !%{rhel} && !%{fed} && !%{wb3} && !%{suse} && !%{mdk} && !%{scil}
+%if !%{rhat} && !%{rhel} && !%{fed} && !%{suse} && !%{mdk} && !%{scil}
 %{error: You must specify a platform. Please examine the spec file.}
 exit 1
 %endif
 
 # distribution-specific directory for logwatch
-%if %{wb3} || %{rh7} || %{rh8} || %{rh9}
+%if %{rh7} || %{rh8} || %{rh9}
 %define logwatch_dir /etc/log.d
 %else
 %define logwatch_dir /etc/logwatch
@@ -290,7 +290,7 @@ exit 1
 %{?build_x86_64:%define x86_64 1}
 
 # check what distribution we are
-%if %{fc16} || %{fc17} || %{fc18} || %{fc22}
+%if %{fc16} || %{fc17} || %{fc18} || %{fc22} || %{fc25} || %{fc26} || %{fc27}
 %define _dist %(grep Fedora /etc/redhat-release)
 %endif
 %if %{centos7} || %{centos6}
@@ -302,22 +302,12 @@ exit 1
 %if %{sl5} ||%{sl4} || %{sl3}
 %define _dist %(grep 'Scientific Linux' /etc/redhat-release)
 %endif
-%if %{wb3} && ! %{rhel3} && ! %{centos3} && ! %{sl3}
-%define _dist %(grep White /etc/whitebox-release)
-%endif
 %if %{suse}
 %define _dist %(grep -i SuSE /etc/SuSE-release)
 %endif
-%if %{mdk}
-%define _dist %(grep Mand /etc/mandrake-release)
-%endif
 
 Distribution: %_dist
 
-# should we turn on python support
-%define python 0
-%{?build_python:%define python 0}
-
 # should we enable tcp wrappers support
 %define tcpwrappers 1
 %{?build_tcpwrappers:%define tcpwrappers 1}
@@ -351,10 +341,6 @@ BuildRequires: bzip2-devel
 %if ! %{rh7}
 BuildRequires: libxml2-devel
 %endif
-%if %{python}
-BuildRequires: python, python-devel
-%{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
-%endif
 
 %if %{rh7}
 BuildRequires: libxml-devel
@@ -368,11 +354,7 @@ BuildRequires: glibc-static-devel
 BuildRequires: mysql-devel
 %endif
 
-%if %{postgresql} && %{wb3}
-BuildRequires: rh-postgresql-devel >= %{postgres_version}
-%endif
-
-%if %{postgresql} && ! %{wb3}
+%if %{postgresql}
 BuildRequires: %{postgres_devel_package} >= %{postgres_version}
 %endif
 
@@ -394,19 +376,23 @@ BuildRequires: %{postgres_devel_package} >= %{postgres_version}
 #
 %if %{mysql}
 %package mysql
-Provides: Perl
-Provides: libbaccats.so
-%endif
-%if %{sqlite}
-%package sqlite
+Provides: bacula-mysql
+#
+# The following provides is to work around an 
+#  auto generated requires from src/scripts/logwatch/applybaculadate
+#  this is a gross kludge to keep it from being a requirement
+#
+Provides: perl(Logwatch)
 %endif
 %if %{postgresql}
 %package postgresql
+Provides: bacula-postgresql
 %endif
 
 Summary: Bacula - The Network Backup Solution
 Group: System Environment/Daemons
 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
+Provides: libbaccats-%{version}.so()(64bit)
 Conflicts: bacula-client
 
 Requires: ncurses, libstdc++, zlib, openssl
@@ -420,10 +406,7 @@ Conflicts: bacula
 Requires: mysql
 %endif
 
-%if %{postgresql} && %{wb3}
-Requires: rh-postgresql >= 7
-%endif
-%if %{postgresql} && ! %{wb3}
+%if %{postgresql}
 Requires: postgresql >= 7
 %endif
 
@@ -437,10 +420,6 @@ Requires: postgresql >= 7
 %description postgresql
 %endif
 
-%if %{python}
-Requires: python >= %{pyver}
-%endif
-
 %{blurb}
 
 %{blurb2}
@@ -460,9 +439,6 @@ This build requires PostgreSQL to be installed separately as the catalog databas
 %if %{sqlite}
 This build incorporates sqlite3 as the catalog database, statically compiled.
 %endif
-%if %{python}
-This build includes python scripting support.
-%endif
 %if %{tcpwrappers}
 This build includes tcp-wrappers support.
 %endif
@@ -490,10 +466,6 @@ Provides: %{product}-libs
 Requires: libstdc++, zlib, openssl, bzip2-libs
 Requires: glibc, readline, %{name}-libs
 
-%if %{python}
-Requires: python >= %{pyver}
-%endif
-
 %description client
 %{blurb}
 
@@ -507,9 +479,6 @@ Requires: python >= %{pyver}
 
 This is the File daemon (Client) only package. It includes the command line
 console program.
-%if %{python}
-This build includes python scripting support.
-%endif
 %if %{tcpwrappers}
 This build includes tcp-wrappers support.
 %endif
@@ -627,9 +596,6 @@ export LDFLAGS="${LDFLAGS} -L/usr/lib64"
 %if %{mysql} && %{x86_64}
 export LDFLAGS="${LDFLAGS} -L/usr/lib64/mysql"
 %endif
-%if %{python} && %{x86_64}
-export LDFLAGS="${LDFLAGS} -L/usr/lib64/python%{pyver}"
-%endif
 
 export BACULA="Bacula"
 
@@ -655,9 +621,6 @@ export BACULA="Bacula"
         --with-postgresql \
 %endif
         --disable-bat \
-%if %{python}
-        --with-python \
-%endif
 %if %{client_only}
         --enable-client-only \
 %endif
@@ -723,7 +686,7 @@ rm -f $RPM_BUILD_ROOT%{script_dir}/gconsole
 # Remove docs for programs we do not distribute
 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bpluginfo.8.%{manpage_ext}
 
-# Storage-ctl packaged in shstore rpm
+# Remove storage-ctl packaged in shstore rpm
 rm -f $RPM_BUILD_ROOT%{script_dir}/storage-ctl
 rm -f $RPM_BUILD_ROOT%{script_dir}/storage-ctl.conf
 
@@ -740,6 +703,11 @@ rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
 %endif
 
+# Remove symlinks
+#rm -f $RPM_BUILD_ROOT%{_libdir}/libbaccats.so
+#rm -f $RPM_BUILD_ROOT%{_libdir}/libbaccats-%{version}.so
+rm -f $RPM_BUILD_ROOT%{_libdir}/libbacsd.la
+
 # install the init scripts
 %if !%{usesystemd}
 %if %{suse}
@@ -850,6 +818,7 @@ rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
 %attr(-, root, %{daemon_group}) %{script_dir}/grant_mysql_privileges
 %{_libdir}/libbaccats*
 %{_libdir}/libbacsql*
+%{_libdir}/libbacsd*.so
 %endif
 
 
@@ -864,6 +833,7 @@ rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
 %attr(755, root, %{daemon_group}) %{script_dir}/grant_postgresql_privileges
 %{_libdir}/libbaccats*
 %{_libdir}/libbacsql*
+%{_libdir}/libbacsd*.so
 %endif
 
 # The rest is DB backend independent
@@ -890,9 +860,11 @@ 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}/tapealert
+%attr(-, root, %{daemon_group}) %{script_dir}/baculabackupreport
+
 %attr(-, root, %{daemon_group}) %{plugin_dir}/bpipe-fd.so
 %attr(-, root, %{daemon_group}) %{_sbindir}/dbcheck
-%attr(-, root, %{storage_daemon_group}) %{script_dir}/dvd-handler
 %attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer
 %attr(-, root, %{storage_daemon_group}) %config(noreplace) %{script_dir}/mtx-changer.conf
 
@@ -924,11 +896,15 @@ rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
 %attr(-, root, %{daemon_group}) %{_sbindir}/bacula-sd
 %attr(-, root, %{daemon_group}) %{_sbindir}/btraceback
 %attr(-, root, %{daemon_group}) %{_sbindir}/bconsole
+%attr(-, root, %{daemon_group}) %{_sbindir}/bbconsjson
 %attr(-, root, %{daemon_group}) %{_sbindir}/bsmtp
 %attr(-, root, %{daemon_group}) %{_sbindir}/bscan
 %attr(-, root, %{daemon_group}) %{_sbindir}/btape
+%attr(-, root, %{daemon_group}) %{_sbindir}/bdirjson
+%attr(-, root, %{daemon_group}) %{_sbindir}/bsdjson
 
 %attr(755, root, root) %{_sbindir}/bsnapshot
+%attr(755, root, root) %{_sbindir}/bfdjson
 
 %{_sbindir}/bacula-fd
 %{_sbindir}/bacula
@@ -955,6 +931,8 @@ rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
 %{_mandir}/man1/bat.1.%{manpage_ext}
 %_prefix/share/doc/*
 
+%attr(-, root, %{daemon_group}) %{script_dir}/bacula-tray-monitor.desktop
+
 %doc ../Release_Notes-%{version}-%{release}.txt
 
 %endif