File mingw64-curl.spec of Package mingw64-curl

#
# spec file for package mingw64-curl
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           mingw64-curl
Version:        8.13.0
Release:        0
Summary:        MinGW Windows port of curl and libcurl
License:        MIT
Group:          Development/Libraries/C and C++
Url:            https://curl.se/
Source0:        https://curl.se/download/curl-%{version}.tar.xz
Source1:        certdata.txt
Patch0:         curl-8.7.1-fix-finding-cacert.patch
BuildRequires:  curl
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-libssh2-devel
BuildRequires:  mingw64-mozilla-nss-devel
BuildRequires:  mingw64-win_iconv-devel
BuildRequires:  mingw64-zlib-devel
BuildRequires:  mingw64-libidn2-devel
BuildRequires:  mingw64-brotli-devel
BuildRequires:  mingw64-zstd-devel
BuildRequires:  mingw64-libopenssl-1_1-devel
%_mingw64_package_header_debug
BuildArch:      noarch

%description
cURL is a tool for getting files from HTTP, FTP, FILE, LDAP, LDAPS,
DICT, TELNET and TFTP servers, using any of the supported protocols.
cURL is designed to work without user interaction or any kind of
interactivity. cURL offers many useful capabilities, like proxy
support, user authentication, FTP upload, HTTP post, and file transfer
resume.

%package -n mingw64-libcurl4
Summary:        MinGW Windows port of curl and libcurl
Group:          System/Libraries
Obsoletes:      mingw64-libcurl < %{version}
Provides:       mingw64-libcurl = %{version}

%description -n mingw64-libcurl4
cURL is a tool for getting files from HTTP, FTP, FILE, LDAP, LDAPS,
DICT, TELNET and TFTP servers, using any of the supported protocols.
cURL is designed to work without user interaction or any kind of
interactivity. cURL offers many useful capabilities, like proxy
support, user authentication, FTP upload, HTTP post, and file transfer
resume.

%package -n mingw64-libcurl-devel
Summary:        MinGW Windows port of curl and libcurl
Group:          Development/Libraries/C and C++

%description -n mingw64-libcurl-devel
cURL is a tool for getting files from HTTP, FTP, FILE, LDAP, LDAPS,
DICT, TELNET and TFTP servers, using any of the supported protocols.
cURL is designed to work without user interaction or any kind of
interactivity. cURL offers many useful capabilities, like proxy
support, user authentication, FTP upload, HTTP post, and file transfer
resume.

%_mingw64_debug_package

%prep
%autosetup -p1 -n curl-%{version}
cp %{SOURCE1} .

%build
MINGW64_CFLAGS="-I%{_mingw64_includedir}/nspr4 -I%{_mingw64_includedir}/nss3 %{_mingw64_cflags}" \
PATH="%{_mingw64_bindir}:$PATH" \
%{_mingw64_configure} \
  --disable-static \
  --enable-sspi \
  --with-default-ssl-backend=schannel \
  --enable-ipv6 \
  --with-ca-bundle=%{_mingw64_sysconfdir}/pki/tls/certs/curl-ca-bundle.crt \
  --enable-ldaps --enable-ldap \
  --with-libssh2 \
  --without-random \
  --with-openssl \
  --with-schannel \
  --without-libpsl

scripts/mk-ca-bundle.pl -n
%{_mingw64_make} V=1 %{?_smp_mflags}

%install
%{_mingw64_make_install}

mkdir -p %{buildroot}%{_mingw64_sysconfdir}/pki/tls/certs
cp ca-bundle.crt %{buildroot}%{_mingw64_sysconfdir}/pki/tls/certs/curl-ca-bundle.crt

%check

%files
%{_mingw64_bindir}/curl.exe
%{_mingw64_mandir}/man1/curl.1%{?ext_man}
%dir %{_mingw64_sysconfdir}
%{_mingw64_sysconfdir}/pki

%files -n mingw64-libcurl4
%{_mingw64_bindir}/libcurl-4.dll

%files -n mingw64-libcurl-devel
%doc COPYING
%{_mingw64_bindir}/curl-config
%{_mingw64_libdir}/libcurl.dll.a
%{_mingw64_libdir}/pkgconfig/libcurl.pc
%{_mingw64_includedir}/curl/
%{_mingw64_mandir}/man1/curl-config.1%{?ext_man}
%{_mingw64_mandir}/man3
%{_mingw64_datadir}/aclocal/libcurl.m4

%changelog
openSUSE Build Service is sponsored by