From 524afde562c2af1defc866a3da3e4786e191c308 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 20 Apr 2017 12:21:16 +0300 Subject: [PATCH 1/1] new, version 0.2 --- varnish-libvmod-geoip.spec | 65 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 varnish-libvmod-geoip.spec diff --git a/varnish-libvmod-geoip.spec b/varnish-libvmod-geoip.spec new file mode 100644 index 0000000..f38b292 --- /dev/null +++ b/varnish-libvmod-geoip.spec @@ -0,0 +1,65 @@ +# +# Conditional build: +%bcond_without tests # build without tests + +%define vmod geoip +Summary: GeoIP Varnish module by Varnish Software +Name: varnish-libvmod-%{vmod} +Version: 0.2 +Release: 1 +License: BSD +Group: Daemons +Source0: https://github.com/varnish/libvmod-geoip/archive/libvmod-%{vmod}-%{version}.tar.gz +# Source0-md5: 482204cf88cd5fe4302d14daf07d48ac +URL: https://github.com/varnish/libvmod-geoip +BuildRequires: autoconf >= 2.59 +BuildRequires: automake +BuildRequires: libtool +BuildRequires: varnish-source >= 3.0 +%{?with_tests:BuildRequires: varnish} +%requires_eq_to varnish varnish-source +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%define vmoddir %(pkg-config --variable=vmoddir varnishapi || echo ERROR) + +%description +Varnish GeoIP Lookup Module + +This Varnish module exports functions to look up GeoIP country codes. + +%prep +%setup -qc +mv libvmod-%{vmod}-*/* . + +%build +%{__libtoolize} +%{__aclocal} -I m4 +%{__autoheader} +%{__automake} +%{__autoconf} + +VARNISHSRC=$(pkg-config --variable=srcdir varnishapi) +%configure \ + VARNISHSRC=$VARNISHSRC \ + VMODDIR=%{vmoddir} \ + --disable-static + +%{__make} +%{?with_tests:%{__make} check} + +%install +rm -rf $RPM_BUILD_ROOT +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +%{__rm} $RPM_BUILD_ROOT%{_libdir}/varnish/vmods/libvmod_%{vmod}.la +%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libvmod-%{vmod} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc README.rst +%attr(755,root,root) %{vmoddir}/libvmod_%{vmod}.so +%{_mandir}/man3/vmod_%{vmod}.3* -- 2.44.0