]> git.pld-linux.org Git - packages/cacti-template-haproxy.git/blob - cacti-template-haproxy.spec
200463901a17b15d1086adaed41c3fdf155a5f5e
[packages/cacti-template-haproxy.git] / cacti-template-haproxy.spec
1 # TODO
2 # - enable agent in snmpd
3 %define         plugin haproxy
4 %include        /usr/lib/rpm/macros.perl
5 Summary:        Template for Cacti - HAProxy
6 Name:           cacti-template-%{plugin}
7 # version from haproxy.pl
8 Version:        0.30
9 Release:        0.2
10 License:        GPL v2
11 Group:          Applications/WWW
12 # the templates were last modified Oct 25, 2010, there's no point using newer version tarball
13 Source0:        http://www.haproxy.org/download/1.6/src/haproxy-1.6.3.tar.gz
14 # Source0-md5:  3362d1e268c78155c2474cb73e7f03f9
15 Patch0:         bang.patch
16 URL:            https://github.com/haproxy/haproxy/tree/master/contrib/netsnmp-perl
17 BuildRequires:  rpm-perlprov >= 4.1-13
18 BuildRequires:  rpmbuild(macros) >= 1.554
19 Requires:       cacti >= 0.8.7e-8
20 BuildArch:      noarch
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         snmpdconfdir    /etc/snmp
24 %define         cactidir                /usr/share/cacti
25 %define         resourcedir             %{cactidir}/resource
26 %define         scriptsdir              %{cactidir}/scripts
27 %define         _libdir                 %{_prefix}/lib
28
29 %description
30 Cacti snmp-query definition for backends.
31
32 %package -n net-snmp-agent-%{plugin}
33 Summary:        SNMPd agent to provide HAProxy statistics
34 Group:          Networking/Daemons
35 Requires:       net-snmp
36
37 %description -n net-snmp-agent-%{plugin}
38 SNMPd agent to provide HAProxy statistics
39
40 %prep
41 %setup -qc
42 mv haproxy-*/contrib/netsnmp-perl/* .
43 %patch0 -p1
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{resourcedir},%{scriptsdir},%{snmpdconfdir},%{_libdir}}
48 cp -p *.xml $RPM_BUILD_ROOT%{resourcedir}
49 install -p haproxy.pl $RPM_BUILD_ROOT%{_libdir}/snmpd-agent-haproxy
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
55 %cacti_import_template %{resourcedir}/cacti_data_query_haproxy_backends.xml
56 %cacti_import_template %{resourcedir}/cacti_data_query_haproxy_frontends.xml
57 %cacti_import_template %{resourcedir}/haproxy_backend.xml
58 %cacti_import_template %{resourcedir}/haproxy_frontend.xml
59 %cacti_import_template %{resourcedir}/haproxy_socket.xml
60
61 %files
62 %defattr(644,root,root,755)
63 %doc README
64 %{resourcedir}/cacti_data_query_haproxy_backends.xml
65 %{resourcedir}/cacti_data_query_haproxy_frontends.xml
66 %{resourcedir}/haproxy_backend.xml
67 %{resourcedir}/haproxy_frontend.xml
68 %{resourcedir}/haproxy_socket.xml
69
70 %files -n net-snmp-agent-%{plugin}
71 %defattr(644,root,root,755)
72 %attr(755,root,root) %{_libdir}/snmpd-agent-haproxy
This page took 0.100837 seconds and 2 git commands to generate.