be325b7
Name:           backup-manager
be325b7
Version:        0.7.7
be325b7
Release:        7%{?dist}
be325b7
Summary:        A command line backup tool for GNU/Linux
be325b7
be325b7
Group:          Applications/System
be325b7
License:        GPLv2+
be325b7
URL:            http://www.backup-manager.org
be325b7
Source0:        http://www.backup-manager.org/download/%{name}-%{version}.tar.gz
be325b7
Source1:        %{name}.cron.daily
be325b7
Patch0:         %{name}-%{version}-configtpl.patch
be325b7
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
be325b7
BuildArch:      noarch
be325b7
be325b7
BuildRequires:  gettext 
be325b7
BuildRequires:  perl
be325b7
be325b7
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
be325b7
Requires:       /bin/bash
be325b7
Requires:       /usr/bin/cdrecord
be325b7
Requires:       /usr/bin/logger
be325b7
Requires:       /usr/bin/mkisofs
be325b7
Requires:       bc
be325b7
Requires:       bzip2
be325b7
Requires:       coreutils
be325b7
Requires:       diffutils
be325b7
Requires:       dvd+rw-tools
be325b7
Requires:       less
be325b7
Requires:       ftp
be325b7
Requires:       genisoimage
be325b7
Requires:       gettext
be325b7
Requires:       gnupg
be325b7
Requires:       gzip
be325b7
Requires:       openssh-clients
be325b7
Requires:       rsync
be325b7
Requires:       sed
be325b7
Requires:       tar
be325b7
Requires:       which
be325b7
be325b7
be325b7
be325b7
%description
be325b7
Backup Manager is a command line backup tool for GNU/Linux, designed to help
be325b7
you make daily archives of your file system. Written in bash and perl, it can
be325b7
make archives in lots of open formats (tar, gzip, bzip2, lzma, dar, zip) and
be325b7
provides lots of interesting features (such as network exports or CD/DVD
be325b7
automated-burning).
be325b7
be325b7
The program is designed to be as easy to use as possible and is popular with
be325b7
desktop users and sysadmins. The whole backup process is defined in one
be325b7
full-documented configuration file which needs no more than 5 minutes to tune
be325b7
for your needs.
be325b7
be325b7
be325b7
be325b7
%prep
be325b7
%setup -q
be325b7
%patch0 -p1 -b .configtpl
be325b7
be325b7
# Clean Makefile
be325b7
sed -i -e "s@install --owner=root --group=root @install @" Makefile
be325b7
be325b7
# Replace #!/bin/sh by #!/bin/bash 
be325b7
for file in t/*.sh; do sed -i -e "s@#!/bin/sh@#!/bin/bash@" "$file"; done
be325b7
for file in doc/*; do sed -i -e "s@#!/bin/sh@#!/bin/bash@" "$file"; done
be325b7
be325b7
# rpmlint : Convert to utf-8
be325b7
for file in AUTHORS ChangeLog COPYING NEWS README THANKS; do
be325b7
    mv $file timestamp
be325b7
    iconv -f ISO-8859-1 -t UTF-8 -o $file timestamp
be325b7
    touch -r timestamp $file
be325b7
done
be325b7
be325b7
be325b7
be325b7
%build
be325b7
make %{?_smp_mflags}
be325b7
be325b7
be325b7
be325b7
%install
be325b7
rm -rf %{buildroot}
be325b7
make install DESTDIR=%{buildroot} \
be325b7
             PERL5DIR=%{buildroot}%{perl_vendorlib}
be325b7
             INSTALL="install -p" 
be325b7
%find_lang %{name}
be325b7
be325b7
# Create backup directory
be325b7
install -d %{buildroot}%{_localstatedir}/%{name}
be325b7
be325b7
# Copy configuration
be325b7
install -p -D -m 0644 %{buildroot}%{_datadir}/%{name}/%{name}.conf.tpl \
be325b7
                   %{buildroot}%{_sysconfdir}/%{name}.conf
be325b7
be325b7
# Add cron.daily                
be325b7
install -p -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/cron.daily/%{name}.cron
be325b7
be325b7
# rpmlint : sanitize.sh is a non-executable-script
be325b7
chmod 755 %{buildroot}%{_datadir}/%{name}/sanitize.sh
be325b7
be325b7
be325b7
be325b7
%clean
be325b7
rm -rf %{buildroot}
be325b7
be325b7
be325b7
be325b7
%files -f %{name}.lang
be325b7
%defattr(-,root,root,-)
be325b7
%doc AUTHORS COPYING ChangeLog NEWS README THANKS
be325b7
%{_bindir}/%{name}-purge
be325b7
%{_bindir}/%{name}-upload
be325b7
%{_sbindir}/%{name}
be325b7
%{perl_vendorlib}/BackupManager
be325b7
%{_datadir}/%{name}
be325b7
%{_mandir}/man8/%{name}*
be325b7
%config(noreplace) %{_sysconfdir}/%{name}.conf
be325b7
%{_sysconfdir}/cron.daily/%{name}.cron
be325b7
%{_localstatedir}/%{name}
be325b7
be325b7
be325b7
be325b7
%changelog
be325b7
* Thu Jan 15 2009 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 0.7.7-7
be325b7
- Replace some sed by a patch
be325b7
- Replace /bin/sh by /bin/bash 
be325b7
be325b7
* Wed Jan 13 2009 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 0.7.7-6
be325b7
- Fix Requires
be325b7
- Fix use %%{_localstatedir} insted %%{_var}/lib
be325b7
be325b7
* Sun Jan 10 2009 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 0.7.7-5
be325b7
- Fix Requires
be325b7
- Add  %%{_var}/lib/backup-manager directory
be325b7
- Use %%{buildroot} insted $RPM_BUILD_ROOT
be325b7
be325b7
* Sun Jan 10 2009 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 0.7.7-4
be325b7
- Fix license
be325b7
- Fix timestamp in install
be325b7
be325b7
* Fri Oct 10 2008 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 0.7.7-3
be325b7
- Add a daily cron (backup-manager.cron.daily)
be325b7
be325b7
* Wed Aug 20 2008 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 0.7.7-2
be325b7
- utf-8 correction with Iconv
be325b7
- Configuration file correction
be325b7
be325b7
* Sun Aug 17 2008 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 0.7.7-1
be325b7
- Initial packaging