]> git.pld-linux.org Git - packages/flashpolicyd.git/blame - flashpolicyd.spec
- ruby-modules for socket.rb; rel 2
[packages/flashpolicyd.git] / flashpolicyd.spec
CommitLineData
49af1876 1%define plugin check_flashpolicyd
a1fd9b13
ER
2Summary: Daemon to serve Adobe Flash socket policy XML
3Name: flashpolicyd
4Version: 2.1
e4fbf4e4 5Release: 2
a1fd9b13 6License: GPL v2
49af1876 7Group: Networking/Daemons
a1fd9b13
ER
8URL: http://code.google.com/p/flashpolicyd/
9Source0: http://flashpolicyd.googlecode.com/files/%{name}-%{version}.tgz
10# Source0-md5: 0ad1ed0b130cf5850d77600fab90a7c2
7fbefc62 11Source1: %{name}.init
ee211994 12Patch0: %{name}-runas-user.patch
a1fd9b13
ER
13BuildRequires: rpmbuild(macros) >= 1.268
14Requires(post,preun): /sbin/chkconfig
15Requires: rc-scripts
e4fbf4e4 16Requires: ruby-modules
a1fd9b13
ER
17BuildArch: noarch
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
49af1876
ER
20%define pluginconf /etc/nagios/plugins
21%define plugindir %{_prefix}/lib/nagios/plugins
22
a1fd9b13
ER
23%description
24Daemon to serve Adobe Flash socket policy XML.
25
49af1876
ER
26%package -n nagios-plugin-%{plugin}
27Summary: Nagios plugin to check flashpolicyd
28Group: Networking
29Requires: nagios-common
30
31%description -n nagios-plugin-%{plugin}
32Nagios plugin to check flashpolicyd.
33
a1fd9b13
ER
34%prep
35%setup -q
ee211994 36%patch0 -p1
a1fd9b13
ER
37mv doc rdoc
38
49af1876
ER
39cat > nagios.cfg <<'EOF'
40# Usage:
41# %{plugin}
42define command {
43 command_name %{plugin}
44 command_line %{plugindir}/%{plugin} --host $HOSTADDRESS$ $ARG1$
45}
46EOF
47
a1fd9b13
ER
48%install
49rm -rf $RPM_BUILD_ROOT
49af1876 50install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sbindir}}
7fbefc62 51install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/flashpolicyd
a1fd9b13
ER
52install -p flashpolicyd.rb $RPM_BUILD_ROOT%{_sbindir}/flashpolicyd
53cp -a flashpolicy.xml $RPM_BUILD_ROOT%{_sysconfdir}/flashpolicy.xml
54
49af1876
ER
55install -d $RPM_BUILD_ROOT{%{pluginconf},%{plugindir}}
56cp -a nagios.cfg $RPM_BUILD_ROOT%{pluginconf}/%{plugin}.cfg
57install -p %{plugin}.rb $RPM_BUILD_ROOT%{plugindir}/%{plugin}
58
a1fd9b13
ER
59%clean
60rm -rf $RPM_BUILD_ROOT
61
62%post
63/sbin/chkconfig --add flashpolicyd
64%service flashpolicyd restart
65
66%preun
67if [ "$1" = 0 ] ; then
68 %service flashpolicyd stop
69 /sbin/chkconfig --del flashpolicyd
70fi
71
72%files
73%defattr(644,root,root,755)
49af1876 74%doc README rdoc
a1fd9b13
ER
75%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/flashpolicy.xml
76%attr(754,root,root) /etc/rc.d/init.d/flashpolicyd
77%attr(755,root,root) %{_sbindir}/flashpolicyd
49af1876
ER
78
79%files -n nagios-plugin-%{plugin}
80%defattr(644,root,root,755)
81%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{pluginconf}/%{plugin}.cfg
82%attr(755,root,root) %{plugindir}/%{plugin}
This page took 0.066259 seconds and 4 git commands to generate.