3 %bcond_without tests # build without tests
5 %define vmod crashhandler
6 Summary: Crash handler for Varnish
7 Name: varnish-libvmod-%{vmod}
12 Source0: https://github.com/varnish/libvmod-crashhandler/archive/%{version}/%{vmod}-%{version}.tar.gz
13 # Source0-md5: 4e0541f405565b2c91f2bc7c1393e1e3
14 URL: https://github.com/varnish/libvmod-crashhandler
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 Varnish 3.0 Module that catches segfaults (SIGSEGV) and issues the
28 regular panic code to get a back trace.
30 Also includes a function to trigger a segfault forcibly. Use at your
35 mv libvmod-%{vmod}-*/* .
44 VARNISHSRC=$(pkg-config --variable=srcdir varnishapi)
46 VARNISHSRC=$VARNISHSRC \
51 %{?with_tests:%{__make} check}
54 rm -rf $RPM_BUILD_ROOT
56 DESTDIR=$RPM_BUILD_ROOT
58 %{__rm} $RPM_BUILD_ROOT%{_libdir}/varnish/vmods/libvmod_%{vmod}.la
61 rm -rf $RPM_BUILD_ROOT
64 %defattr(644,root,root,755)
65 %doc README.rst LICENSE
66 %attr(755,root,root) %{vmoddir}/libvmod_%{vmod}.so
67 %{_mandir}/man3/vmod_%{vmod}.3*