%global commit0 09978549a8abb07d84e0492621580f3209378dc3 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Summary: libmhash support for Varnish VCL Name: vmod-digest Version: 1.0.2 Release: 0.4.20171229git%{shortcommit0}%{?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 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # To make a tarball for building on older distros like el5: # git clone https://github.com/varnish/libvmod-digest.git # cd libvmod-digest/ # git checkout 0997854 # sed -i 's/1\.0\.1/1.0.2/g;' configure.ac # ./autogen.sh && ./configure && make && make dist Requires: varnish%{?_isa} = %(pkg-config --silence-errors --modversion varnishapi || echo 0) BuildRequires: make BuildRequires: gcc BuildRequires: pkgconfig BuildRequires: varnish BuildRequires: varnish-libs-devel BuildRequires: mhash-devel # Add these when building from a git checkout #BuildRequires: autoconf #BuildRequires: automake #BuildRequires: libtool #BuildRequires: python-docutils %description digest VMOD, providing libmhash support for Varnish VCL %prep %setup -n lib%{name}-%{version} %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 \ --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 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 {} ';' mv %{buildroot}%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} _doc %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 * Fri Dec 29 2017 Ingvar Hagelund - 1.0.2-0.4.20171229git0997854 - Rebuilt git checkout 0997854 against varnish-5.2.1 * Thu Oct 26 2017 Ingvar Hagelund - 1.0.2-0.3.20170830gitbbbe255 - Rebuild against varnish-5.2.0 * Wed Aug 30 2017 Ingvar Hagelund - 1.0.2-0.2.20170830gitbbbe255 - Rebuild against varnish-4.1.8 * Thu Dec 08 2016 Ingvar Hagelund - 1.0.2-0.1.20161208gitbbbe255 - Checked out latest git master - Rebuilt against varnish-4.1.4 * 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 23 2015 Ingvar Hagelund - 0.4-0.1.git.10f3b44 - Wrapped for copr/fedora, loosely based on upstream specfile * Wed Nov 14 2012 Lasse Karstensen - 0.1-0.20121114 - Initial version.