diff --git a/libressl.spec b/libressl.spec index fc0aabf..6cbb0cf 100644 --- a/libressl.spec +++ b/libressl.spec @@ -9,11 +9,18 @@ %define _obindir %{_oprefix}/bin %define _omandir %{_oprefix}/share/man %define _olibdir %{_oprefix}/%{_lib} +# We need to override macros set in platform %define _prefix /opt/libressl -# No need to have /opt/libressl/lib64, use /opt/libressl/lib +%define _bindir %{_prefix}/bin +%define _includedir %{_prefix}/include %define _libdir %{_prefix}/lib +%define _libexecdir %{_prefix}/libexec +%define _datadir %{_prefix}/share +%define _mandir %{_datadir}/man # Keep package docs in normal locations %define _defaultdocdir %{_oprefix}/share/doc +# RPM 4 by default looks for *.pc in %%_libdir which is redefined +%global __pkgconfig_path ^(%{_olibdir}/pkgconfig/.*\\.pc|%{_obindir}/pkg-config)$ # Disable /usr/share/spec-helper/relink_symlinks # to make sure that symlinks are not broken %define dont_relink 1 @@ -41,8 +48,8 @@ # We rename e.g. libtls.pc to libressl-tls.pc, make sure that we do not # get odd provides and break the repository if forgot to rename something. # Filter out provides like 'devel(libcrypto(64bit))' (they are in OpenSSL). -%define __noautoprov \ - '.*openssl.*|pkgconfig\\(lib(tls|crypro|ssl)\\)|devel\\(lib(tls|crypto|ssl).*\\).*' +%global __provides_exclude \ +'.*openssl.*|pkgconfig\\(lib(tls|crypto|ssl)\\)|devel\\(lib(tls|crypto|ssl).*\\).*' %define libcrypto_sover 46 %define libssl_sover 48 @@ -56,7 +63,7 @@ Summary: LibreSSL utils and libs coexisting with OpenSSL Name: libressl Version: %{base_version}.git%{git_date} -Release: 14 +Release: 23 # The code is distributed under ISC license except of original OpenSSL code License: ISC and BSD-like Group: System/Base @@ -88,14 +95,14 @@ Source25: test5.c Source29: test9.c # To get %%_openssldir and for %%check BuildRequires: openssl-devel -BuildRequires(check): gostsum +#BuildRequires(check) +BuildRequires: gostsum # readelf <...> | <...> BuildRequires: binutils grep gawk BuildRequires: chrpath # This LibreSSL uses /etc/pki/tls from system OpenSSL # but most functions will work without its files -Suggests: openssl -Autoreq: 1 +Recommends: openssl %description LibreSSL utils and libs coexisting with OpenSSL. @@ -120,7 +127,6 @@ GOST is supported out of the box. %package -n %{libcrypto_pkg} Summary: libcrypto library from LibreSSL Group: System/Libraries -Autoreq: 1 %description -n %{libcrypto_pkg} libcrypto library from LibreSSL @@ -132,7 +138,6 @@ libcrypto library from LibreSSL %package -n %{libssl_pkg} Summary: libssl library from LibreSSL Group: System/Libraries -Autoreq: 1 %description -n %{libssl_pkg} libssl library from LibreSSL @@ -144,7 +149,6 @@ libssl library from LibreSSL %package -n %{libtls_pkg} Summary: libtls library from LibreSSL Group: System/Libraries -Autoreq: 1 %description -n %{libtls_pkg} libtls library from LibreSSL @@ -179,7 +183,6 @@ Provides: devel(libressl-libtls%{b64}) Provides: devel(libressl-libcrypto%{b64}) Provides: devel(libressl-libssl%{b64}) %endif -Autoreq: 1 %description devel LibreSSL devel package. Devel libraries are in %{_libdir}, @@ -227,7 +230,6 @@ Provides: nc = %{EVRD} # Provide "netcat" but of a lower version than the real netcat # to allow other packages to depend from any variant of netcat Provides: netcat = 1.0 -Autoreq: 1 %description -n netcat-openbsd The nc package contains Netcat (the program is actually nc), a simple @@ -262,23 +264,23 @@ cat %{SOURCE1} | sed \ patch -p1 < 1.patch %build -%setup_compile_flags +%set_build_flags %serverbuild # Use the same %%_openssl dir with OpenSSL, but separate the config # (note that we patch libressl, X509_CONF_FILE is not upstream) export CFLAGS="$CFLAGS -DX509_CONF_FILE='\"%{_openssldir}/libressl.cnf\"'" autoreconf -if #patch2 # static libs are required for tests target in Makefile -%configure2_5x \ +%configure \ --enable-nc \ --enable-static \ --with-openssldir=%{_openssldir} -%make +%make_build %install set +f # explicitly enable shell globbing -%makeinstall_std +%make_install # Some ideas about mans are from ALT Linux spec install -m 0644 apps/nc/nc.1 %{buildroot}%{_mandir}/man1/nc.1 @@ -351,7 +353,7 @@ do exit 1 fi # Restore ability to work with custom prefix - # It is lost due to --exec_prefix=XXX in %%configure2_5x + # It is lost due to --exec_prefix=XXX in %%configure sed -i -r \ -e 's,^exec_prefix=.+,exec_prefix=${prefix},' \ -e 's,^libdir=.+,libdir=${exec_prefix}/lib,' \