%global varnishver %(pkg-config --silence-errors --modversion varnishapi || echo 0) Name: vmod-geoip Summary: GeoIP VMOD for Varnish Version: 1.0.3 Release: 1%{?dist} License: MIT Group: System Environment/Daemons URL: https://github.com/varnish/libvmod-geoip Source0: lib%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # To make a tarball for building from git: # git clone https://github.com/varnish/libvmod-geoip.git # cd libvmod-geoip # git checkout tags/libvmod-geoip-1.0.3 # ./autogen.sh && ./configure && make && make dist Requires: varnish%{?_isa} = %varnishver Requires: GeoIP BuildRequires: make BuildRequires: gcc BuildRequires: pkgconfig BuildRequires: varnish BuildRequires: varnish-libs-devel BuildRequires: GeoIP-devel # Add these when building from a git checkout #BuildRequires: autoconf #BuildRequires: automake #BuildRequires: libtool #BuildRequires: python-docutils %description geoip VMOD %prep %autosetup -n lib%{name}-%{version} %build %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_build # libool is so strange sometimes pushd src ln -s .libs/*.so . popd %check %make_build 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 * Wed Aug 08 2018 Ingvar Hagelund - 1.0.3-1 - New upstream release - Built against varnish-4.1.11 * Wed Oct 25 2017 Ingvar Hagelund - 1.0.3-0.1 - Built 1.0.2+ checkout agains varnish-5.2.0 * Wed Aug 30 2017 Ingvar Hagelund - 0.3-0.4.20151006git1649913 - Rebuilt against varnish-4.1.8 * Wed Feb 10 2016 Ingvar Hagelund - 0.3-0.2.20151006git1649913 - Rebuilt against varnish-4.1.1 * Fri Oct 23 2015 Ingvar Hagelund - 0.3-0.1.git.1649913 - Wrapped for copr/fedora, loosely based on upstream specfile * Wed Nov 14 2012 Lasse Karstensen - 0.1-0.20121114 - Initial version.