Simplify variables a bit
This commit is contained in:
parent
16f7f59992
commit
99562fb041
70
ldns.spec
70
ldns.spec
@ -1,9 +1,10 @@
|
||||
%global _hardened_build 1
|
||||
%{?!with_python: %global with_python 1}
|
||||
%{?!with_perl: %global with_perl 1}
|
||||
%{?!with_ecdsa: %global with_ecdsa 1}
|
||||
%{?!with_ecdsa: %global with_ecdsa 1}
|
||||
# GOST is not allowed in Fedora/RHEL due to legal reasons (not NIST ECC)
|
||||
%{?!with_gost: %global with_gost 0}
|
||||
%{?!disable_dane: %global disable_dane 0}
|
||||
|
||||
%if %{with_python}
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
@ -42,7 +43,11 @@ Group: System Environment/Libraries
|
||||
# BuildRequires: automake
|
||||
|
||||
BuildRequires: libpcap-devel
|
||||
%if %{disable_dane}
|
||||
BuildRequires: openssl-devel >= 1.0.2k
|
||||
%else
|
||||
BuildRequires: openssl-devel >= 1.1.0
|
||||
%endif
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: doxygen
|
||||
|
||||
@ -132,62 +137,45 @@ CFLAGS="%{optflags} -fPIC"
|
||||
CXXFLAGS="%{optflags} -fPIC"
|
||||
LDFLAGS="-Wl,-z,relro,-z,now -pie"
|
||||
export CFLAGS CXXFLAGS LDFLAGS
|
||||
%configure \
|
||||
--disable-rpath \
|
||||
--disable-static \
|
||||
|
||||
|
||||
%if %{with_gost}
|
||||
--enable-gost \
|
||||
%global enable_gost --enable-gost
|
||||
%else
|
||||
--disable-gost \
|
||||
%global enable_gost --disable-gost
|
||||
%endif
|
||||
|
||||
%if %{with_ecdsa}
|
||||
--enable-ecdsa \
|
||||
%global enable_ecdsa --enable-ecdsa
|
||||
%else
|
||||
--disable-ecdsa \
|
||||
%global enable_ecdsa --disable-ecdsa
|
||||
%endif
|
||||
|
||||
%global common_args \\\
|
||||
--disable-rpath \\\
|
||||
%{enable_gost} %{enable_ecdsa} \\\
|
||||
--with-ca-file=/etc/pki/tls/certs/ca-bundle.trust.crt \\\
|
||||
--with-ca-path=/etc/pki/tls/certs/ \\\
|
||||
--with-trust-anchor=%{_sharedstatedir}/unbound/root.key
|
||||
|
||||
%configure \
|
||||
%{common_args} \
|
||||
--disable-static \
|
||||
%if %{with_python}
|
||||
--with-pyldns \
|
||||
%endif
|
||||
--with-ca-file=/etc/pki/tls/certs/ca-bundle.trust.crt \
|
||||
--with-ca-path=/etc/pki/tls/certs/ \
|
||||
--with-trust-anchor=%{_sharedstatedir}/unbound/root.key \
|
||||
--enable-rrtype-cds --enable-rrtype-uri \
|
||||
%if %{disable_dane}
|
||||
--disable-dane-ta-usage \
|
||||
%endif
|
||||
|
||||
|
||||
pushd drill
|
||||
%configure \
|
||||
--disable-rpath \
|
||||
%if %{with_gost}
|
||||
--enable-gost \
|
||||
%else
|
||||
--disable-gost \
|
||||
%endif
|
||||
%if %{with_ecdsa}
|
||||
--enable-ecdsa \
|
||||
%else
|
||||
--disable-ecdsa \
|
||||
%endif
|
||||
--with-ca-file=/etc/pki/tls/certs/ca-bundle.trust.crt \
|
||||
--with-ca-path=/etc/pki/tls/certs/ \
|
||||
--with-trust-anchor=%{_sharedstatedir}/unbound/root.key
|
||||
%configure %{common_args}
|
||||
popd
|
||||
|
||||
pushd examples
|
||||
%configure \
|
||||
--disable-rpath \
|
||||
%if %{with_gost}
|
||||
--enable-gost \
|
||||
%else
|
||||
--disable-gost \
|
||||
%endif
|
||||
%if %{with_ecdsa}
|
||||
--enable-ecdsa \
|
||||
%else
|
||||
--disable-ecdsa \
|
||||
%endif
|
||||
--with-ca-file=/etc/pki/tls/certs/ca-bundle.trust.crt \
|
||||
--with-ca-path=/etc/pki/tls/certs/ \
|
||||
--with-trust-anchor=%{_sharedstatedir}/unbound/root.key
|
||||
%configure %{common_args}
|
||||
popd
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user