]>
Commit | Line | Data |
---|---|---|
24c7684c ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
5 | %define vmod cookie | |
6 | Summary: Cookie VMOD for Varnish | |
7 | Name: varnish-libvmod-%{vmod} | |
8 | Version: 0.1 | |
9 | Release: 1 | |
10 | License: BSD | |
11 | Group: Daemons | |
12 | Source0: https://github.com/lkarsten/libvmod-cookie/archive/3.0/%{vmod}-%{version}.tar.gz | |
13 | # Source0-md5: 2c5ad49c59e9f9494d4518c1ea42a562 | |
14 | URL: https://github.com/lkarsten/libvmod-cookie | |
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 | Cookie VMOD for Varnish. | |
28 | ||
29 | %prep | |
30 | %setup -qc | |
6d73b04b | 31 | mv libvmod-%{vmod}-*/* . |
24c7684c ER |
32 | |
33 | %build | |
34 | %{__aclocal} -I m4 | |
35 | %{__libtoolize} | |
36 | %{__autoheader} | |
37 | %{__automake} | |
38 | %{__autoconf} | |
39 | ||
40 | VARNISHSRC=$(pkg-config --variable=srcdir varnishapi) | |
41 | %configure \ | |
42 | VARNISHSRC=$VARNISHSRC \ | |
6bd19f07 ER |
43 | VMODDIR=%{vmoddir} \ |
44 | --disable-static | |
24c7684c ER |
45 | |
46 | %{__make} | |
47 | %{?with_tests:%{__make} check} | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | %{__make} install \ | |
52 | DESTDIR=$RPM_BUILD_ROOT | |
53 | ||
6d73b04b ER |
54 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/varnish/vmods/libvmod_%{vmod}.la |
55 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libvmod-%{vmod} | |
24c7684c ER |
56 | |
57 | %clean | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %files | |
61 | %defattr(644,root,root,755) | |
62 | %doc README.rst LICENSE | |
6d73b04b ER |
63 | %attr(755,root,root) %{vmoddir}/libvmod_%{vmod}.so |
64 | %{_mandir}/man3/vmod_%{vmod}.3* |