Andreas Thienemann 3e9068
# NB: This spec file differs from all other branches as the
Andreas Thienemann 3e9068
# wxGTK dependency does not exist on RHEL4
Andreas Thienemann 3e9068
Andreas Thienemann b41752
%define working_dir	/var/spool/bacula
Andreas Thienemann b41752
%define script_dir	/usr/libexec/bacula
Andreas Thienemann b41752
#%define rescue_version	2.0.0
Andreas Thienemann b41752
%define docs_version	%{version}
Andreas Thienemann b41752
%define gui_version	%{version}
Andreas Thienemann b41752
%define config_dir	%{_sysconfdir}/bacula
Andreas Thienemann b41752
Andreas Thienemann b41752
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
Andreas Thienemann b41752
Name: bacula
Andreas Thienemann b41752
Version: 2.0.3
Andreas Thienemann f5b68c
Release: 9%{?dist}
Andreas Thienemann b41752
License: GPL
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Source0: http://download.sourceforge.net/bacula/bacula-%{version}.tar.gz
Andreas Thienemann b41752
Source1: http://download.sourceforge.net/bacula/bacula-docs-%{docs_version}.tar.gz
Andreas Thienemann b41752
#Source2: http://download.sourceforge.net/bacula/bacula-rescue-%{rescue_version}.tar.gz
Andreas Thienemann b41752
Source3: bacula-gconsole.desktop
Andreas Thienemann b41752
Source4: bacula-wxconsole.desktop
Andreas Thienemann b41752
Source5: bacula-traymonitor.desktop
Andreas Thienemann b41752
Source6: bacula.logrotate
Andreas Thienemann b41752
Source7: bacula-fd.init
Andreas Thienemann b41752
Source8: bacula-dir.init
Andreas Thienemann b41752
Source9: bacula-sd.init
Andreas Thienemann b41752
#Source10: http://download.sourceforge.net/bacula/bacula-gui-%{gui_version}.tar.gz
Andreas Thienemann b41752
#Source11: bacula-web.apache
Andreas Thienemann b41752
Patch0: bacula-director-configuration.patch
Andreas Thienemann b41752
Patch1: bacula-config.patch
Andreas Thienemann b41752
Patch2: bacula-wxconsole.patch
Andreas Thienemann b41752
Patch3: bacula-pamd.patch
Andreas Thienemann b41752
Patch4: 2.0.3-ampm.patch
Andreas Thienemann b41752
Patch5: 2.0.3-maxbyteslist.patch
Andreas Thienemann b41752
Patch6: 2.0.3-maxwaittime.patch
Andreas Thienemann b41752
Patch7: 2.0.3-scheduler-next-hour.patch
Andreas Thienemann b41752
Patch8: 2.0.3-verify.patch
Andreas Thienemann b41752
Patch9: 2.0.3-tls-disconnect.patch
Andreas Thienemann b41752
#Patch10: bacula-web-smarty.patch
Andreas Thienemann b41752
URL: http://www.bacula.org
Andreas Thienemann b41752
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Andreas Thienemann b41752
BuildRequires: openssl-devel, atk-devel, ncurses-devel, pango-devel, perl
Andreas Thienemann b41752
BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel, pkgconfig
Andreas Thienemann b41752
BuildRequires: libtermcap-devel, gtk2-devel, libgnomeui-devel, GConf2-devel
Andreas Thienemann b41752
BuildRequires: glibc-devel, ORBit2-devel, libart_lgpl-devel, freetype-devel
Andreas Thienemann b41752
BuildRequires: libbonobo-devel, libbonoboui-devel, bonobo-activation-devel
Andreas Thienemann 3e9068
BuildRequires: mysql-devel, cdrecord, postgresql-devel
Andreas Thienemann b41752
BuildRequires: desktop-file-utils, python-devel, sqlite-devel, sed,
Andreas Thienemann b41752
BuildRequires: libacl-devel, latex2html, tetex-latex, tetex, ghostscript
Andreas Thienemann b41752
Andreas Thienemann b41752
%if "%{fedora}" >= "7"
Andreas Thienemann b41752
BuildRequires: tcp_wrappers-devel
Andreas Thienemann b41752
%else
Andreas Thienemann b41752
BuildRequires: tcp_wrappers
Andreas Thienemann b41752
%endif
Andreas Thienemann b41752
Andreas Thienemann b41752
%description
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture and is
Andreas Thienemann b41752
efficient and relatively easy to use, while offering many advanced
Andreas Thienemann b41752
storage management features that make it easy to find and recover lost
Andreas Thienemann b41752
or damaged files.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package director-mysql
Andreas Thienemann b41752
Summary: Bacula Director with MySQL database support
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Provides: bacula-director = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-director-common = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-common = %{version}-%{release}
Andreas Thienemann b41752
Requires: mysql-server
Andreas Thienemann b41752
Andreas Thienemann b41752
%description director-mysql
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the bacula director, the server which controls 
Andreas Thienemann b41752
your backup run.
Andreas Thienemann b41752
This director has support for the MySQL database.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package director-sqlite
Andreas Thienemann b41752
Summary: Bacula Director with sqlite database support
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Provides: bacula-director = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-director-common = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-common = %{version}-%{release}
Andreas Thienemann b41752
Andreas Thienemann b41752
%description director-sqlite
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the bacula director, the server which controls 
Andreas Thienemann b41752
your backup run.
Andreas Thienemann b41752
This director has support for the sqlite database.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package director-postgresql
Andreas Thienemann b41752
Summary: Bacula Director with PostgresSQL database support
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Provides: bacula-director = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-director-common = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-common = %{version}-%{release}
Andreas Thienemann b41752
Requires: postgresql-server
Andreas Thienemann b41752
Andreas Thienemann b41752
%description director-postgresql
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the bacula director, the server which controls 
Andreas Thienemann b41752
your backup run.
Andreas Thienemann b41752
This director has support for the PostgresSQL database.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package director-common
Andreas Thienemann b41752
Summary: Common Bacula Director files
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Requires: bacula-director = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-common = %{version}-%{release}
Andreas Thienemann b41752
Requires(pre): fedora-usermgmt
Andreas Thienemann b41752
Requires(postun): fedora-usermgmt
Andreas Thienemann b41752
Andreas Thienemann b41752
%description director-common
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the common director files, which are shared 
Andreas Thienemann b41752
between all database backends. You have to select a possible
Andreas Thienemann b41752
database backend though, which provides the needed bacula-director
Andreas Thienemann b41752
dependency. Please choose from bacula-director-mysql,
Andreas Thienemann b41752
bacula-director-sqlite or bacula-director-postgresql.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package client
Andreas Thienemann b41752
Summary: Bacula backup client
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Requires: bacula-common = %{version}-%{release}
Andreas Thienemann b41752
Requires(post): /sbin/chkconfig
Andreas Thienemann b41752
Requires(preun): /sbin/chkconfig
Andreas Thienemann b41752
Requires(preun): /sbin/service
Andreas Thienemann b41752
Requires(postun): /sbin/service
Andreas Thienemann b41752
Andreas Thienemann b41752
%description client
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the bacula client, the daemon running on the 
Andreas Thienemann b41752
system to be backed up.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package storage-common
Andreas Thienemann b41752
Summary: Common Bacula storage daemon files
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Requires: bacula-storage = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-common = %{version}-%{release}
Andreas Thienemann b41752
Andreas Thienemann b41752
%description storage-common
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the storage daemon, the daemon responsible for 
Andreas Thienemann b41752
writing the data received from the clients onto tape drives or other 
Andreas Thienemann b41752
mass storage devices.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package storage-mysql
Andreas Thienemann b41752
Summary: MySQL Bacula storage daemon files
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Provides: bacula-storage = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-storage-common = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-common = %{version}-%{release}
Andreas Thienemann b41752
Requires: mysql-server
Andreas Thienemann b41752
Andreas Thienemann b41752
%description storage-mysql
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the storage daemon, the daemon responsible for 
Andreas Thienemann b41752
writing the data received from the clients onto tape drives or other 
Andreas Thienemann b41752
mass storage devices.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package storage-sqlite
Andreas Thienemann b41752
Summary: SQLite Bacula storage daemon files
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Provides: bacula-storage = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-storage-common = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-common = %{version}-%{release}
Andreas Thienemann b41752
Andreas Thienemann b41752
%description storage-sqlite
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the storage daemon, the daemon responsible for 
Andreas Thienemann b41752
writing the data received from the clients onto tape drives or other 
Andreas Thienemann b41752
mass storage devices.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package storage-postgresql
Andreas Thienemann b41752
Summary: Common Bacula storage daemon files
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Provides: bacula-storage = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-storage-common = %{version}-%{release}
Andreas Thienemann b41752
Requires: bacula-common = %{version}-%{release}
Andreas Thienemann b41752
Requires: postgresql-server
Andreas Thienemann b41752
Andreas Thienemann b41752
%description storage-postgresql
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the storage daemon, the daemon responsible for 
Andreas Thienemann b41752
writing the data received from the clients onto tape drives or other 
Andreas Thienemann b41752
mass storage devices.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package common
Andreas Thienemann b41752
Summary: Common Bacula utilities
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Requires(pre): fedora-usermgmt
Andreas Thienemann b41752
Requires(postun): fedora-usermgmt
Andreas Thienemann b41752
Andreas Thienemann b41752
%description common
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package console
Andreas Thienemann b41752
Summary: Bacula management console
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Andreas Thienemann b41752
%description console
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the command-line management console for the bacula 
Andreas Thienemann b41752
backup system.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package console-gnome
Andreas Thienemann b41752
Summary: Bacula console for the Gnome desktop environment
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Requires: usermode
Andreas Thienemann b41752
Andreas Thienemann b41752
%description console-gnome
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the gnome version of the bacula management console
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann 3e9068
#%package console-wxwidgets
Andreas Thienemann 3e9068
#Summary: Bacula console using the wx widgets toolkit
Andreas Thienemann 3e9068
#Group: System Environment/Daemons
Andreas Thienemann 3e9068
#Requires: usermode
Andreas Thienemann b41752
Andreas Thienemann 3e9068
#%description console-wxwidgets
Andreas Thienemann 3e9068
#Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann 3e9068
#recovery, and verification of computer data across a network of
Andreas Thienemann 3e9068
#different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann 3e9068
#This package contains the wxWidgets version of the bacula management 
Andreas Thienemann 3e9068
#console.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package traymonitor
Andreas Thienemann b41752
Summary: Bacula monitor for the Gnome and KDE system tray
Andreas Thienemann b41752
Group: System Environment/Daemons
Andreas Thienemann b41752
Andreas Thienemann b41752
%description traymonitor
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the Gnome- and KDE-compatible tray monitor to 
Andreas Thienemann b41752
monitor your bacula server.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
#%package web
Andreas Thienemann b41752
#Summary: Bacula Web Interface for monitoring the Backup status
Andreas Thienemann b41752
#Group: System Environment/Daemons
Andreas Thienemann b41752
#Conflicts: bacula-storage-sqlite
Andreas Thienemann b41752
#Requires: php, webserver, php-pear-DB, php-gd, php-Smarty
Andreas Thienemann b41752
Andreas Thienemann b41752
#%description web
Andreas Thienemann b41752
#Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
#recovery, and verification of computer data across a network of
Andreas Thienemann b41752
#different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
#This package contains the bacula-web PHP application, which is
Andreas Thienemann b41752
#a management level tool for reporting Backup job status.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%package docs
Andreas Thienemann b41752
Summary: Bacula documentation
Andreas Thienemann b41752
Group: Documentation
Andreas Thienemann b41752
Andreas Thienemann b41752
%description docs
Andreas Thienemann b41752
Bacula is a set of programs that allow you to manage the backup,
Andreas Thienemann b41752
recovery, and verification of computer data across a network of
Andreas Thienemann b41752
different computers. It is based on a client/server architecture.
Andreas Thienemann b41752
Andreas Thienemann b41752
This package contains the documentation for most of the bacula-packages.
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%prep
Andreas Thienemann b41752
%setup -q -c -n bacula-%{version}
Andreas Thienemann b41752
%setup -q -a 1 -D -T
Andreas Thienemann b41752
#%setup -q -a 2 -D -T
Andreas Thienemann b41752
#%setup -q -a 10 -D -T
Andreas Thienemann b41752
Andreas Thienemann b41752
# Patching and other source preparation
Andreas Thienemann b41752
pushd bacula-%{version}
Andreas Thienemann b41752
%patch0 -p1
Andreas Thienemann b41752
%patch1 -p1
Andreas Thienemann b41752
%patch2 -p1
Andreas Thienemann b41752
%patch3 -p1
Andreas Thienemann b41752
%patch4 -p0
Andreas Thienemann b41752
%patch5 -p0
Andreas Thienemann b41752
%patch6 -p0
Andreas Thienemann b41752
%patch7 -p0
Andreas Thienemann b41752
%patch8 -p0
Andreas Thienemann b41752
%patch9 -p0
Andreas Thienemann b41752
Andreas Thienemann b41752
# Remove execution permissions from files we're packaging as docs later on
Andreas Thienemann b41752
find examples -type f | xargs chmod -x
Andreas Thienemann b41752
find updatedb -type f | xargs chmod -x
Andreas Thienemann b41752
popd
Andreas Thienemann b41752
Andreas Thienemann b41752
# Remove cvs left-overs
Andreas Thienemann b41752
find -name '.cvsignore' | xargs rm -f 
Andreas Thienemann b41752
Andreas Thienemann b41752
# Fix perms of c files to silent rpmlint
Andreas Thienemann b41752
find -type f -name '*.c' | xargs chmod -x 
Andreas Thienemann b41752
find -type f -name '*.h' | xargs chmod -x 
Andreas Thienemann b41752
Andreas Thienemann b41752
# GUI Stuff is postponed for later
Andreas Thienemann b41752
#pushd bacula-gui-%{gui_version}
Andreas Thienemann b41752
#%patch10 -p0
Andreas Thienemann b41752
#popd
Andreas Thienemann b41752
Andreas Thienemann b41752
# We are building the source several times, each with a different storage backend
Andreas Thienemann b41752
mkdir bacula-mysql bacula-postgresql bacula-sqlite
Andreas Thienemann b41752
Andreas Thienemann b41752
%build
Andreas Thienemann b41752
# Shell function to configure and build a Bacula tree
Andreas Thienemann b41752
build() {
Andreas Thienemann b41752
cp -rl ../bacula-%{version}/* .
Andreas Thienemann b41752
%configure \
Andreas Thienemann b41752
	--sysconfdir=%{_sysconfdir}/bacula \
Andreas Thienemann b41752
	--with-dir-user=bacula \
Andreas Thienemann b41752
	--with-dir-group=bacula \
Andreas Thienemann b41752
	--with-sd-user=bacula \
Andreas Thienemann b41752
	--with-sd-group=bacula \
Andreas Thienemann b41752
	--with-fd-user=root \
Andreas Thienemann b41752
	--with-fd-group=root \
Andreas Thienemann b41752
	--with-dir-password=@@DIR_PASSWORD@@ \
Andreas Thienemann b41752
	--with-fd-password=@@FD_PASSWORD@@ \
Andreas Thienemann b41752
	--with-sd-password=@@SD_PASSWORD@@ \
Andreas Thienemann b41752
	--with-mon-dir-password=@@MON_DIR_PASSWORD@@ \
Andreas Thienemann b41752
	--with-mon-fd-password=@@MON_FD_PASSWORD@@ \
Andreas Thienemann b41752
	--with-mon-sd-password=@@MON_SD_PASSWORD@@ \
Andreas Thienemann b41752
	--with-working-dir=%{working_dir} \
Andreas Thienemann b41752
	--with-scriptdir=%{script_dir} \
Andreas Thienemann b41752
	--with-smtp-host=localhost \
Andreas Thienemann b41752
	--with-subsys-dir=%{_localstatedir}/lock/subsys \
Andreas Thienemann b41752
	--with-pid-dir=%{_localstatedir}/run \
Andreas Thienemann b41752
	--enable-conio \
Andreas Thienemann b41752
	--enable-largefile \
Andreas Thienemann b41752
	--enable-gnome \
Andreas Thienemann b41752
	--enable-tray-monitor \
Andreas Thienemann b41752
	--enable-build-dird \
Andreas Thienemann b41752
	--enable-build-stored \
Andreas Thienemann b41752
	--with-openssl \
Andreas Thienemann b41752
	--with-tcp-wrappers \
Andreas Thienemann b41752
	--with-python \
Andreas Thienemann b41752
	--enable-smartalloc \
Andreas Thienemann b41752
	--with-x \
Andreas Thienemann b41752
	$*
Andreas Thienemann b41752
# Scratch this, it is trouble
Andreas Thienemann b41752
#	--with-readline \
Andreas Thienemann 3e9068
# Removed as we have no wxGTK on rhel4
Andreas Thienemann 3e9068
#	--enable-wx-console \
Andreas Thienemann b41752
Andreas Thienemann b41752
if test $? != 0; then 
Andreas Thienemann b41752
  tail -500 config.log
Andreas Thienemann b41752
  : configure failed
Andreas Thienemann b41752
  exit 1
Andreas Thienemann b41752
fi
Andreas Thienemann b41752
Andreas Thienemann b41752
%{__make} %{?_smp_mflags}
Andreas Thienemann b41752
Andreas Thienemann b41752
}				
Andreas Thienemann b41752
Andreas Thienemann b41752
# Build sqlite director
Andreas Thienemann b41752
pushd bacula-sqlite
Andreas Thienemann b41752
%if 0%{?fedora}%{?rhel}
Andreas Thienemann b41752
	%if 0%{?fedora}
Andreas Thienemann b41752
		%if "%{fedora}" >= "5"
Andreas Thienemann b41752
			%define	sqlite_suffix 3
Andreas Thienemann b41752
			build --with-sqlite3
Andreas Thienemann b41752
		%else
Andreas Thienemann b41752
			build --with-sqlite
Andreas Thienemann b41752
		%endif
Andreas Thienemann b41752
	%endif
Andreas Thienemann b41752
	%if 0%{?rhel}
Andreas Thienemann b41752
		%if "%{rhel}" >=  "5"
Andreas Thienemann b41752
			%define	sqlite_suffix 3
Andreas Thienemann b41752
			build --with-sqlite3
Andreas Thienemann b41752
		%else
Andreas Thienemann b41752
			build --with-sqlite
Andreas Thienemann b41752
		%endif
Andreas Thienemann b41752
	%endif
Andreas Thienemann b41752
%else
Andreas Thienemann b41752
	echo 'Neither %%{fedora} nor %%{rhel} are defined.'
Andreas Thienemann b41752
	echo 'Please call rpmbuild with at least --define "fedora 7" or --define "rhel 5"'
Andreas Thienemann b41752
	echo 'depending on your release version you are building on.'
Andreas Thienemann b41752
	exit 1
Andreas Thienemann b41752
%endif
Andreas Thienemann b41752
popd
Andreas Thienemann b41752
Andreas Thienemann b41752
# Build MySQL director
Andreas Thienemann b41752
pushd bacula-mysql
Andreas Thienemann b41752
	build --with-mysql
Andreas Thienemann b41752
popd
Andreas Thienemann b41752
Andreas Thienemann b41752
# Build PostgreSQL director
Andreas Thienemann b41752
pushd bacula-postgresql
Andreas Thienemann b41752
	build --with-postgresql
Andreas Thienemann b41752
popd
Andreas Thienemann b41752
Andreas Thienemann b41752
# Build the docs
Andreas Thienemann b41752
pushd bacula-docs-%{docs_version}
Andreas Thienemann b41752
 %configure --with-bacula=%{_builddir}/bacula-%{version}/bacula-%{version}
Andreas Thienemann b41752
 make
Andreas Thienemann b41752
popd
Andreas Thienemann b41752
Andreas Thienemann b41752
%install
Andreas Thienemann b41752
rm -rf %{buildroot}
Andreas Thienemann b41752
Andreas Thienemann b41752
pushd bacula-sqlite
Andreas Thienemann b41752
	make install DESTDIR=%{buildroot}
Andreas Thienemann b41752
	mv %{buildroot}%{_sbindir}/bacula-dir  %{buildroot}%{_sbindir}/bacula-dir.sqlite
Andreas Thienemann b41752
	mv %{buildroot}%{_sbindir}/dbcheck  %{buildroot}%{_sbindir}/dbcheck.sqlite
Andreas Thienemann b41752
	mv %{buildroot}%{_sbindir}/bcopy  %{buildroot}%{_sbindir}/bcopy.sqlite
Andreas Thienemann b41752
	mv %{buildroot}%{_sbindir}/bscan  %{buildroot}%{_sbindir}/bscan.sqlite
Andreas Thienemann b41752
Andreas Thienemann b41752
	for script in create_bacula_database drop_bacula_database drop_bacula_tables \
Andreas Thienemann b41752
			grant_bacula_privileges make_bacula_tables make_catalog_backup \
Andreas Thienemann b41752
			update_bacula_tables; do
Andreas Thienemann b41752
		mv %{buildroot}%{_libexecdir}/bacula/${script} %{buildroot}%{_libexecdir}/bacula/${script}.sqlite
Andreas Thienemann b41752
	done
Andreas Thienemann b41752
popd
Andreas Thienemann b41752
Andreas Thienemann b41752
pushd bacula-mysql
Andreas Thienemann b41752
	make install DESTDIR=%{buildroot}
Andreas Thienemann b41752
	mv %{buildroot}%{_sbindir}/bacula-dir  %{buildroot}%{_sbindir}/bacula-dir.mysql
Andreas Thienemann b41752
	mv %{buildroot}%{_sbindir}/dbcheck  %{buildroot}%{_sbindir}/dbcheck.mysql
Andreas Thienemann b41752
	mv %{buildroot}%{_sbindir}/bcopy  %{buildroot}%{_sbindir}/bcopy.mysql
Andreas Thienemann b41752
	mv %{buildroot}%{_sbindir}/bscan  %{buildroot}%{_sbindir}/bscan.mysql
Andreas Thienemann b41752
Andreas Thienemann b41752
	for script in create_bacula_database drop_bacula_database drop_bacula_tables \
Andreas Thienemann b41752
			grant_bacula_privileges make_bacula_tables make_catalog_backup \
Andreas Thienemann b41752
			update_bacula_tables; do
Andreas Thienemann b41752
		mv %{buildroot}%{_libexecdir}/bacula/${script} %{buildroot}%{_libexecdir}/bacula/${script}.mysql
Andreas Thienemann b41752
	done
Andreas Thienemann b41752
popd
Andreas Thienemann b41752
Andreas Thienemann b41752
pushd bacula-postgresql
Andreas Thienemann b41752
	make install DESTDIR=%{buildroot}
Andreas Thienemann b41752
	mv %{buildroot}%{_sbindir}/bacula-dir  %{buildroot}%{_sbindir}/bacula-dir.postgresql
Andreas Thienemann b41752
	mv %{buildroot}%{_sbindir}/dbcheck  %{buildroot}%{_sbindir}/dbcheck.postgresql
Andreas Thienemann b41752
	mv %{buildroot}%{_sbindir}/bcopy  %{buildroot}%{_sbindir}/bcopy.postgresql
Andreas Thienemann b41752
	mv %{buildroot}%{_sbindir}/bscan  %{buildroot}%{_sbindir}/bscan.postgresql
Andreas Thienemann b41752
Andreas Thienemann b41752
	for script in create_bacula_database drop_bacula_database drop_bacula_tables \
Andreas Thienemann b41752
			grant_bacula_privileges make_bacula_tables make_catalog_backup \
Andreas Thienemann b41752
			update_bacula_tables; do
Andreas Thienemann b41752
		mv %{buildroot}%{_libexecdir}/bacula/${script} %{buildroot}%{_libexecdir}/bacula/${script}.postgresql
Andreas Thienemann b41752
	done
Andreas Thienemann b41752
popd
Andreas Thienemann b41752
Andreas Thienemann b41752
pushd bacula-docs-%{docs_version}
Andreas Thienemann b41752
 # No install target anymore, we'll include the stuff directly in the %%files section
Andreas Thienemann b41752
 #	make install DESTDIR=%{buildroot}
Andreas Thienemann b41752
popd
Andreas Thienemann b41752
Andreas Thienemann b41752
# GUI is not being packaged yet
Andreas Thienemann b41752
#pushd bacula-gui-%{gui_version}/bacula-web
Andreas Thienemann b41752
#	mkdir -p %{buildroot}%{_datadir}/bacula-web
Andreas Thienemann b41752
#	cp -r -p * %{buildroot}%{_datadir}/bacula-web
Andreas Thienemann b41752
#	for f in ChangeLog CONTACT COPYING README TODO; do
Andreas Thienemann b41752
#		rm -f %{buildroot}%{_datadir}/bacula-web/$f
Andreas Thienemann b41752
#	done
Andreas Thienemann b41752
#	rm -f %{buildroot}%{_datadir}/bacula-web/tsmarty2c.php
Andreas Thienemann b41752
#	rm -rf %{buildroot}%{_datadir}/bacula-web/external_packages/smarty
Andreas Thienemann b41752
#	mv %{buildroot}%{_datadir}/bacula-web/configs/bacula.conf %{buildroot}%{_sysconfdir}/bacula/bacula-web.conf
Andreas Thienemann b41752
#	ln -sf /etc/bacula/bacula-web.conf %{buildroot}%{_datadir}/bacula-web/configs/bacula.conf
Andreas Thienemann b41752
#	install -D -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/httpd/conf.d/bacula-web.conf
Andreas Thienemann b41752
#	mkdir -p %{buildroot}%{_localstatedir}/cache/bacula
Andreas Thienemann b41752
#popd
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
# Rename some manpages
Andreas Thienemann b41752
# Not needed right-now
Andreas Thienemann b41752
#mv %{buildroot}%{_mandir}/man1/bacula-tray-monitor.1 %{buildroot}%{_mandir}/man1/tray-monitor.1
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
# Fix some wrapper braindeadness
Andreas Thienemann b41752
rm -f %{buildroot}%{_libexecdir}/bacula/bconsole
Andreas Thienemann b41752
rm -f %{buildroot}%{_libexecdir}/bacula/gconsole
Andreas Thienemann 3e9068
# mv %{buildroot}%{_sbindir}/wx-console %{buildroot}%{_sbindir}/wxconsole
Andreas Thienemann 3e9068
# mv %{buildroot}%{_sysconfdir}/bacula/wx-console.conf %{buildroot}%{_sysconfdir}/bacula/wxconsole.conf
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
# Desktop Integration for the console apps and the traymonitor
Andreas Thienemann b41752
mkdir -p %{buildroot}%{_bindir}
Andreas Thienemann b41752
install -m 644 -D bacula-sqlite/scripts/bacula.png %{buildroot}%{_datadir}/pixmaps/bacula.png
Andreas Thienemann b41752
install -m 644 -D bacula-sqlite/scripts/gnome-console.pamd %{buildroot}%{_sysconfdir}/pam.d/gnome-console
Andreas Thienemann b41752
install -m 644 -D bacula-sqlite/scripts/gnome-console.console_apps %{buildroot}%{_sysconfdir}/security/console.apps/gnome-console
Andreas Thienemann 3e9068
# install -m 644 -D bacula-sqlite/src/wx-console/wxwin16x16.xpm %{buildroot}%{_datadir}/pixmaps/wxwin16x16.xpm
Andreas Thienemann 3e9068
# install -m 644 -D bacula-sqlite/scripts/wxconsole.pamd %{buildroot}%{_sysconfdir}/pam.d/wxconsole
Andreas Thienemann 3e9068
# install -m 644 -D bacula-sqlite/scripts/wxconsole.desktop.consolehelper %{buildroot}%{_sysconfdir}/security/console.apps/wxconsole
Andreas Thienemann b41752
install -m 644 -D bacula-sqlite/src/tray-monitor/generic.xpm %{buildroot}%{_datadir}/pixmaps/bacula-tray-monitor.xpm
Andreas Thienemann b41752
Andreas Thienemann b41752
ln -sf consolehelper %{buildroot}%{_bindir}/gnome-console
Andreas Thienemann 3e9068
# ln -sf consolehelper %{buildroot}%{_bindir}/wxconsole
Andreas Thienemann b41752
Andreas Thienemann b41752
desktop-file-install --vendor="fedora" --dir=%{buildroot}%{_datadir}/applications %{SOURCE3}
Andreas Thienemann b41752
desktop-file-install --vendor="fedora" --dir=%{buildroot}%{_datadir}/applications %{SOURCE4}
Andreas Thienemann b41752
desktop-file-install --vendor="fedora" --dir=%{buildroot}%{_datadir}/applications %{SOURCE5}
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
# logrotate
Andreas Thienemann b41752
mkdir -p %{buildroot}%{_localstatedir}/log/bacula
Andreas Thienemann b41752
install -m 644 -D %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/bacula
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
# And logwatch
Andreas Thienemann b41752
install -m 755 -D bacula-sqlite/scripts/logwatch/bacula %{buildroot}%{_sysconfdir}/logwatch/scripts/services/bacula
Andreas Thienemann b41752
install -m 644 -D bacula-sqlite/scripts/logwatch/logfile.bacula.conf %{buildroot}%{_sysconfdir}/logwatch/conf/logfiles/bacula.conf
Andreas Thienemann b41752
install -m 644 -D bacula-sqlite/scripts/logwatch/services.bacula.conf %{buildroot}%{_sysconfdir}/logwatch/conf/services/bacula.conf
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
# Initscripts
Andreas Thienemann b41752
install -m 755 -D %{SOURCE7}  %{buildroot}%{_initrddir}/bacula-fd
Andreas Thienemann b41752
install -m 755 -D %{SOURCE8}  %{buildroot}%{_initrddir}/bacula-dir
Andreas Thienemann b41752
install -m 755 -D %{SOURCE9}  %{buildroot}%{_initrddir}/bacula-sd
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
# Wipe backup files from the multiple make install calls
Andreas Thienemann b41752
rm -vf %{buildroot}%{_sysconfdir}/bacula/*.{new,old}
Andreas Thienemann b41752
rm -vf %{buildroot}%{_libexecdir}/bacula/*.{new,old}
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
# Create the spooling
Andreas Thienemann b41752
mkdir -p %{buildroot}%{_localstatedir}/spool/bacula
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
# Move some files around
Andreas Thienemann b41752
mv %{buildroot}%{_libexecdir}/bacula/query.sql %{buildroot}%{_sysconfdir}/bacula/query.sql
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
# Nuke the scripts we do not need
Andreas Thienemann b41752
rm -vf %{buildroot}%{_libexecdir}/bacula/{bacula,bacula-ctl-*,startmysql,stopmysql} 
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
# Fix up some perms so rpmlint does not complain too much
Andreas Thienemann b41752
chmod 755 %{buildroot}%{_sbindir}/*
Andreas Thienemann b41752
chmod 755 %{buildroot}%{_libexecdir}/bacula/*
Andreas Thienemann b41752
chmod 644 %{buildroot}%{_libexecdir}/bacula/btraceback.*
Andreas Thienemann b41752
Andreas Thienemann b41752
%clean
Andreas Thienemann b41752
rm -rf %{buildroot}
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%post director-mysql
Andreas Thienemann b41752
/usr/sbin/alternatives --install /usr/sbin/bacula-dir bacula-dir /usr/sbin/bacula-dir.mysql 50 \
Andreas Thienemann b41752
	--slave /usr/sbin/dbcheck bacula-dbcheck /usr/sbin/dbcheck.mysql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/create_bacula_database create_bacula_database /usr/libexec/bacula/create_bacula_database.mysql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/drop_bacula_database drop_bacula_database /usr/libexec/bacula/drop_bacula_database.mysql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/drop_bacula_tables drop_bacula_tables /usr/libexec/bacula/drop_bacula_tables.mysql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/grant_bacula_privileges grant_bacula_privileges /usr/libexec/bacula/grant_bacula_privileges.mysql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/make_bacula_tables make_bacula_tables /usr/libexec/bacula/make_bacula_tables.mysql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/make_catalog_backup make_catalog_backup /usr/libexec/bacula/make_catalog_backup.mysql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/update_bacula_tables update_bacula_tables /usr/libexec/bacula/update_bacula_tables.mysql
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%post director-sqlite
Andreas Thienemann b41752
/usr/sbin/alternatives --install /usr/sbin/bacula-dir bacula-dir /usr/sbin/bacula-dir.sqlite 40 \
Andreas Thienemann b41752
	--slave /usr/sbin/dbcheck bacula-dbcheck /usr/sbin/dbcheck.sqlite \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/create_bacula_database create_bacula_database /usr/libexec/bacula/create_bacula_database.sqlite \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/drop_bacula_database drop_bacula_database /usr/libexec/bacula/drop_bacula_database.sqlite \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/drop_bacula_tables drop_bacula_tables /usr/libexec/bacula/drop_bacula_tables.sqlite \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/grant_bacula_privileges grant_bacula_privileges /usr/libexec/bacula/grant_bacula_privileges.sqlite \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/make_bacula_tables make_bacula_tables /usr/libexec/bacula/make_bacula_tables.sqlite \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/make_catalog_backup make_catalog_backup /usr/libexec/bacula/make_catalog_backup.sqlite \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/update_bacula_tables update_bacula_tables /usr/libexec/bacula/update_bacula_tables.sqlite
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%post director-postgresql
Andreas Thienemann b41752
/usr/sbin/alternatives --install /usr/sbin/bacula-dir bacula-dir /usr/sbin/bacula-dir.postgresql 60 \
Andreas Thienemann b41752
	--slave /usr/sbin/dbcheck bacula-dbcheck /usr/sbin/dbcheck.postgresql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/create_bacula_database create_bacula_database /usr/libexec/bacula/create_bacula_database.postgresql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/drop_bacula_database drop_bacula_database /usr/libexec/bacula/drop_bacula_database.postgresql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/drop_bacula_tables drop_bacula_tables /usr/libexec/bacula/drop_bacula_tables.postgresql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/grant_bacula_privileges grant_bacula_privileges /usr/libexec/bacula/grant_bacula_privileges.postgresql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/make_bacula_tables make_bacula_tables /usr/libexec/bacula/make_bacula_tables.postgresql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/make_catalog_backup make_catalog_backup /usr/libexec/bacula/make_catalog_backup.postgresql \
Andreas Thienemann f5b68c
	--slave /usr/libexec/bacula/update_bacula_tables update_bacula_tables /usr/libexec/bacula/update_bacula_tables.postgresql
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%preun director-mysql
Andreas Thienemann b41752
/usr/sbin/alternatives --remove bacula-dir /usr/sbin/bacula-dir.mysql
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%preun director-sqlite
Andreas Thienemann b41752
/usr/sbin/alternatives --remove bacula-dir /usr/sbin/bacula-dir.sqlite
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%preun director-postgresql
Andreas Thienemann b41752
/usr/sbin/alternatives --remove bacula-dir /usr/sbin/bacula-dir.postgresql
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%pre common
Andreas Thienemann b41752
/usr/sbin/fedora-groupadd 33 -r bacula &>/dev/null || :
Andreas Thienemann b41752
/usr/sbin/fedora-useradd  33 -r -s /sbin/nologin -d /var/spool/bacula -M \
Andreas Thienemann b41752
	-c 'Bacula Backup System' -g bacula bacula &>/dev/null || :
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%postun common
Andreas Thienemann b41752
test "$1" != 0 || /usr/sbin/fedora-userdel  bacula &>/dev/null || :
Andreas Thienemann b41752
test "$1" != 0 || /usr/sbin/fedora-groupdel bacula &>/dev/null || :
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%post storage-mysql
Andreas Thienemann b41752
/usr/sbin/alternatives --install /usr/sbin/bcopy bacula-sd /usr/sbin/bcopy.mysql 50 \
Andreas Thienemann b41752
	--slave /usr/sbin/dbcheck bacula-bscan /usr/sbin/bscan.mysql 
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%post storage-sqlite
Andreas Thienemann b41752
/usr/sbin/alternatives --install /usr/sbin/bcopy bacula-sd /usr/sbin/bcopy.sqlite 40 \
Andreas Thienemann b41752
	--slave /usr/sbin/dbcheck bacula-bscan /usr/sbin/bscan.sqlite
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%post storage-postgresql
Andreas Thienemann b41752
/usr/sbin/alternatives --install /usr/sbin/bcopy bacula-sd /usr/sbin/bcopy.postgresql 60 \
Andreas Thienemann b41752
	--slave /usr/sbin/dbcheck bacula-bscan /usr/sbin/bscan.postgresql
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%preun storage-mysql
Andreas Thienemann b41752
/usr/sbin/alternatives --remove bacula-sd /usr/sbin/bcopy.mysql
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%preun storage-sqlite
Andreas Thienemann b41752
/usr/sbin/alternatives --remove bacula-sd /usr/sbin/bcopy.sqlite
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%preun storage-postgresql
Andreas Thienemann b41752
/usr/sbin/alternatives --remove bacula-sd /usr/sbin/bcopy.postgresql
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%post client
Andreas Thienemann b41752
/sbin/chkconfig --add bacula-fd
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%preun client
Andreas Thienemann b41752
if [ $1 = 0 ]; then
Andreas Thienemann b41752
	/sbin/service bacula-fd stop >/dev/null 2>&1 || :
Andreas Thienemann b41752
	/sbin/chkconfig --del bacula-fd
Andreas Thienemann b41752
fi
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%postun client
Andreas Thienemann b41752
if [ "$1" -ge "1" ]; then
Andreas Thienemann b41752
	/sbin/service bacula-fd condrestart >/dev/null 2>&1 || :
Andreas Thienemann b41752
fi
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%post director-common
Andreas Thienemann b41752
/sbin/chkconfig --add bacula-dir
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%preun director-common
Andreas Thienemann b41752
if [ $1 = 0 ]; then
Andreas Thienemann b41752
	/sbin/service bacula-dir stop >/dev/null 2>&1 || :
Andreas Thienemann b41752
	/sbin/chkconfig --del bacula-dir
Andreas Thienemann b41752
fi
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%postun director-common
Andreas Thienemann b41752
if [ "$1" -ge "1" ]; then
Andreas Thienemann b41752
	/sbin/service bacula-dir condrestart >/dev/null 2>&1 || :
Andreas Thienemann b41752
fi
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%post storage-common
Andreas Thienemann b41752
/sbin/chkconfig --add bacula-sd
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%preun storage-common
Andreas Thienemann b41752
if [ $1 = 0 ]; then
Andreas Thienemann b41752
	/sbin/service bacula-sd stop >/dev/null 2>&1 || :
Andreas Thienemann b41752
	/sbin/chkconfig --del bacula-sd
Andreas Thienemann b41752
fi
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%postun storage-common
Andreas Thienemann b41752
if [ "$1" -ge "1" ]; then
Andreas Thienemann b41752
	/sbin/service bacula-sd condrestart >/dev/null 2>&1 || :
Andreas Thienemann b41752
fi
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files common
Andreas Thienemann b41752
%doc bacula-%{version}/AUTHORS bacula-%{version}/ChangeLog bacula-%{version}/COPYING bacula-%{version}/LICENSE
Andreas Thienemann b41752
%doc bacula-%{version}/README bacula-%{version}/SUPPORT bacula-%{version}/VERIFYING
Andreas Thienemann b41752
%doc bacula-%{version}/examples/
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%config(noreplace) %{_sysconfdir}/logrotate.d/bacula
Andreas Thienemann b41752
%dir %{_sysconfdir}/bacula
Andreas Thienemann b41752
%dir %{_libexecdir}/bacula
Andreas Thienemann b41752
%{_sbindir}/bsmtp
Andreas Thienemann b41752
%{_sbindir}/btraceback
Andreas Thienemann b41752
%{_libexecdir}/bacula/btraceback.dbx
Andreas Thienemann b41752
%{_libexecdir}/bacula/btraceback.gdb
Andreas Thienemann b41752
%{_mandir}/man1/bsmtp.1*
Andreas Thienemann b41752
%{_mandir}/man8/bacula.8*
Andreas Thienemann b41752
%{_mandir}/man8/btraceback.8*
Andreas Thienemann b41752
%dir %attr(750, bacula, bacula) %{_localstatedir}/log/bacula
Andreas Thienemann b41752
%dir %attr(750, bacula, bacula) %{_localstatedir}/spool/bacula
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files client
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%{_sbindir}/bacula-fd
Andreas Thienemann b41752
%{_initrddir}/bacula-fd
Andreas Thienemann b41752
%config(noreplace) %{_sysconfdir}/bacula/bacula-fd.conf
Andreas Thienemann b41752
%dir %{_localstatedir}/spool/bacula
Andreas Thienemann b41752
%{_mandir}/man8/bacula-fd.8*
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files console
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%{_sbindir}/bconsole
Andreas Thienemann b41752
%config(noreplace) %{_sysconfdir}/bacula/bconsole.conf
Andreas Thienemann b41752
%{_mandir}/man8/bconsole.8*
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files console-gnome
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%config %{_sysconfdir}/security/console.apps/gnome-console
Andreas Thienemann b41752
%config %{_sysconfdir}/pam.d/gnome-console
Andreas Thienemann b41752
%config(noreplace) %{_sysconfdir}/bacula/gnome-console.conf
Andreas Thienemann b41752
%{_bindir}/gnome-console
Andreas Thienemann b41752
%{_sbindir}/gnome-console
Andreas Thienemann b41752
%{_mandir}/man1/bacula-console-gnome.1*
Andreas Thienemann b41752
%{_datadir}/applications/fedora-bacula-gconsole.desktop
Andreas Thienemann b41752
%{_datadir}/pixmaps/bacula.png
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann 3e9068
#%files console-wxwidgets
Andreas Thienemann 3e9068
#%defattr(-,root,root,-)
Andreas Thienemann 3e9068
#%config %{_sysconfdir}/security/console.apps/wxconsole
Andreas Thienemann 3e9068
#%config %{_sysconfdir}/pam.d/wxconsole
Andreas Thienemann 3e9068
#%config(noreplace) %{_sysconfdir}/bacula/wxconsole.conf
Andreas Thienemann 3e9068
#%{_bindir}/wxconsole
Andreas Thienemann 3e9068
#%{_sbindir}/wxconsole
Andreas Thienemann 3e9068
#%{_mandir}/man1/bacula-wxconsole.1*
Andreas Thienemann 3e9068
#%{_datadir}/applications/fedora-bacula-wxconsole.desktop
Andreas Thienemann 3e9068
#%{_datadir}/pixmaps/wxwin16x16.xpm
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files director-common
Andreas Thienemann b41752
%doc bacula-%{version}/updatedb/
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%config(noreplace) %{_sysconfdir}/bacula/bacula-dir.conf
Andreas Thienemann b41752
%config(noreplace) %{_sysconfdir}/bacula/query.sql
Andreas Thienemann b41752
%config %{_sysconfdir}/logwatch/conf/logfiles/bacula.conf
Andreas Thienemann b41752
%config %{_sysconfdir}/logwatch/conf/services/bacula.conf
Andreas Thienemann b41752
%{_sysconfdir}/logwatch/scripts/services/bacula
Andreas Thienemann b41752
%{_initrddir}/bacula-dir
Andreas Thienemann b41752
%{_sbindir}/bregex
Andreas Thienemann b41752
%{_sbindir}/bwild
Andreas Thienemann b41752
%{_mandir}/man8/dbcheck.8*
Andreas Thienemann b41752
%{_mandir}/man8/bacula-dir.8*
Andreas Thienemann b41752
%{_libexecdir}/bacula/delete_catalog_backup
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files director-mysql
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%{_sbindir}/bacula-dir.mysql
Andreas Thienemann b41752
%{_sbindir}/dbcheck.mysql
Andreas Thienemann b41752
%{_libexecdir}/bacula/create_mysql_database
Andreas Thienemann b41752
%{_libexecdir}/bacula/drop_mysql_database
Andreas Thienemann b41752
%{_libexecdir}/bacula/drop_mysql_tables
Andreas Thienemann b41752
%{_libexecdir}/bacula/grant_mysql_privileges
Andreas Thienemann b41752
%{_libexecdir}/bacula/make_mysql_tables
Andreas Thienemann b41752
%{_libexecdir}/bacula/update_mysql_tables
Andreas Thienemann b41752
%{_libexecdir}/bacula/create_bacula_database.mysql
Andreas Thienemann b41752
%{_libexecdir}/bacula/drop_bacula_database.mysql
Andreas Thienemann b41752
%{_libexecdir}/bacula/drop_bacula_tables.mysql
Andreas Thienemann b41752
%{_libexecdir}/bacula/grant_bacula_privileges.mysql
Andreas Thienemann b41752
%{_libexecdir}/bacula/make_bacula_tables.mysql
Andreas Thienemann b41752
%{_libexecdir}/bacula/make_catalog_backup.mysql
Andreas Thienemann b41752
%{_libexecdir}/bacula/update_bacula_tables.mysql
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files director-sqlite
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%{_sbindir}/bacula-dir.sqlite
Andreas Thienemann b41752
%{_sbindir}/dbcheck.sqlite
Andreas Thienemann b41752
# DANGER Will Robinson. Bacula has versioned sqlite filenames
Andreas Thienemann b41752
%{_libexecdir}/bacula/create_sqlite%{?sqlite_suffix}_database
Andreas Thienemann b41752
%{_libexecdir}/bacula/drop_sqlite%{?sqlite_suffix}_database
Andreas Thienemann b41752
%{_libexecdir}/bacula/drop_sqlite%{?sqlite_suffix}_tables
Andreas Thienemann b41752
%{_libexecdir}/bacula/grant_sqlite%{?sqlite_suffix}_privileges
Andreas Thienemann b41752
%{_libexecdir}/bacula/make_sqlite%{?sqlite_suffix}_tables
Andreas Thienemann b41752
%{_libexecdir}/bacula/update_sqlite%{?sqlite_suffix}_tables
Andreas Thienemann b41752
%{_libexecdir}/bacula/create_bacula_database.sqlite
Andreas Thienemann b41752
%{_libexecdir}/bacula/drop_bacula_database.sqlite
Andreas Thienemann b41752
%{_libexecdir}/bacula/drop_bacula_tables.sqlite
Andreas Thienemann b41752
%{_libexecdir}/bacula/grant_bacula_privileges.sqlite
Andreas Thienemann b41752
%{_libexecdir}/bacula/make_bacula_tables.sqlite
Andreas Thienemann b41752
%{_libexecdir}/bacula/make_catalog_backup.sqlite
Andreas Thienemann b41752
%{_libexecdir}/bacula/update_bacula_tables.sqlite
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files director-postgresql
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%{_sbindir}/bacula-dir.postgresql
Andreas Thienemann b41752
%{_sbindir}/dbcheck.postgresql
Andreas Thienemann b41752
%{_libexecdir}/bacula/create_postgresql_database
Andreas Thienemann b41752
%{_libexecdir}/bacula/drop_postgresql_database
Andreas Thienemann b41752
%{_libexecdir}/bacula/drop_postgresql_tables
Andreas Thienemann b41752
%{_libexecdir}/bacula/grant_postgresql_privileges
Andreas Thienemann b41752
%{_libexecdir}/bacula/make_postgresql_tables
Andreas Thienemann b41752
%{_libexecdir}/bacula/update_postgresql_tables
Andreas Thienemann b41752
%{_libexecdir}/bacula/create_bacula_database.postgresql
Andreas Thienemann b41752
%{_libexecdir}/bacula/drop_bacula_database.postgresql
Andreas Thienemann b41752
%{_libexecdir}/bacula/drop_bacula_tables.postgresql
Andreas Thienemann b41752
%{_libexecdir}/bacula/grant_bacula_privileges.postgresql
Andreas Thienemann b41752
%{_libexecdir}/bacula/make_bacula_tables.postgresql
Andreas Thienemann b41752
%{_libexecdir}/bacula/make_catalog_backup.postgresql
Andreas Thienemann b41752
%{_libexecdir}/bacula/update_bacula_tables.postgresql
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files storage-common
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%{_sbindir}/bacula-sd
Andreas Thienemann b41752
%{_sbindir}/bextract
Andreas Thienemann b41752
%{_sbindir}/bls
Andreas Thienemann b41752
%{_sbindir}/btape
Andreas Thienemann b41752
%config(noreplace) %{_sysconfdir}/bacula/bacula-sd.conf
Andreas Thienemann b41752
%{_initrddir}/bacula-sd
Andreas Thienemann b41752
%{_libexecdir}/bacula/disk-changer
Andreas Thienemann b41752
%{_libexecdir}/bacula/dvd-handler
Andreas Thienemann b41752
%{_libexecdir}/bacula/mtx-changer
Andreas Thienemann b41752
%{_mandir}/man8/bcopy.8*
Andreas Thienemann b41752
%{_mandir}/man8/bextract.8*
Andreas Thienemann b41752
%{_mandir}/man8/bls.8*
Andreas Thienemann b41752
%{_mandir}/man8/bscan.8*
Andreas Thienemann b41752
%{_mandir}/man8/btape.8*
Andreas Thienemann b41752
%{_mandir}/man8/bacula-sd.8*
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files storage-mysql
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%{_sbindir}/bcopy.mysql
Andreas Thienemann b41752
%{_sbindir}/bscan.mysql
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files storage-sqlite
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%{_sbindir}/bcopy.sqlite
Andreas Thienemann b41752
%{_sbindir}/bscan.sqlite
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files storage-postgresql
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%{_sbindir}/bcopy.postgresql
Andreas Thienemann b41752
%{_sbindir}/bscan.postgresql
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files traymonitor
Andreas Thienemann b41752
%defattr(-,root,root,-)
Andreas Thienemann b41752
%{_sbindir}/bacula-tray-monitor
Andreas Thienemann b41752
%config(noreplace) %{_sysconfdir}/bacula/tray-monitor.conf
Andreas Thienemann b41752
%{_mandir}/man1/bacula-tray-monitor.1*
Andreas Thienemann b41752
%{_datadir}/applications/fedora-bacula-traymonitor.desktop
Andreas Thienemann b41752
%{_datadir}/pixmaps/bacula-tray-monitor.xpm
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%files docs
Andreas Thienemann b41752
%doc bacula-docs-%{docs_version}/bacula-web/bacula-web.pdf
Andreas Thienemann b41752
%doc bacula-docs-%{docs_version}/bacula-web/bacula-web/
Andreas Thienemann b41752
%doc bacula-docs-%{docs_version}/developers/developers.pdf
Andreas Thienemann b41752
%doc bacula-docs-%{docs_version}/developers/developers/
Andreas Thienemann b41752
%doc bacula-docs-%{docs_version}/manual/bacula.pdf
Andreas Thienemann b41752
%doc bacula-docs-%{docs_version}/manual/bacula/
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
#%files web
Andreas Thienemann b41752
#%defattr(-,root,root,-)
Andreas Thienemann b41752
#%doc bacula-gui-%{gui_version}/bacula-web/CONTACT bacula-gui-%{gui_version}/bacula-web/COPYING
Andreas Thienemann b41752
#%doc bacula-gui-%{gui_version}/bacula-web/README bacula-gui-%{gui_version}/bacula-web/TODO
Andreas Thienemann b41752
#%{_datadir}/bacula-web/
Andreas Thienemann b41752
#%config(noreplace) %{_sysconfdir}/bacula/bacula-web.conf
Andreas Thienemann b41752
#%config(noreplace) %{_sysconfdir}/httpd/conf.d/bacula-web.conf
Andreas Thienemann b41752
#%dir %attr(755, apache, apache) %{_localstatedir}/cache/bacula-web
Andreas Thienemann b41752
Andreas Thienemann b41752
Andreas Thienemann b41752
%changelog
Andreas Thienemann f5b68c
* Wed Jul 25 2007 Andreas Thienemann <andreas@bawue.net> 2.0.3-9
Andreas Thienemann f5b68c
- Corrected the %%post alternatives calls. Fixing #249560.
Andreas Thienemann f5b68c
Andreas Thienemann b41752
* Wed Jul 19 2007 Andreas Thienemann <andreas@bawue.net> 2.0.3-8
Andreas Thienemann b41752
- Moved some files around in the %%files section and refactored
Andreas Thienemann b41752
  spec parts a bit
Andreas Thienemann b41752
- Fixed up the catalog-backup scripts by including them in the
Andreas Thienemann b41752
  alternatives system
Andreas Thienemann b41752
- Applied tls patch fixing some tls disconnection issues.
Andreas Thienemann b41752
Andreas Thienemann b41752
* Thu Jul 18 2007 Andreas Thienemann <andreas@bawue.net> 2.0.3-7
Andreas Thienemann b41752
- Minor specchanges, mostly typos in the comments
Andreas Thienemann b41752
- Incorporated minor changes from dgilmore's review.
Andreas Thienemann b41752
Andreas Thienemann b41752
* Fri Jul 13 2007 Andreas Thienemann <andreas@bawue.net> 2.0.3-6
Andreas Thienemann b41752
- Fixing %%preun scripts. Thx to Dan for spotting this
Andreas Thienemann b41752
Andreas Thienemann b41752
* Fri Jul 13 2007 Andreas Thienemann <andreas@bawue.net> 2.0.3-5
Andreas Thienemann b41752
- Fixed provides and requires
Andreas Thienemann b41752
Andreas Thienemann b41752
* Wed Jul 11 2007 Andreas Thienemann <andreas@bawue.net> 2.0.3-4
Andreas Thienemann b41752
- Fixed many rpmlint issues
Andreas Thienemann b41752
Andreas Thienemann b41752
* Thu Apr 26 2007 Andreas Thienemann <andreas@bawue.net> 2.0.3-3
Andreas Thienemann b41752
- Final cleanups for fedora
Andreas Thienemann b41752
- Removed webgui for now. It will be back in a future release
Andreas Thienemann b41752
- Added LANG=C calls to the initscripts
Andreas Thienemann b41752
Andreas Thienemann b41752
* Thu Apr 26 2007 Andreas Thienemann <andreas@bawue.net> 2.0.3-2
Andreas Thienemann b41752
- Added logdir
Andreas Thienemann b41752
- Fixed up doc-creation to actually work
Andreas Thienemann b41752
- Fixed up web interface
Andreas Thienemann b41752
- Included docs sub-package
Andreas Thienemann b41752
- Included README et al as docs where appropriate
Andreas Thienemann b41752
Andreas Thienemann b41752
* Sat Mar 10 2007 Andreas Thienemann <andreas@bawue.net> 2.0.3-1
Andreas Thienemann b41752
- Updated to 2.0.3
Andreas Thienemann b41752
- Reverted the database-check as we're not sure the db is running on the
Andreas Thienemann b41752
  local machine. A later revision might parse the bacula-dir.conf file
Andreas Thienemann b41752
  and just connect to the db to see if it's running.
Andreas Thienemann b41752
Andreas Thienemann b41752
* Sat Feb 28 2007 Andreas Thienemann <andreas@bawue.net> 2.0.2-1
Andreas Thienemann b41752
- Further updates on the spec
Andreas Thienemann b41752
Andreas Thienemann b41752
* Sat Feb 18 2007 Andreas Thienemann <andreas@bawue.net> 2.0.2-1
Andreas Thienemann b41752
- Much work on the spec
Andreas Thienemann b41752
- Updated to 2.0.2
Andreas Thienemann b41752
Andreas Thienemann b41752
* Sat Feb 18 2006 Andreas Thienemann <andreas@bawue.net> 1.38.11-1
Andreas Thienemann b41752
- Initial spec.