%global commit0 93977e241af2e6732a0e064ab552602dc8e3b86a %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global varnishver 5.2.0 %global vabi 6.1 %global vabistrict 4c4875cbf Summary: RFC6052 VMOD for Varnish Name: vmod-rfc6052 Version: 0.2 Release: 0.3.20170830git%{?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 Requires: varnish = %varnishver Requires: varnishabi-%vabi Requires: varnishabi-strict-%vabistrict BuildRequires: make BuildRequires: gcc BuildRequires: pkgconfig BuildRequires: varnish = %varnishver BuildRequires: varnish-libs-devel = %varnishver %description RFC6052 VMOD for Varnish %prep %setup -q -n lib%{name}-%{version} %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 Oct 26 2017 Ingvar Hagelund - 0.2-0.3.20170830git93977e2 - Built against varnish-5.2.0 * 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.