From: Scott Barninger Date: Sat, 6 May 2006 17:48:50 +0000 (+0000) Subject: Add spec file for package. X-Git-Tag: Release-2.0.0~878 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b28611d46b748c7c4a73528e60bbb5602753f8e9;p=bacula%2Fbacula Add spec file for package. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3005 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bacula-gui.spec.in b/gui/bacula-gui.spec.in new file mode 100644 index 0000000000..f389a39194 --- /dev/null +++ b/gui/bacula-gui.spec.in @@ -0,0 +1,173 @@ +# Bacula Image Manager RPM spec file +# Copyright (C) 2004 Kern Sibbald + +# Platform defines + +%define rhel 0 +%{?build_rhel:%define rhel 1} + +%define suse 0 +%{?build_suse:%define suse 1} + +%define mdk 0 +%{?build_mdk:%define mdk 1} + +# test for a platform definition +%if ! %{rhel} && ! %{suse} && ! %{mdk} +%{error: You must specify a platform. Please examine the spec file.} +exit 1 +%endif + +# source package names +%define web bacula-web +%define bimagemgr bimagemgr + +# set destination directories +%define cgidir /var/www/cgi-bin +%define docdir /var/www/html +%define sysconfdir /etc/bacula +%if %{suse} +%define cgidir /srv/www/cgi-bin +%define docdir /srv/www/htdocs +%endif + +# set ownership of files +%define binowner root +%define bingroup root +%define dataowner apache +%define datagroup apache +%if %{suse} +%define dataowner wwwrun +%define datagroup www +%endif + +Summary: Bacula - The Network Backup Solution +Name: bacula-gui +Version: @VERSION@ +Release: 1 +Group: System Environment/Daemons +Copyright: GPL v2 +Source0: %{web}-%{version}.tar.gz +Source1: %{bimagemgr}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-root +URL: http://www.bacula.org/ +BuildArchitectures: noarch +Vendor: The Bacula Team +Distribution: The Bacula Team +Packager: D. Scott Barninger + +%description +Bacula is a set of computer programs that permit you (or the system +administrator) to manage backup, recovery, and verification of computer +data across a network of computers of different kinds. bacula-gui is a +set of web server based tools used to manage backups. + +%package bimagemgr +Summary: Bacula - The Network Backup Solution +Group: System Environment/Daemons + +Requires: perl, perl-DBI, bacula-server, cdrecord, mkisofs +%if %{mdk} +Requires: apache +%else +Requires: httpd +%endif + +Obsoletes: bacula-bimagemgr + +%description bimagemgr +Bacula is a set of computer programs that permit you (or the system +administrator) to manage backup, recovery, and verification of computer +data across a network of computers of different kinds. bimagemgr is a +utility to manage backups made to files intended for burning to CDR +disk. bimagemgr allows you to easily see which Volumes have been written +to more recently than they have been recorded to CDR disk and record those +which have. + +%package web +Summary: Bacula - The Network Backup Solution +Group: System Environment/Daemons + +Requires: php >= 4 +%if %{mdk} +Requires: apache +%else +Requires: httpd +%endif + +%description web +Bacula is a set of computer programs that permit you (or the system +administrator) to manage backup, recovery, and verification of computer +data across a network of computers of different kinds. bacula-web is a +web server based utility to monitor your bacula server. + +%prep + +# unpack both sources inside a directory with package name and version +%setup -c %{name} -D -b 1 + +%build + +%install + +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT" + +mkdir -p $RPM_BUILD_ROOT%{cgidir} +mkdir -p $RPM_BUILD_ROOT%{docdir}/%{web} +mkdir -p $RPM_BUILD_ROOT%{sysconfdir} + +# install bimagemgr files +cp -p %{bimagemgr}-%{version}/bimagemgr.pl $RPM_BUILD_ROOT%{cgidir}/ +cp -p %{bimagemgr}-%{version}/create_cdimage_table.pl $RPM_BUILD_ROOT%{sysconfdir}/ +cp -p %{bimagemgr}-%{version}/README $RPM_BUILD_ROOT%{sysconfdir}/README.bimagemgr +cp -p %{bimagemgr}-%{version}/bimagemgr.gif $RPM_BUILD_ROOT%{docdir}/ +cp -p %{bimagemgr}-%{version}/cdrom_spins.gif $RPM_BUILD_ROOT%{docdir}/ +cp -p %{bimagemgr}-%{version}/clearpixel.gif $RPM_BUILD_ROOT%{docdir}/ +cp -p %{bimagemgr}-%{version}/temp.html $RPM_BUILD_ROOT%{docdir}/ + +chmod 755 $RPM_BUILD_ROOT%{cgidir}/bimagemgr.pl +chmod 750 $RPM_BUILD_ROOT%{sysconfdir}/create_cdimage_table.pl +chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bimagemgr +chmod 644 $RPM_BUILD_ROOT%{docdir}/*.gif +chmod 664 $RPM_BUILD_ROOT%{docdir}/temp.html + +# install bacula-web files +cp -p %{web}-%{version}/README $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web +cp -r -p %{web}-%{version}/* $RPM_BUILD_ROOT%{docdir}/%{web}/ + +chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web + +%clean +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT" + +%files bimagemgr +%defattr(-,%{binowner},%{bingroup}) +%{cgidir}/bimagemgr.pl +%{sysconfdir}/create_cdimage_table.pl +%{sysconfdir}/README.bimagemgr +%{docdir}/bimagemgr.gif +%{docdir}/cdrom_spins.gif +%{docdir}/clearpixel.gif + +%defattr(-,%{dataowner},%{datagroup}) +%{docdir}/temp.html + +%files web +%defattr(-,%{binowner},%{bingroup}) +%{sysconfdir}/README.bacula-web + +%defattr(-,%{dataowner},%{datagroup}) +%{docdir}/%{web}/* + +%changelog +* Sat May 06 2006 D. Scott Barninger +- was bimagemgr spec convert to bacula-gui spec. include bacula-web +* Thu Dec 09 2004 D. Scott Barninger +- ASSIGNMENT OF COPYRIGHT +- FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and +- assigns unto Kern Sibbald, his successors, assigns and personal representatives, +- all right, title and interest in and to the copyright in this software RPM +- spec file. D. Scott Barninger warrants good title to said copyright, that it is +- free of all liens, encumbrances or any known claims against said copyright. +* Sun Nov 14 2004 D. Scott Barninger +- initial spec file