Avoid lzip dependency in RHEL builds
lzip is unwanted in RHEL, but bsdtar (from libarchive) can decompress .tar.lz itself. The only complication is that we have to bypass %__rpmuncompress and handle the decompression in %setup. However, this avoids the need for the maintainer to manually repack the sources.
This commit is contained in:
parent
f92594d287
commit
fb0c9752ce
10
ed.spec
10
ed.spec
@ -12,7 +12,11 @@ Source2: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8FE99503132D774
|
|||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
|
%if 0%{?rhel}
|
||||||
|
BuildRequires: bsdtar
|
||||||
|
%else
|
||||||
BuildRequires: lzip
|
BuildRequires: lzip
|
||||||
|
%endif
|
||||||
# for gpg verification
|
# for gpg verification
|
||||||
BuildRequires: gnupg2
|
BuildRequires: gnupg2
|
||||||
|
|
||||||
@ -24,7 +28,13 @@ replaced in normal usage by full-screen editors (emacs and vi, for example).
|
|||||||
%prep
|
%prep
|
||||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||||
|
|
||||||
|
%if 0%{?rhel}
|
||||||
|
# no lzip in RHEL; bsdtar can handle it but not from within %%setup.
|
||||||
|
%setup -q -c -T
|
||||||
|
bsdtar -xf %{SOURCE0} -C %{_builddir}
|
||||||
|
%else
|
||||||
%autosetup
|
%autosetup
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%set_build_flags
|
%set_build_flags
|
||||||
|
Loading…
Reference in New Issue
Block a user