%global commit0 4aebdeb132ebcd7a5ecb88fd2143ca0f8155efcd %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: vmod-curl Summary: cURL bindings VMOD for Varnish Version: 1.0.4 Release: 1%{?dist} License: BSD Group: System Environment/Daemons URL: https://github.com/varnish/lib%{name} Source0: https://github.com/varnish/lib%{name}/archive/%{commit0}.tar.gz#/lib%{name}-%{version}.tar.gz # run varnishd with -j none # Necessary to make check in el5,6 mock jail Patch0: vmod-curl-1.0.3-fix-mockrun.el5.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Made a tarball from git like this: # git clone https://github.com/varnish/libvmod-curl.git # cd libvmod-curl # git checkout 4aebdeb # sed -i 's/vcc_if.h \\/vcc_if.h debug_flags.h \\/' src/Makefile.am # sed -i 's/1\.0\.3/1.0.4/g' configure.ac # ./autogen.sh && ./configure && make dist Requires: varnish BuildRequires: make BuildRequires: gcc BuildRequires: pkgconfig BuildRequires: varnish BuildRequires: varnish-libs-devel BuildRequires: libcurl-devel %description This vmod provides cURL bindings for Varnish so you can use Varnish as an HTTP client and fetch headers and bodies from backends %prep %setup -q -n lib%{name}-%{version} %if 0%{?rhel} == 6 %patch0 %endif %build # Use prebuilt manpage. Remove this when building from a git checkout export RST2MAN=/bin/true %configure \ --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} # We have to remove rpath - not allowed in Fedora # (This problem only visible on 64 bit arches) sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g; s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} %check # test11 is kindo broken on el6. Just fake it. # https://github.com/varnish/libvmod-curl/issues/36 %if 0%{?rhel} == 6 cp src/tests/test01.vtc src/tests/test11.vtc %endif make check %install # Clean buildroot on older el variants rm -rf %{buildroot} make install DESTDIR=%{buildroot} # None of these for fedora/epel find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';' find %{buildroot}/%{_libdir}/ -name '*.a' -exec rm -f {} ';' # We explicitly add these later rm -v -f %{buildroot}%{_docdir}/%{name}/LICENSE rm -f %{buildroot}%{_docdir}/%{name}/README.rst rm -f %{buildroot}%{_docdir}/%{name}/CHANGES.rst %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_libdir}/varnish*/vmods/ %if 0%{?fedora} >= 17 || 0%{?rhel} > 5 %license LICENSE %else %doc LICENSE %endif %doc README.rst CHANGES.rst %{_mandir}/man3/*.3* %changelog * Wed Feb 27 2019 Ingvar Hagelund - 1.0.4-1 - New upstream release - Built against varnish-4.1.11 * Thu Oct 26 2017 Ingvar Hagelund - 1.0.4-0.1.20171026git4aebdeb - Built 1.0.3+git checkout against varnish-5.2.0 - Updated fix for upstream bug 36 - Pulled support for el5 * Wed Aug 30 2017 Ingvar Hagelund - 1.0.3-0.2.20170830git517056f - Rebuilt against varnish-4.1.8 * Tue May 24 2016 Ingvar Hagelund - 1.0.3-0.1.20160524git517056f - Checked out latest git master - doc README.rst CHANGES.rst - Built against varnish-4.1.2 - Removed check #11 for el5,el6, as described in upstream bug #36 * Mon Feb 08 2016 Ingvar Hagelund - 1.0.1-0.2.20160208git19b62be - Checked out latest git master - Use license macro also on epel6 - Built against varnish-4.1.1 * Wed Nov 11 2015 Ingvar Hagelund - 1.0.1-0.1.git.b140c7a - Wrapped for copr/fedora