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