hack to fix libcurl-gnutls soname [release 7.55.1-3mamba;Wed Aug 30 2017]

This commit is contained in:
Silvan Calarco 2024-01-05 21:36:34 +01:00
parent 4c71a2fc51
commit 6e6760fcd6

103
curl.spec
View File

@ -2,7 +2,7 @@
Name: curl
Version: 7.55.1
Release: 1mamba
Release: 3mamba
Summary: A tool for transfering data with URL syntax that supports many protocols
Group: Applications/Networking
Vendor: openmamba
@ -14,24 +14,25 @@ Patch0: %{name}-7.21.2-gnutls.patch
Patch1: curl-7.34.0-dns-resolver-prefer-ipv4.patch
Patch2: curl-7.40.0-libgss-1.0.3.patch
License: MIT
BuildRequires: bash
BuildRequires: ldconfig
BuildRequires: libgssapi-devel
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libcares-devel
BuildRequires: libe2fs-devel
BuildRequires: libgcrypt-devel
BuildRequires: libffi-devel
BuildRequires: libgmp-devel
BuildRequires: libgnutls-devel
BuildRequires: libgpg-error-devel
%if "%{stage1}" != "1"
BuildRequires: libgss-devel
BuildRequires: libidn-devel
BuildRequires: libnettle-devel
%if "%{stage1}" != "1"
BuildRequires: libopenldap-devel
BuildRequires: libsasl-devel
BuildRequires: libkrb5-devel
%endif
BuildRequires: libopenssl-devel
BuildRequires: libp11-kit-devel
BuildRequires: librtmp-devel
BuildRequires: libsasl2-devel
BuildRequires: libssh2-devel
BuildRequires: libtasn1-devel
BuildRequires: libunistring-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRequires: pkgconfig
@ -59,8 +60,6 @@ This tool offer a myriad of powerful features and full protocol control.
%package -n %{libname}
Summary: Dynamic Libraries for cURL
Group: System/Libraries
Provides: %{libname}-gnutls
Obsoletes: %{libname}-gnutls
%if "%{stage1}" != "1"
Requires: ca-certificates
%endif
@ -69,10 +68,22 @@ Requires: ca-certificates
Libcurl is a library for transfering data with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP.
This library offer a myriad of powerful features and full protocol control.
%package -n %{libname}-gnutls
Summary: Dynamic Libraries for cURL (linked against gnutls)
Group: System/Libraries
%if "%{stage1}" != "1"
Requires: ca-certificates
%endif
%description -n %{libname}-gnutls
Libcurl is a library for transfering data with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP.
This library offer a myriad of powerful features and full protocol control.
%package -n %{libname}-devel
Summary: Static libraries and header for %{libname}
Group: Development/Libraries
Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release}
Requires: %{libname}-gnutls = %{?epoch:%epoch:}%{version}-%{release}
Provides: %{libname}-gnutls-devel
Obsoletes: %{libname}-gnutls-devel
@ -84,10 +95,17 @@ This package contains static libraries and header files need for development.
%prep
%setup -q
#-D -T
#:<< _EOF
%patch1 -p1
#%patch2 -p1
mkdir gnutls
cd gnutls
cp -r ../* . || true
%build
#:<< _EOF
%configure \
--enable-shared \
--enable-static \
@ -101,7 +119,6 @@ This package contains static libraries and header files need for development.
--enable-tftp \
--enable-ipv6 \
--with-ssl \
--with-gnutls \
--with-zlib \
--with-random \
--with-nss \
@ -127,6 +144,45 @@ This package contains static libraries and header files need for development.
CFLAGS="-lcares -lssh2"
%endif
cd gnutls
sed -i "s|libcurl\.la|libcurl-gnutls\.la|g" lib/Makefile.am
sed -i "s|libcurl_la|libcurl_gnutls_la|g" lib/Makefile.am
autoreconf -f -i
%configure \
--enable-shared \
--enable-static \
--enable-cookies \
--enable-crypto-auth \
--enable-http \
--enable-ftp \
--enable-file \
--enable-dict \
--enable-telnet \
--enable-tftp \
--enable-ipv6 \
--without-ssl \
--with-gnutls \
--with-zlib \
--with-random \
--with-nss \
--enable-verbose \
--disable-sspi \
--with-libssh2 \
%if "%{stage1}" != "1"
--with-gssapi \
--enable-ldap \
--with-libidn \
--enable-manual \
--with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt \
%else
--without-krb5 \
%endif
--enable-ares
cd lib
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
# install development documentation
@ -144,6 +200,13 @@ install -m644 docs/examples/{Makefile.example,README,*.c} \
%makeinstall
cd gnutls/lib/
%makeinstall
#for version in 3 4 4.0.0 4.1.0 4.2.0 4.3.0; do
# ln -s libcurl-gnutls.so.4.4.0 %{buildroot}%{_libdir}/libcurl-gnutls.so.${version}
#done
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -161,6 +224,11 @@ install -m644 docs/examples/{Makefile.example,README,*.c} \
%{_libdir}/libcurl.so.*
%doc COPYING
%files -n %{libname}-gnutls
%defattr(-,root,root)
%{_libdir}/libcurl-gnutls.so.*
%doc COPYING
%files -n %{libname}-devel
%defattr(-,root,root)
%{_bindir}/curl-config
@ -168,6 +236,9 @@ install -m644 docs/examples/{Makefile.example,README,*.c} \
%{_libdir}/libcurl.a
%{_libdir}/libcurl.la
%{_libdir}/libcurl.so
%{_libdir}/libcurl-gnutls.a
%{_libdir}/libcurl-gnutls.la
%{_libdir}/libcurl-gnutls.so
%{_libdir}/pkgconfig/libcurl.pc
%{_datadir}/aclocal/libcurl.m4
%{_mandir}/man1/curl-config.1*
@ -179,6 +250,12 @@ install -m644 docs/examples/{Makefile.example,README,*.c} \
%doc CHANGES README RELEASE-NOTES
%changelog
* Wed Aug 30 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 7.55.1-3mamba
- hack to fix libcurl-gnutls soname
* Tue Aug 29 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 7.55.1-2mamba
- build and provide libcurl-gnutls
* Wed Aug 16 2017 Automatic Build System <autodist@mambasoft.it> 7.55.1-1mamba
- automatic version update by autodist