Merge pull request #3339 from jkohen/patch-1
[collectd.git] / contrib / aix / collectd.spec
1
2 %define name    collectd
3 %define version 4.10.1
4 %define release 1
5
6 Name:           %{name}
7 Summary:        Statistics collection daemon for filling RRD files.
8 Version:        %{version}
9 Release:        %{release}
10 #Source:         http://collectd.org/files/%{name}-%{version}.tar.gz
11 Source0:        %{name}-%{version}.tar.gz
12 Group:          System Environment/Daemons
13 BuildRoot:      %{_tmppath}/%{name}-%{version}-buildroot
14 License:        GPL
15 BuildPrereq:    rrdtool-devel,net-snmp-devel
16 Requires:       rrdtool,net-snmp
17 Packager:       Aurelien Reynaud <collectd@wattapower.net>
18 Vendor:         collectd development team <collectd@verplant.org>
19
20 %description
21 collectd is a small daemon which collects system information periodically and
22 provides mechanisms to monitor and store the values in a variety of ways. It
23 is written in C for performance. Since the daemon doesn't need to startup
24 every time it wants to update the values it's very fast and easy on the
25 system. Also, the statistics are very fine grained since the files are updated
26 every 10 seconds.
27
28 %prep
29 %setup
30
31 %build
32 # The RM variable in the RPM environment conflicts with that of the build environment,
33 # at least when building on AIX 6.1. This is definitely a bug in one of the tools but
34 # for now we work around it by unsetting the variable below.
35 [ -n "$RM" ] && unset RM
36 ./configure LDFLAGS="-Wl,-brtl" --prefix=/opt/freeware --mandir=/opt/freeware/man --disable-dns --with-libnetsnmp=/opt/freeware/bin/net-snmp-config
37 make
38
39 %install
40 make install DESTDIR=$RPM_BUILD_ROOT
41 mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/%{name}
42 mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run
43 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
44 cp contrib/aix/init.d-collectd $RPM_BUILD_ROOT/etc/rc.d/init.d/collectd
45
46 %clean
47 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
48
49 %files
50 %defattr(-,root,system)
51 %doc AUTHORS COPYING ChangeLog INSTALL NEWS README
52 %config(noreplace) %attr(0644,root,system) %{_sysconfdir}/collectd.conf
53 %attr(0755,root,system) /etc/rc.d/init.d/collectd
54 %attr(0755,root,system) %{_sbindir}/collectd
55 %attr(0755,root,system) %{_bindir}/collectd-nagios
56 %attr(0755,root,system) %{_sbindir}/collectdmon
57 %attr(0644,root,system) %{_mandir}/man1/*
58 %attr(0644,root,system) %{_mandir}/man5/*
59
60 # client
61 %attr(0644,root,system) %{_includedir}/%{name}/client.h
62 %attr(0644,root,system) %{_includedir}/%{name}/lcc_features.h
63
64 %attr(0644,root,system) %{_libdir}/libcollectdclient.*
65 %attr(0644,root,system) %{_libdir}/pkgconfig/libcollectdclient.pc
66
67 %attr(0444,root,system) %{_libdir}/%{name}/*.so
68 %attr(0444,root,system) %{_libdir}/%{name}/*.a
69 %attr(0444,root,system) %{_libdir}/%{name}/*.la
70
71 %attr(0644,root,system) %{_datadir}/%{name}/types.db
72
73 %dir %{_localstatedir}/lib/%{name}
74 %dir %{_localstatedir}/run
75