[ddrescue] Unpack original source in %prep.

Susi Lehtola jussilehtola at fedoraproject.org
Thu Sep 5 18:54:24 UTC 2013


commit f2c21fe03b738c8d406cb6ccc250691efea67439
Author: Susi Lehtola <jussilehtola at fedoraproject.org>
Date:   Thu Sep 5 21:54:13 2013 +0300

    Unpack original source in %prep.

 .gitignore    |    1 +
 ddrescue.spec |   13 ++++++++-----
 sources       |    2 +-
 3 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index db78a96..f21ec2f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ ddrescue-1.8.tar.bz2
 /ddrescue-1.16.tar.gz
 /ddrescue-1.16.tar.gz.sig
 /ddrescue-1.17.tar.xz
+/ddrescue-1.17.tar.lz
diff --git a/ddrescue.spec b/ddrescue.spec
index 3afab56..becb1c9 100644
--- a/ddrescue.spec
+++ b/ddrescue.spec
@@ -5,10 +5,7 @@ Summary:        Data recovery tool trying hard to rescue data in case of read er
 Group:          Applications/System
 License:        GPLv3+
 URL:            http://www.gnu.org/software/ddrescue/ddrescue.html
-# rpmbuild doesn't support lzip format
-#Source0:        http://ftp.gnu.org/gnu/ddrescue/ddrescue-%{version}.tar.lz
-# so the file has ben decompressed and recompressed to xz
-Source0:        ddrescue-%{version}.tar.xz
+Source0:        http://ftp.gnu.org/gnu/ddrescue/ddrescue-%{version}.tar.lz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:   lzip
@@ -23,7 +20,13 @@ asked to. So, every time you run it on the same output file, it tries to
 fill in the gaps.
 
 %prep
-%setup -q
+# rpmbuild doesn't support lzip format
+#setup -q
+%setup -q -T -c
+cd ..
+lzip -d -c %{SOURCE0} > ddrescue-%{version}.tar
+tar xf ddrescue-%{version}.tar
+rm ddrescue-%{version}.tar
 
 %build
 # not a real autotools configure script, flags need to be passed specially
diff --git a/sources b/sources
index b9ccf6c..74b8030 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-85e78137d41eac42358cb513fa718efc  ddrescue-1.17.tar.xz
+564469370fe70cd9ac280b15e1addc50  ddrescue-1.17.tar.lz


More information about the scm-commits mailing list