diff --git a/freerdp.spec b/freerdp.spec index dab9387..83e8456 100644 --- a/freerdp.spec +++ b/freerdp.spec @@ -14,6 +14,12 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=1639165 %{!?rhel:%global _with_server 1} +# Disable support for missing codecs in RHEL +%{!?rhel:%global _with_soxr 1} +%if 0%{?fedora} || 0%{?rhel} >= 8 +%global _with_lame 1 +%endif + Name: freerdp Version: 2.1.1 Release: 1%{?dist} @@ -30,7 +36,7 @@ BuildRequires: alsa-lib-devel BuildRequires: cmake >= 2.8 BuildRequires: cups-devel BuildRequires: gsm-devel -BuildRequires: lame-devel +%{?_with_lame:BuildRequires: lame-devel} BuildRequires: libicu-devel BuildRequires: libjpeg-turbo-devel BuildRequires: libX11-devel @@ -67,7 +73,7 @@ BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(libusb-1.0) BuildRequires: pkgconfig(openssl) -BuildRequires: pkgconfig(soxr) +%{?_with_soxr:BuildRequires: pkgconfig(soxr)} BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-scanner) BuildRequires: pkgconfig(xkbcommon) @@ -165,7 +171,7 @@ find . -name "*.c" -exec chmod 664 {} \; -DWITH_ICU=ON \ -DWITH_IPP=OFF \ -DWITH_JPEG=ON \ - -DWITH_LAME=ON \ + -DWITH_LAME=%{?_with_lame:ON}%{?!_with_lame:OFF} \ -DWITH_MANPAGES=ON \ -DWITH_OPENH264=%{?_with_openh264:ON}%{?!_with_openh264:OFF} \ -DWITH_OPENSSL=ON \ @@ -175,7 +181,7 @@ find . -name "*.c" -exec chmod 664 {} \; -DWITH_SERVER_INTERFACE=%{?_with_server:ON}%{?!_with_server:OFF} \ -DWITH_SHADOW_X11=%{?_with_server:ON}%{?!_with_server:OFF} \ -DWITH_SHADOW_MAC=%{?_with_server:ON}%{?!_with_server:OFF} \ - -DWITH_SOXR=ON \ + -DWITH_SOXR=%{?_with_soxr:ON}%{?!_with_soxr:OFF} \ -DWITH_WAYLAND=ON \ -DWITH_X11=ON \ -DWITH_X264=%{?_with_x264:ON}%{?!_with_x264:OFF} \