2010-11-05 16:21:02 +00:00
|
|
|
#
|
2011-09-05 14:26:36 +00:00
|
|
|
# spec file for package dd_rescue
|
2010-11-05 16:21:02 +00:00
|
|
|
#
|
2011-09-05 14:26:36 +00:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2010-11-05 16:21:02 +00:00
|
|
|
#
|
2010-11-05 16:21:08 +00:00
|
|
|
# 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.
|
|
|
|
|
2010-11-05 16:21:02 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-10-05 12:36:13 +00:00
|
|
|
%define ddrescuever 1.24
|
2011-09-05 14:26:36 +00:00
|
|
|
%define ddrhelpver 0.1.2
|
2010-11-05 16:21:08 +00:00
|
|
|
|
2010-11-05 16:21:02 +00:00
|
|
|
Name: dd_rescue
|
2011-09-05 14:26:36 +00:00
|
|
|
Version: %{ddrescuever}_%{ddrhelpver}
|
2010-11-05 16:21:02 +00:00
|
|
|
Release: 1
|
|
|
|
Summary: Data Copying in the Presence of I/O Errors
|
2011-09-05 14:26:36 +00:00
|
|
|
|
|
|
|
License: GPL-2.0
|
|
|
|
Url: http://www.garloff.de/kurt/linux/ddrescue/
|
|
|
|
Group: System/Base
|
|
|
|
Source0: http://www.garloff.de/kurt/linux/ddrescue/%{name}-%{ddrescuever}.tar.gz
|
|
|
|
Source1: http://www.kalysto.org/pkg/dd_rhelp-%{ddrhelpver}.tar.gz
|
|
|
|
# PATCH-FIX-OPENSUSE ddresc-112.diff garloff@suse.de -- Use -y0 if ddrescue is 1.12 or newer
|
|
|
|
Patch0: ddresc-112.diff
|
|
|
|
# PATCH-FIX-OPENSUSE dd_rhelp_EOF.diff garloff@suse.de -- Adjust dd_rhelp to changes in dd_rescue
|
|
|
|
Patch1: dd_rhelp_EOF.diff
|
|
|
|
# PATCH-FIX-OPENSUSE dd_rhelp_Summary.diff garloff@suse.de -- dd_rhelp adjusted for Summary change
|
|
|
|
Patch2: dd_rhelp_Summary.diff
|
2011-10-05 12:36:13 +00:00
|
|
|
# PATCH-FIX-OPENSUSE dd_rhelp.test.diff garloff@suse.de -- Fix dd_rhelp.test script (basic regression test)
|
|
|
|
Patch3: dd_rhelp.test.diff
|
2010-11-05 16:21:02 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
2011-10-05 12:36:13 +00:00
|
|
|
BuildRequires: libfallocate-devel-static bc
|
2011-09-05 14:26:36 +00:00
|
|
|
Requires: bc
|
|
|
|
Provides: ddrescue = %{ddrescuever}
|
|
|
|
Obsoletes: ddrescue < %{ddrescuever}
|
|
|
|
|
2010-11-05 16:21:02 +00:00
|
|
|
%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.
|
|
|
|
|
|
|
|
%prep
|
2011-09-05 14:26:36 +00:00
|
|
|
%setup -q -n dd_rescue -a1
|
|
|
|
cd dd_rhelp-%{ddrhelpver}
|
|
|
|
%patch0
|
2011-10-05 12:36:13 +00:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
2011-09-05 14:26:36 +00:00
|
|
|
for name in AUTHORS COPYING ChangeLog FAQ NEWS README THANKS TODO; do
|
|
|
|
cp -p $name ${name}.dd_rhelp
|
2010-11-05 16:21:02 +00:00
|
|
|
done
|
2011-09-05 14:26:36 +00:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
# Remove build time references so build-compare can do its work
|
|
|
|
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
|
|
|
|
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
|
|
|
|
sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/g" dd_rescue.c
|
|
|
|
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/g" dd_rescue.c
|
2010-11-05 16:21:08 +00:00
|
|
|
|
2010-11-05 16:21:02 +00:00
|
|
|
%build
|
2011-09-05 14:26:36 +00:00
|
|
|
make RPM_OPT_FLAGS="%{optflags}" libfalloc-static LIBDIR=%{_libdir} %{?_smp_mflags}
|
2010-11-05 16:21:02 +00:00
|
|
|
|
|
|
|
%install
|
2012-02-08 16:35:06 +00:00
|
|
|
make install DESTDIR=%{buildroot} INSTALLDIR=%{buildroot}/%{_bindir} \
|
|
|
|
INSTASROOT= INSTALLFLAGS=
|
2011-09-05 14:26:36 +00:00
|
|
|
cd dd_rhelp-%{ddrhelpver}
|
2012-02-08 16:35:06 +00:00
|
|
|
install -Dpm 0755 dd_rhelp %{buildroot}/%{_bindir}
|
|
|
|
#UsrMerge
|
|
|
|
mkdir %{buildroot}/bin
|
|
|
|
ln -sf %{_bindir}/dd_rescue %{buildroot}/bin
|
|
|
|
ln -sf %{_bindir}/dd_rhelp %{buildroot}/bin
|
|
|
|
#EndUsrMerge
|
2011-09-05 14:26:36 +00:00
|
|
|
cd ..
|
|
|
|
|
2011-10-05 12:36:13 +00:00
|
|
|
%check
|
|
|
|
cd dd_rhelp-%{ddrhelpver}
|
|
|
|
export PATH=..:$PATH
|
|
|
|
./dd_rhelp.test
|
|
|
|
cd ..
|
|
|
|
|
2010-11-05 16:21:02 +00:00
|
|
|
%files
|
2011-09-05 14:26:36 +00:00
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc COPYING README.dd_rescue
|
|
|
|
%doc dd_rhelp-%{ddrhelpver}/*.dd_rhelp
|
|
|
|
%doc dd_rhelp-%{ddrhelpver}/doc
|
2012-02-08 16:35:06 +00:00
|
|
|
%{_bindir}/dd_rescue
|
|
|
|
%{_bindir}/dd_rhelp
|
|
|
|
#UsrMerge
|
2010-11-05 16:21:02 +00:00
|
|
|
/bin/dd_rescue
|
|
|
|
/bin/dd_rhelp
|
2012-02-08 16:35:06 +00:00
|
|
|
#EndUsrMerge
|
2010-11-05 16:21:02 +00:00
|
|
|
|
|
|
|
%changelog
|