File storeBackup.spec of Package storeBackup

# spec file for package storeBackup
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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.

# Please submit bugfixes or comments via

Name:           storeBackup
Version:        3.5
Release:        0
Summary:        A disk-to-disk backup tool for Linux
License:        GPL-3.0+
Group:          Productivity/Archiving/Backup
Source0:        storeBackup-%{version}.tar.bz2
Source1:        storeBackup-%{version}.config.default
Source2:        storeBackup-README.SUSE
Patch0:         storeBackup-%{version}.diff
# PATCH-FIX-UPSTREAM earlier_execute_precommand.patch
Patch1:		earlier_execute_precommand.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Requires:       bzip2
Requires:       e2fsprogs
Requires:       fileutils
Requires:       sh-utils
Requires:       textutils
Recommends:     cron

storeBackup is a disk-to-disk backup tool for Linux. It should run on
other Unix like machines. You can directly browse through the backuped
files (locally, via NFS, via SAMBA or whatever). This gives the users
the possibility to restore files absolutely easily and fast. He/She
only has to copy (and possibly uncompress) the file. The is also a
tool for easily restoring (sub) trees for the administrator. Every
single backup of a specific time can be deleted without affecting the
other existing backups.

Before you can start using storeBackup, please carefully read
and create an appropriate configuration file
as a template.

%prep -n storeBackup
%setup -n storeBackup
%patch0 -p 1
%patch1 -p 0

# make

install		-d	${RPM_BUILD_ROOT}					\
			${RPM_BUILD_ROOT}/usr/lib/storeBackup/			\
			${RPM_BUILD_ROOT}/usr/bin/				\
			${RPM_BUILD_ROOT}/usr/share/doc/packages/storeBackup/	\
			${RPM_BUILD_ROOT}/etc/cron.daily/			\
			${RPM_BUILD_ROOT}/etc/storebackup.d/			\
cp -a %{S:1}								./doc/storebackup.config.default
cp -a %{S:2}								./doc/README.SUSE
cp -a _ATTENTION_						./doc/
cp -aRpv bin/ lib/							${RPM_BUILD_ROOT}/usr/lib/storeBackup/
cp -a cron-storebackup							${RPM_BUILD_ROOT}/etc/cron.daily/storebackup
ln -sf /usr/lib/storeBackup/bin/				${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/				${RPM_BUILD_ROOT}/usr/bin/storeBackup
ln -sf /usr/lib/storeBackup/bin/		${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/		${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/		${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/			${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/	${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/			${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/			${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/		${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/			${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/		${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/		${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/			${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/			${RPM_BUILD_ROOT}/usr/bin/
ln -sf /usr/lib/storeBackup/bin/			${RPM_BUILD_ROOT}/usr/bin/
install -m 644 man/man1/*.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1
ln -sf $RPM_BUILD_ROOT%{_mandir}/man1/storeBackup.1

%doc doc/*
%doc %{_mandir}/man1/*.1.gz
# ChangeLog LICENSE README.1ST _ATTENTION_ README storebackup.config.default README.SUSE
%dir /etc/storebackup.d/
# %attr(755, root, root) %config(noreplace) /etc/storebackup.d/storebackup.config
%attr(755, root, root) /usr/bin/*
%attr(755, root, root) /etc/cron.daily/storebackup