- add multibuild for minimal libcurl flavored build (useful for
container environments) OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/curl?expand=0&rev=369
This commit is contained in:
parent
bc1872d764
commit
2e044a5b69
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>mini</package>
|
||||
</multibuild>
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 20 15:22:47 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add multibuild for minimal libcurl flavored build (useful for
|
||||
container environments)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 20 14:58:27 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
79
curl.spec
79
curl.spec
@ -19,7 +19,16 @@
|
||||
%bcond_without testsuite
|
||||
# need ssl always for python-pycurl
|
||||
%bcond_without openssl
|
||||
Name: curl
|
||||
%define target @BUILD_FLAVOR@%{nil}
|
||||
%if "%{target}" == "mini"
|
||||
%bcond_without mini
|
||||
%global psuffix -mini
|
||||
%else
|
||||
%bcond_with mini
|
||||
%global psuffix %{nil}
|
||||
%endif
|
||||
|
||||
Name: curl%{?psuffix}
|
||||
Version: 8.8.0
|
||||
Release: 0
|
||||
Summary: A Tool for Transferring Data from URLs
|
||||
@ -38,24 +47,24 @@ Patch3: curl-disabled-redirect-protocol-message.patch
|
||||
Patch4: curl-make-install-curl-config.patch
|
||||
BuildRequires: groff
|
||||
BuildRequires: libtool
|
||||
BuildRequires: lzma
|
||||
BuildRequires: openldap2-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(krb5)
|
||||
BuildRequires: pkgconfig(libbrotlidec)
|
||||
BuildRequires: pkgconfig(libidn2)
|
||||
# Disable metalink [bsc#1188218, CVE-2021-22923][bsc#1188217, CVE-2021-22922]
|
||||
# BuildRequires: pkgconfig(libmetalink)
|
||||
BuildRequires: pkgconfig(libnghttp2)
|
||||
BuildRequires: pkgconfig(libpsl)
|
||||
BuildRequires: pkgconfig(libssh)
|
||||
BuildRequires: pkgconfig(libzstd)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
Requires: libcurl4 = %{version}
|
||||
%if %{with openssl}
|
||||
BuildRequires: pkgconfig(libssl)
|
||||
%endif
|
||||
#BuildRequires: openssh
|
||||
%if !%{with mini}
|
||||
BuildRequires: openldap2-devel
|
||||
BuildRequires: pkgconfig(krb5)
|
||||
BuildRequires: pkgconfig(libbrotlidec)
|
||||
BuildRequires: pkgconfig(libssh)
|
||||
%endif
|
||||
%if 0%{?_with_stunnel:1}
|
||||
# used by the testsuite
|
||||
BuildRequires: stunnel
|
||||
@ -67,13 +76,19 @@ server using any of the supported protocols (HTTP, HTTPS, FTP, FTPS,
|
||||
TFTP, DICT, TELNET, LDAP, or FILE). The command is designed to work
|
||||
without user interaction or any kind of interactivity.
|
||||
|
||||
%package -n libcurl4
|
||||
%package -n libcurl%{?psuffix}4
|
||||
Summary: Library for transferring data from URLs
|
||||
%if %{with mini}
|
||||
Provides: libcurl4 = %{version}
|
||||
%else
|
||||
Obsoletes: libcurl-mini4 <= %{version}
|
||||
%endif
|
||||
|
||||
%description -n libcurl4
|
||||
%description -n libcurl%{?psuffix}4
|
||||
The cURL shared library for accessing data using different
|
||||
network protocols.
|
||||
|
||||
%if !%{with mini}
|
||||
%package -n libcurl-devel
|
||||
Summary: Development files for the curl library
|
||||
Requires: glibc-devel
|
||||
@ -114,9 +129,10 @@ BuildArch: noarch
|
||||
|
||||
%description zsh-completion
|
||||
ZSH command line completion support for %name.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%autosetup -p1 -n curl-%{version}
|
||||
|
||||
%build
|
||||
# curl complains if macro definition is contained in CFLAGS
|
||||
@ -131,7 +147,9 @@ autoreconf -fiv
|
||||
# (currently, libtool sets link_all_deplibs=(yes|unknown) everywhere,
|
||||
# will hopefully change in the future)
|
||||
sed -i 's/\(link_all_deplibs=\)unknown/\1no/' configure
|
||||
|
||||
%configure \
|
||||
--enable-hsts \
|
||||
--enable-ipv6 \
|
||||
%if %{with openssl}
|
||||
--with-openssl \
|
||||
@ -141,9 +159,31 @@ sed -i 's/\(link_all_deplibs=\)unknown/\1no/' configure
|
||||
%else
|
||||
--without-openssl \
|
||||
%endif
|
||||
--with-gssapi=$(krb5-config --prefix) \
|
||||
--with-libidn2 \
|
||||
--with-nghttp2 \
|
||||
--enable-docs \
|
||||
%if %{with mini}
|
||||
--disable-dict \
|
||||
--disable-ftp \
|
||||
--disable-gopher \
|
||||
--disable-imap \
|
||||
--disable-mqtt \
|
||||
--disable-ntlm \
|
||||
--disable-ntlm-wb \
|
||||
--disable-pop3 \
|
||||
--disable-rtsp \
|
||||
--disable-smtp \
|
||||
--disable-telnet \
|
||||
--disable-tftp \
|
||||
--disable-tls-srp \
|
||||
--disable-websockets \
|
||||
--without-brotli \
|
||||
--without-libssh \
|
||||
%else
|
||||
--with-gssapi=$(krb5-config --prefix) \
|
||||
--with-brotli \
|
||||
--with-libssh \
|
||||
%endif
|
||||
--enable-symbol-hiding \
|
||||
--disable-static \
|
||||
--enable-threaded-resolver \
|
||||
@ -170,13 +210,23 @@ popd
|
||||
%install
|
||||
%make_install
|
||||
rm -f %{buildroot}%{_libdir}/libcurl.la
|
||||
%if %{with mini}
|
||||
rm -rv %{buildroot}%{_includedir}/curl %{buildroot}/%{_libdir}/pkgconfig %{buildroot}%{_datadir}
|
||||
rm -v %{buildroot}%{_bindir}/curl %{buildroot}%{_bindir}/curl-config %{buildroot}%{_libdir}/libcurl.so
|
||||
%else
|
||||
install -Dm 0644 docs/libcurl/libcurl.m4 %{buildroot}%{_datadir}/aclocal/libcurl.m4
|
||||
pushd scripts
|
||||
%make_install
|
||||
popd
|
||||
%endif
|
||||
|
||||
%ldconfig_scriptlets -n libcurl4
|
||||
%ldconfig_scriptlets -n libcurl%{?psuffix}4
|
||||
|
||||
%files -n libcurl%{?psuffix}4
|
||||
%license COPYING
|
||||
%{_libdir}/libcurl.so.4*
|
||||
|
||||
%if !%{with mini}
|
||||
%files
|
||||
%doc README RELEASE-NOTES CHANGES
|
||||
%doc docs/{BUGS.md,FAQ,FEATURES.md,TODO,TheArtOfHttpScripting.md}
|
||||
@ -193,10 +243,6 @@ popd
|
||||
%dir %{_datadir}/fish/vendor_completions.d/
|
||||
%{_datadir}/fish/vendor_completions.d/curl.fish
|
||||
|
||||
%files -n libcurl4
|
||||
%license COPYING
|
||||
%{_libdir}/libcurl.so.4*
|
||||
|
||||
%files -n libcurl-devel
|
||||
%{_bindir}/curl-config
|
||||
%{_includedir}/curl
|
||||
@ -209,5 +255,6 @@ popd
|
||||
%{_mandir}/man1/curl-config.1%{?ext_man}
|
||||
%{_mandir}/man3/*
|
||||
%doc docs/libcurl/symbols-in-versions
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user