]> git.pld-linux.org Git - SPECS.git/blob - nagios-plugin-check_cups_queue.spec
SPECS updated Sat 31 Jul 20:27:02 CEST 2021
[SPECS.git] / nagios-plugin-check_cups_queue.spec
1 %define         plugin  check_cups_queue
2 Summary:        Nagios CUPS plugin
3 Name:           nagios-plugin-%{plugin}
4 Version:        0.1
5 Release:        0.1
6 License:        BSD
7 Group:          Networking
8 Source0:        http://dev.lusis.org/nagios/check_cups_queue.txt
9 # Source0-md5:  fe2dffc066980e2385d88755703f97fe
10 Patch0:         %{name}-force-locales.patch
11 URL:            http://dev.lusis.org/nagios/
12 Requires:       bc
13 Requires:       cups-clients
14 Requires:       mktemp
15 Requires:       nagios-core
16 BuildArch:      noarch
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         _sysconfdir     /etc/nagios/plugins
20 %define         plugindir       %{_prefix}/lib/nagios/plugins
21
22 %description
23 This plugin will check the status of a remote CUPS print queue. It
24 will provide the size of the queue and optionally the age of the queue
25
26 %prep
27 %setup -qcT
28 install %{SOURCE0} .
29 %patch0 -p0
30
31 cat > nagios.cfg <<'EOF'
32 # Usage:
33 # %{plugin}
34 define command {
35         command_name    %{plugin}
36         command_line    %{plugindir}/%{plugin} -H $HOSTADDRESS$
37 }
38 EOF
39
40 %install
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
43 install check_cups_queue.txt $RPM_BUILD_ROOT%{plugindir}/%{plugin}
44 cp -a nagios.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
45
46 %clean
47 rm -rf $RPM_BUILD_ROOT
48
49 %files
50 %defattr(644,root,root,755)
51 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
52 %attr(755,root,root) %{plugindir}/%{plugin}
This page took 0.220639 seconds and 3 git commands to generate.