%global commit0 93977e241af2e6732a0e064ab552602dc8e3b86a %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Summary: RFC6052 VMOD for Varnish Name: vmod-rfc6052 Version: 0.2 Release: 0.3.20190228git%{?shortcommit0}%{?dist} License: Unlicense Group: System Environment/Daemons URL: https://github.com/toreanderson/libvmod-rfc6052 Source0: https://github.com/toreanderson/lib%{name}/archive/%{commit0}.tar.gz#/lib%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Source tarball built like this: # git clone https://github.com/toreanderson/libvmod-rfc6052.git # cd libvmod-rfc6052 # git checkout 93977e2 # sed -i 's/trunk/0.2/;' configure.ac # mkdir -p src/tests # echo 'varnishtest "notest"' > src/tests/notest.vtc # ./autogen.sh && ./configure && make && make dist #Patch1: vmod-rfc6052_fix_build_for_varnish6.patch Requires: varnish%{?_isa} = %(pkg-config --silence-errors --modversion varnishapi || echo 0) BuildRequires: make BuildRequires: gcc BuildRequires: pkgconfig BuildRequires: varnish BuildRequires: varnish-libs-devel %description RFC6052 VMOD for Varnish %prep %setup -q -n lib%{name}-%{version} #patch1 -p1 %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 make check %install [ %{buildroot} != "/" ] && rm -rf %{buildroot} make install DESTDIR=%{buildroot} INSTALL="install -p" # None of these for fedora/epel find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';' # We explicitly add these later rm -f %{buildroot}%{_docdir}/%{name}/LICENSE rm -f %{buildroot}%{_docdir}/%{name}/README.rst %clean [ %{buildroot} != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_libdir}/varnish*/vmods/ %if 0%{?el5} %doc LICENSE %else %license LICENSE %endif %doc README.rst %{_mandir}/man3/*.3* %changelog * Thu Feb 28 2019 Ingvar Hagelund - 0.2-0.3.20190228git93977e2.v4.1 - Built against varnish-4.1.11 * Wed Aug 30 2017 Ingvar Hagelund - 0.2-0.2.20170830git93977e2.v4.1 - Built against varnish-4.1.8 * Thu Dec 08 2016 Ingvar Hagelund - 0.2-0.1.20161208git93977e2.v4.1 - New git checkout from master - Built agains varnish-4.1.4 * Wed May 04 2016 Ingvar Hagelund - 0.1-3 - Built agains varnish-4.1.2 * Mon Feb 08 2016 Ingvar Hagelund - 0.1-2 - Use license macro also on epel6 - Built against varnish-4.1.1 * Fri Oct 23 2015 Ingvar Hagelund - 0.1-1 - Wrapped for fedora, loosely based on upstream specfile * Mon Oct 19 2015 Tore Anderson - 0.1 - Initial version.