%global commit0 0262a0c8bc5ea9f6af6f60d8d024f52d86cb2c68 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global varnishver 5.2.0 %global vabi 6.1 %global vabistrict 4c4875cbf Name: vmod-geoip Summary: GeoIP VMOD for Varnish Version: 1.0.3 Release: 0.2.20151006git%{?shortcommit0}%{?dist} License: MIT 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 from git: # git clone https://github.com/varnish/libvmod-geoip.git # cd libvmod-geoip # git checkout 0262a0c # sed -i 's/trunk/1.0.3/g' configure.ac # ./autogen.sh && ./configure && make && make dist Requires: varnish%{?_isa} = %(pkg-config --silence-errors --modversion varnishapi || echo 0) 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 %setup -q -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.3-0.2 - Built 1.0.2+ checkout agains varnish-5.2.1 * 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.