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