File gnurl.spec of Package gnurl
Name: gnurl
Summary: Command-line tool based on libgnurl
URL: https://gnunet.org/gnurl
License: MIT
Version: 7.57.0
Release: 1%{?dist}
Source0: https://gnunet.org/sites/default/files/%{name}-%{version}.tar.bz2
# fix version in libgnurl.pc file
Patch0: 0000-gnurl-fix-version-in-pc-file.patch
# prevent configure script from discarding -g in CFLAGS (#496778)
Patch102: 0102-curl-7.36.0-debug.patch
BuildRequires: gnutls-devel
BuildRequires: libidn-devel
BuildRequires: zlib-devel
Requires: libgnurl%{?_isa} = %{version}-%{release}
%description
gnurl is a command-line tool based on libgnurl.
%package -n libgnurl
Summary: A fork of libcurl for GNUnet
%description -n libgnurl
libgnurl is a fork of libcurl with the following major changes:
Compilation requirements:
* libgnurl must be compiled so that it supports only HTTP and HTTPS
(remove Gopher, SSH, IMAP, etc.)
* libgnurl must be compiled so that it supports only GnuTLS
(remove CaySSL, QsoSSL, GSKit, etc.)
* removed support for NTLM, GSSAPI, SPNEGO, LDAP, metalink, HTTP2
Changes to the code:
* renamed the library binary from 'libcurl' to 'libgnurl'
Usage notes:
* exported symbols were NOT renamed, so they still all have the
curl prefix; you should be able to start using libgnurl simply
by changing -lcurl to -lgnurl.
%package -n libgnurl-devel
Summary: Development files for libgnurl
Requires: libgnurl%{?_isa} = %{version}-%{release}
%description -n libgnurl-devel
Development files for libgnurl.
%prep
%setup -q
%patch0 -p1
%patch102 -p1
%build
# See the README, the libgnurl maintainer asks for a certain set of options
%configure --disable-static \
--enable-ipv6 --with-gnutls --without-libssh2 \
--without-libmetalink --without-winidn --without-librtmp \
--without-nghttp2 --without-nss --without-cyassl --without-polarssl \
--without-ssl --without-winssl --without-darwinssl --disable-sspi \
--disable-ntlm-wb --disable-ldap --disable-rtsp --disable-dict \
--disable-telnet --disable-tftp --disable-pop3 --disable-imap \
--disable-smtp --disable-gopher --disable-file --disable-ftp --disable-smb
make %{?_smp_mflags}
%install
%make_install
find %{buildroot} -name '*.la' -exec rm -f '{}' \;
%files
%doc README
%doc docs/BUGS docs/CODE_OF_CONDUCT.md docs/FAQ docs/FEATURES docs/MANUAL
%doc docs/RESOURCES docs/TheArtOfHttpScripting
%{_bindir}/gnurl
%{_mandir}/man1/gnurl.1*
%files -n libgnurl
%license COPYING
%{_libdir}/libgnurl.so.*
%files -n libgnurl-devel
%doc docs/CONTRIBUTE.md
%{_bindir}/gnurl-config
%{_includedir}/gnurl
%{_libdir}/libgnurl.so
%{_libdir}/pkgconfig/libgnurl.pc
%{_datadir}/aclocal/libgnurl.m4
%{_mandir}/man1/gnurl-config.1*
%{_mandir}/man3/*