]> git.pld-linux.org Git - packages/varnish-libvmod-var.git/blob - varnish-libvmod-var.spec
new version 0.1
[packages/varnish-libvmod-var.git] / varnish-libvmod-var.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define vmod    var
6 Summary:        Variable support VMOD
7 Name:           varnish-libvmod-%{vmod}
8 Version:        0.1
9 Release:        0.1
10 License:        BSD
11 Group:          Daemons
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)
23
24 %define         vmoddir %(pkg-config --variable=vmoddir varnishapi || echo ERROR)
25
26 %description
27 This VMOD implements basic variable in VCL. Well. It's more of an
28 association list with support for strings, ints and reals.
29
30 There are methods to get and set each type.
31
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
34 single request.
35
36 %prep
37 %setup -qc
38 mv libvmod-%{vmod}-*/* .
39
40 %build
41 %{__aclocal} -I m4
42 %{__libtoolize}
43 %{__autoheader}
44 %{__automake}
45 %{__autoconf}
46
47 VARNISHSRC=$(pkg-config --variable=srcdir varnishapi)
48 %configure \
49         VARNISHSRC=$VARNISHSRC \
50         VMODDIR=%{vmoddir} \
51         --disable-static
52
53 %{__make}
54 %{?with_tests:%{__make} check}
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 %{__make} install \
59         DESTDIR=$RPM_BUILD_ROOT
60
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*
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %files
69 %defattr(644,root,root,755)
70 %doc README LICENSE
71 %attr(755,root,root) %{vmoddir}/libvmod_%{vmod}.so
This page took 0.059153 seconds and 3 git commands to generate.