Drop EPEL conditionals from Fedora branches

This commit is contained in:
Benjamin A. Beasley 2022-09-28 11:54:40 -04:00
commit 6729dfb4a3

View file

@ -36,23 +36,10 @@ BuildRequires: dos2unix
# System library supported by upstream
BuildRequires: zlib-devel
%if 0%{?el7}
# No libdeflate package in EPEL7
Provides: bundled(libdeflate) = 0.6
%else
# Unbundled downstream
BuildRequires: pkgconfig(libdeflate)
%endif
%if 0%{?el9} || 0%{?el8} || 0%{?el7}
# No libzopfli/zopfli-devel in these distributions
# Version number based on HISTORY, which mentions that upstream commit
# 6818a0859063b946094fb6f94732836404a0d89a was used from
# https://github.com/google/zopfli/.
Provides: bundled(zopfli) = 1.0.2%{?!el7:^20160527git6818a08}
%else
BuildRequires: zopfli-devel
%endif
# From 7z/README:
#
@ -91,7 +78,6 @@ This package contains:
%autosetup -p1
dos2unix -k doc/*.txt
%if ! 0%{?el7}
# Patch out bundled libdeflate
rm -rvf libdeflate
sed -r -i '/libdeflate[\/_]/d' Makefile.am
@ -101,9 +87,7 @@ find . -type f -exec gawk \
'/^[[:blank:]]*#include.*libdeflate/ { print FILENAME; nextfile }' \
'{}' '+' |
xargs -r -t sed -r -i 's@^([[:blank:]]*#include.*)libdeflate/@\1@'
%endif
%if !(0%{?el9} || 0%{?el8} || 0%{?el7})
# Patch out bundled zopfli
rm -rvf zopfli
sed -r -i \
@ -116,24 +100,19 @@ find . -type f -exec gawk \
'/^[[:blank:]]*#include.*zopfli/ { print FILENAME; nextfile }' \
'{}' '+' |
xargs -r -t sed -r -i -e 's@^([[:blank:]]*#include.*)zopfli/@\1@'
%endif
%build
%set_build_flags
autoreconf --force --install --verbose
%if ! 0%{?el7}
# Link against system libdeflate
export CFLAGS="$(pkgconf --cflags libdeflate) ${CFLAGS-}"
export CXXFLAGS="$(pkgconf --cflags libdeflate) ${CXXFLAGS-}"
export LDFLAGS="$(pkgconf --libs libdeflate) ${LDFLAGS-}"
%endif
%if !(0%{?el9} || 0%{?el8} || 0%{?el7})
# Link against system zopfli
export LDFLAGS="-lzopfli ${LDFLAGS-}"
%endif
%configure
%make_build