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