Set configure options from globals
This commit is contained in:
parent
7555571a0e
commit
3a133e5ad0
@ -24,10 +24,34 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
# Hash methods and API supported by libcrypt.
|
||||||
|
# NEVER EVER touch this, if you do NOT know what you are doing!
|
||||||
|
%if %{with new_api}
|
||||||
|
%global hash_methods glibc,strong
|
||||||
|
%global obsolete_api no
|
||||||
|
%global compat_methods glibc
|
||||||
|
%global compat_api glibc
|
||||||
|
%else
|
||||||
|
%global hash_methods all
|
||||||
|
%global obsolete_api glibc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
# Needed for out-of-tree builds.
|
# Needed for out-of-tree builds.
|
||||||
%global _configure ../configure
|
%global _configure ../configure
|
||||||
|
|
||||||
|
|
||||||
|
# Common configure options.
|
||||||
|
%global common_configure_options \\\
|
||||||
|
--libdir=/%{_lib} \\\
|
||||||
|
--disable-silent-rules \\\
|
||||||
|
--enable-shared \\\
|
||||||
|
--enable-static \\\
|
||||||
|
--disable-failure-tokens \\\
|
||||||
|
--srcdir=.. \\\
|
||||||
|
--with-pkgconfigdir=%{_libdir}/pkgconfig
|
||||||
|
|
||||||
|
|
||||||
# Add generation of HMAC checksums of the final stripped
|
# Add generation of HMAC checksums of the final stripped
|
||||||
# binaries. %%define with lazy globbing is used here
|
# binaries. %%define with lazy globbing is used here
|
||||||
# intentionally, because using %%global does not work.
|
# intentionally, because using %%global does not work.
|
||||||
@ -179,33 +203,21 @@ discouraged.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
pushd %{_vpath_builddir}
|
pushd %{_vpath_builddir}
|
||||||
|
%configure \
|
||||||
|
%{common_configure_options} \
|
||||||
|
--enable-hashes=%{hash_methods} \
|
||||||
|
--enable-obsolete-api=%{obsolete_api}
|
||||||
|
%make_build
|
||||||
|
popd
|
||||||
%if %{with new_api}
|
%if %{with new_api}
|
||||||
%configure \
|
|
||||||
--libdir=/%{_lib} \
|
|
||||||
--disable-silent-rules \
|
|
||||||
--enable-shared \
|
|
||||||
--enable-static \
|
|
||||||
--disable-failure-tokens \
|
|
||||||
--enable-hashes=strong,glibc \
|
|
||||||
--enable-obsolete-api=no \
|
|
||||||
--srcdir=.. \
|
|
||||||
--with-pkgconfigdir=%{_libdir}/pkgconfig
|
|
||||||
%make_build
|
|
||||||
popd
|
|
||||||
pushd %{_vpath_builddir}-compat
|
pushd %{_vpath_builddir}-compat
|
||||||
%endif
|
|
||||||
%configure \
|
%configure \
|
||||||
--libdir=/%{_lib} \
|
%{common_configure_options} \
|
||||||
--disable-silent-rules \
|
--enable-hashes=%{compat_methods} \
|
||||||
--enable-shared \
|
--enable-obsolete-api=%{compat_api}
|
||||||
--enable-static \
|
|
||||||
--disable-failure-tokens \
|
|
||||||
--enable-hashes=all \
|
|
||||||
--enable-obsolete-api=glibc \
|
|
||||||
--srcdir=.. \
|
|
||||||
--with-pkgconfigdir=%{_libdir}/pkgconfig
|
|
||||||
%make_build
|
%make_build
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -296,6 +308,7 @@ done
|
|||||||
%changelog
|
%changelog
|
||||||
* Mon Oct 01 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.1-3
|
* Mon Oct 01 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.1-3
|
||||||
- Drop compat-devel package
|
- Drop compat-devel package
|
||||||
|
- Set configure options from globals
|
||||||
|
|
||||||
* Sun Sep 30 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.1-2
|
* Sun Sep 30 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.1-2
|
||||||
- Build out-of-tree
|
- Build out-of-tree
|
||||||
|
Loading…
Reference in New Issue
Block a user