%global varnishver %(pkg-config --silence-errors --modversion varnishapi || echo 0) Name: vmod-curl Summary: cURL bindings VMOD for Varnish Version: 1.0.4 Release: 5%{?dist} License: BSD Group: System Environment/Daemons URL: https://github.com/varnish/libvmod-curl Source0: %{url}/archive/lib%{name}-%{version}.tar.gz # Made a tarball from git like this: # git clone https://github.com/varnish/libvmod-curl.git # cd libvmod-curl # git fetch --all --tags --prune # git checkout tags/libvmod-curl-1.0.4 # ./autogen.sh && ./configure && make && make check && make dist # run varnishd with -j none # Necessary to make check in el6 mock jail #Patch0: vmod-curl-1.0.3-fix-mockrun.el5.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: varnish%{?_isa} = %varnishver BuildRequires: make BuildRequires: gcc BuildRequires: pkgconfig BuildRequires: varnish BuildRequires: varnish-libs-devel BuildRequires: libcurl-devel BuildRequires: python-docutils %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 -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 %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 * Tue Mar 02 2021 Ingvar Hagelund - 1.0.4-5 - Rebuilt against varnish-6.0.7 - Skipped patch for el5 * Fri Feb 08 2019 Ingvar Hagelund - 1.0.4-4 - Rebuilt against varnish-6.0.3 * Tue Nov 27 2018 Ingvar Hagelund - 1.0.4-3 - Rebuilt against varnish-6.0.2 * Wed Oct 10 2018 Ingvar Hagelund - 1.0.4-2 - Rebuilt against varnish-6.0.1 * Wed Aug 08 2018 Ingvar Hagelund - 1.0.4-1 - New upstream release - Rebuilt agains varnish-6.0.0 * Fri Dec 29 2017 Ingvar Hagelund - 1.0.4-0.2.20171026git4aebdeb - Rebuilt against varnish-5.2.1 * 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