File ddrescue.spec of Package ddrescue

#
# spec file for package ddrescue (Version 1.14_0.0.6)
#
# Copyright (c) 2010 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 http://bugs.opensuse.org/
#

# norootforbuild


Name:           ddrescue
%define	ddrescuever 1.14
%define ddrhelpver 0.0.6		
Version:        1.14_0.0.6
Release:        76
License:        GPLv2+
Group:          System/Base
Provides:       dd_rescue
AutoReqProv:    on
Requires:       bc
Summary:        Data Copying in the Presence of I/O Errors
Source:         http://www.garloff.de/kurt/linux/ddrescue/dd_rescue-%{ddrescuever}.tar.gz
Source1:        dd_rhelp-%{ddrhelpver}.tar.gz
#Patch:		dd_rescue-%{version}.diff
Patch2:         dd_rhelp_src.diff
Patch3:         ddresc-112.diff
Patch4:         ddrescue-fsync.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
dd_rescue helps when nothing else can: your disk has crashed and you
try to copy it over to another one. While standard Unix tools like cp,
cat, and dd wail "abort" on every I/O error, dd_rescue does not.



Authors:
--------
    Kurt Garloff <garloff@suse.de>

%prep
%setup -n dd_rescue -b1
#%patch -p1
%patch -P 4 -p1
cd ../dd_rhelp-%{ddrhelpver}
%patch2 -p1
%patch3 -p1
autoreconf
./configure
for name in FAQ NEWS README THANKS TODO; do
	cp -p $name ${name}.dd_rhelp
done

%build
make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
cd ../dd_rhelp-%{ddrhelpver}
make %{?_smp_mflags}

%install
make install DESTDIR=$RPM_BUILD_ROOT INSTASROOT= INSTALLFLAGS=
cd ../dd_rhelp-%{ddrhelpver}
make install DESTDIR=$RPM_BUILD_ROOT bindir=/bin

%files
%defattr(-,root,root)
/bin/dd_rescue
/bin/dd_rhelp
%doc README.dd_rescue
%doc ../dd_rhelp-%{ddrhelpver}/*.dd_rhelp
%doc ../dd_rhelp-%{ddrhelpver}/doc

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/dd_rescue

%changelog
openSUSE Build Service is sponsored by