3 %bcond_without tests # build without tests
6 Summary: Variable support VMOD
7 Name: varnish-libvmod-%{vmod}
12 Source0: https://github.com/varnish/libvmod-var/archive/3.0/%{vmod}-%{version}.tar.gz
13 # Source0-md5: 5215b83ff6debb9c5bae01cd21f4e6e0
14 URL: https://github.com/varnish/libvmod-var
15 BuildRequires: autoconf
16 BuildRequires: automake
17 BuildRequires: libtool
18 BuildRequires: python-docutils
19 BuildRequires: varnish-source
20 %{?with_tests:BuildRequires: varnish}
21 %requires_eq_to varnish varnish-source
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define vmoddir %(pkg-config --variable=vmoddir varnishapi || echo ERROR)
27 This VMOD implements basic variable in VCL. Well. It's more of an
28 association list with support for strings, ints and reals.
30 There are methods to get and set each type.
32 Global variables have a lifespan that extends across requests and
33 VCLs, for as long as the vmod is loaded. Non-globals are local to a
38 mv libvmod-%{vmod}-*/* .
47 VARNISHSRC=$(pkg-config --variable=srcdir varnishapi)
49 VARNISHSRC=$VARNISHSRC \
54 %{?with_tests:%{__make} check}
57 rm -rf $RPM_BUILD_ROOT
59 DESTDIR=$RPM_BUILD_ROOT
61 %{__rm} $RPM_BUILD_ROOT%{_libdir}/varnish/vmods/libvmod_%{vmod}.la
62 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libvmod-%{vmod}
63 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/vmod_example.3*
66 rm -rf $RPM_BUILD_ROOT
69 %defattr(644,root,root,755)
71 %attr(755,root,root) %{vmoddir}/libvmod_%{vmod}.so