%global commit0 21cecbee032e2db88587b735213dbb4c1b4671c0 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global varnishver 4.1.11 %global vbranch .v4.1 Summary: Varnish StateLess Persistence Director Name: vmod-vslp Version: 1.1 Release: 0.5.20190228git%{?shortcommit0}%{?dist} License: BSD Group: System Environment/Libraries URL: https://code.uplex.de/uplex-varnish/libvmod-vslp/ Source0: https://code.uplex.de/uplex-varnish/libvmod-vslp/archive-tarball/%{shortcommit0}#/vmod-vslp-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # To make a tarball for building on older distros like el5: # git clone https://git.code.uplex.de/uplex-varnish/libvmod-vslp.git # cd libvmod-vslp # git checkout 21cecbe # sed -i 's/master/1.1/g;' configure.ac # ./autogen.sh && ./configure && make dist Requires: varnish = %varnishver BuildRequires: make BuildRequires: gcc BuildRequires: pkgconfig BuildRequires: varnish = %varnishver BuildRequires: varnish-libs-devel = %varnishver # Add these when building from a git checkout #BuildRequires: autoconf #BuildRequires: automake #BuildRequires: libtool #BuildRequires: python-docutils %description This is the Varnish StateLess Persistence Director vmod. The purpose of this director is to provide stateless persistence (or persistency if you prefer) for backend requests. %prep %setup -q %build # Add this when building from a git checkout (will not work on epel5) #./autogen.sh # Use prebuilt manpage. Remove this when building from a git checkout export RST2MAN=/bin/true %configure --disable-static # 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 make check %install # Clean buildroot on older el variants rm -rf %{buildroot} make install DESTDIR=%{buildroot} INSTALL="install -p" # None of this for fedora/epel find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';' # We explicitly add these later rm -f %{buildroot}%{_docdir}/lib%{name}/LICENSE rm -f %{buildroot}%{_docdir}/lib%{name}/README.rst rm -f %{buildroot}%{_docdir}/%{name}/LICENSE rm -f %{buildroot}%{_docdir}/%{name}/README.rst %clean 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 * Wed Aug 30 2017 Ingvar Hagelund - 1.0.0-0.4.20160208git10f3b44 - Built agains varnish-4.1.8 * Mon Feb 08 2016 Ingvar Hagelund - 1.0.0-0.2.20160208git10f3b44 - Checked out latest git master - Use license macro also on epel6 - Built against varnish-4.1.1 * Fri Oct 16 2015 Ingvar Hagelund 1.1-0.2.git.c3249b2 - First wrap for fedora