File rsync-backup.spec of Package rsync-backupscript

#
# spec file for package rsync-backupscript
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

Name:           rsync-backup
Summary:        Backup your servers via rsync
Version:        0.5
Release:        1
License:        BSD 4-Clause
Group:          Productivity/Archiving/Backup
Source1:        rsync_backup.pl
Source2:        %name.example
Source3:        rsync-backup.logrotate
Source4:        %name-README.SuSE
PreReq:         %fillup_prereq
Requires:       perl(File::Rsync)
Requires:       perl(File::Path)
Requires:       perl(Config::Simple)
Requires:       perl(Getopt::Std)
Requires:       logrotate
Requires:       rsync
Requires:       cron
Requires:       mailx
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-build

%description
This package contains a configurable script for backups of machines.

Please have a look at the README.SuSE for details about the usage.


%prep
## %setup -q -T -c %name -a1 -a2

%build
#

%install
install -Dm755 %{SOURCE1} %buildroot/%{_bindir}/%name
install -Dm644 %{SOURCE3} %buildroot/%{_sysconfdir}/logrotate.d/%name
install -Dm644 %{SOURCE2} %buildroot/%{_sysconfdir}/%name/conf.d/example.conf.in
install -Dm644 %{SOURCE4} %buildroot/%{_defaultdocdir}/%{name}/README.SuSE
mkdir -p %{buildroot}/var/log/%name

%clean
rm -rf %buildroot

%files
%defattr(-, root, root)
%doc %{_defaultdocdir}/%{name}
%{_bindir}/%name
%dir %{_sysconfdir}/%name
%dir %{_sysconfdir}/%name/conf.d
%config %{_sysconfdir}/%name/conf.d/example.conf.in
%config(noreplace) %{_sysconfdir}/logrotate.d/%name
%dir /var/log/%name

%changelog
openSUSE Build Service is sponsored by