]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without cap # Enable support for the Linux Capabilities (default: disabled) | |
4 | ||
5 | Summary: A backend data gatherer for Cacti | |
6 | Summary(pl.UTF-8): Backend gromadzący dane dla Cacti | |
7 | Name: cacti-spine | |
8 | Version: 1.1.30 | |
9 | Release: 1 | |
10 | License: GPL | |
11 | Group: Daemons | |
12 | Source0: http://www.cacti.net/downloads/spine/%{name}-%{version}.tar.gz | |
13 | # Source0-md5: 48f31721dee36adf393511b955808bc2 | |
14 | Patch0: %{name}-paths.patch | |
15 | # Official patches http://www.cacti.net/spine_download_patches.php | |
16 | URL: http://www.cacti.net/ | |
17 | BuildRequires: autoconf | |
18 | BuildRequires: automake | |
19 | %{?with_cap:BuildRequires: libcap-devel} | |
20 | BuildRequires: libtool | |
21 | BuildRequires: mysql-devel | |
22 | BuildRequires: net-snmp-devel | |
23 | BuildRequires: openssl-devel | |
24 | BuildRequires: rpmbuild(macros) >= 1.502 | |
25 | BuildRequires: zlib-devel | |
26 | %requires_eq net-snmp-libs | |
27 | Requires: cacti | |
28 | Obsoletes: cacti-cactid | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %define _webapps /etc/webapps | |
32 | %define _webapp cacti | |
33 | %define _sysconfdir %{_webapps}/%{_webapp} | |
34 | %define _bindir %{_sbindir} | |
35 | ||
36 | %description | |
37 | A backend data gatherer for Cacti. This package represents the future | |
38 | replacement for Cacti's cmd.php. It is almost 100% compatible with the | |
39 | legacy cmd.php processor. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | Backend gromadzący dane dla Cacti. Ten pakiet reprezentuje przyszły | |
43 | zamiennik cmd.php z Cacti. Jest prawie w 100% kompatybilny ze starym | |
44 | procesorem cmd.php. | |
45 | ||
46 | %prep | |
47 | %setup -q | |
48 | %patch0 -p1 | |
49 | ||
50 | %build | |
51 | %{__libtoolize} | |
52 | %{__aclocal} -I m4 | |
53 | %{__automake} | |
54 | %{__autoconf} | |
55 | chmod +x ./configure | |
56 | %configure \ | |
57 | --with-results-buffer=4096 \ | |
58 | --with-mysql \ | |
59 | %{__enable_disable cap lcap} \ | |
60 | --with-snmp=%{_prefix} | |
61 | %{__make} | |
62 | ||
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | %{__make} install \ | |
66 | DESTDIR=$RPM_BUILD_ROOT | |
67 | ||
68 | mv $RPM_BUILD_ROOT%{_sbindir}/{spine,cacti-poller-spine} | |
69 | mv $RPM_BUILD_ROOT%{_sysconfdir}/spine.conf{.dist,} | |
70 | ||
71 | %clean | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
74 | %files | |
75 | %defattr(644,root,root,755) | |
76 | %doc README.md | |
77 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/spine.conf | |
78 | %attr(755,root,root) %{_sbindir}/cacti-poller-spine | |
79 | %{_mandir}/man1/spine.1* |