Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
smokeping
> smokeping.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File smokeping.spec of Package smokeping (Revision 42)
Currently displaying revision
42
,
show latest
# norootforbuild %define home_dir %{_var}/lib/%{name} %define data_dir %{home_dir}/data %define run_dir %{_var}/run/%{name} %define cache_dir %{_var}/cache/%{name} %define conf_dir %{_sysconfdir}/%{name} # Name: smokeping Version: 2.6.9 Release: 1 # Group: System/Monitoring License: GPL v2 # BuildRoot: %{_tmppath}/%{name}-%{version}-build # for path ownership %if 0%{?suse_version} PreReq: permissions BuildRequires: apache2-prefork BuildRequires: perl Requires: http_daemon Requires: smtp_daemon %define apache_conf %{_sysconfdir}/apache2/vhosts.d/ %define cgi_base_dir /srv/www/smokeping %define cgi_dir /srv/www/smokeping/cgi-bin/ %define _htdocs_dir /srv/www/htdocs %define http_usr wwwrun %define http_grp www %else BuildRequires: httpd BuildRequires: rrdtool-perl BuildRequires: perl-CGI Requires: webserver Requires: smtpdaemon %define apache_conf %{_sysconfdir}/httpd/conf.d/ %define cgi_base_dir /var/www/smokeping %define cgi_dir /var/www/smokeping/cgi-bin/ %define _htdocs_dir /var/www/html %define http_usr apache %define http_grp apache %endif BuildRequires: perl-libwww-perl BuildRequires: perl-FCGI BuildRequires: perl-Digest-HMAC BuildRequires: perl-Config-Grammar BuildRequires: postfix Requires: perl-libwww-perl Requires: perl-FCGI Requires: perl-Digest-HMAC Requires: perl-Config-Grammar %if 0%{?suse_version} PreReq: %insserv_prereq %fillup_prereq %endif BuildRequires: rrdtool BuildRequires: curl #Requires: perl-Socket6 perl-Net-Telnet perl-Net-DNS #Requires: perl-IO-Socket-SSL perl-ldap perl-ldap-ssl Requires: bind-utils fping echoping curl rrdtool curl # URL: http://oss.oetiker.ch/smokeping/ Source0: http://oss.oetiker.ch/smokeping/pub/%{name}-%{version}.tar.gz Source1: %{name}.init Source2: %{name}.conf Source3: README.SuSE Source4: %{name}.init.rh Source5: %{name}.logrotate Source6: fping.permissions Source15: %{name}-rpmlintrc Patch0: smokeping-2.6.9_config.patch Patch1: smokeping-2.6.9_bin-config.patch # Summary: SmokePing is a network latency monitor %description SmokePing is a network latency monitor which works in a way that is similar to MRTG. It measures network latency to a configurable set of destinations on the network, and displays its findings in easy-to-read Web pages. SmokePing has special support for monitoring hosts with dynamic IP addresses. SmokePing uses RRDtool as its logging and graphing back-end, making the system very efficient. The presentation of the data on the Web is done through a CGI which creates graphs on demand. %prep %setup %patch0 %patch1 cp %{S:3} . %build [ -x configure ] && %configure --with-htdocs-dir=%{_htdocs_dir} --sysconfdir=%{_sysconfdir}/smokeping %{__make} %install %{__install} -Dd -m 0755 \ %{buildroot}%{_sbindir} %{buildroot}%{perl_vendorlib} \ %{buildroot}%{conf_dir} %{buildroot}%{home_dir} \ %{buildroot}%{data_dir} %{buildroot}%{cache_dir} \ %{buildroot}%{run_dir} %{buildroot}%{cgi_dir} %__make DESTDIR=%{buildroot} install # copy .dist files cd %{buildroot}%{_sysconfdir}/%{name} for file in `ls -1A *.dist` ; do cp $file `basename $file .dist` done # init script %if 0%{?suse_version} %{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{name} %{__install} -D -m 0755 %{S:6} %{buildroot}%{_sysconfdir}/permissions.d/fping %else %{__install} -D -m 0755 %{S:4} %{buildroot}%{_sysconfdir}/init.d/%{name} %endif %{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} # apache config %{__install} -D -m 0644 %{S:2} %{buildroot}%{apache_conf}/%{name}.conf # logrotate %{__install} -D -m 0644 %{S:5} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} # move cgi to own path capable for suexec mv %{buildroot}%{_bindir}/%{name}_cgi %{buildroot}%{cgi_dir}/smokeping.cgi # replace docroot path from suse based config %if 0%{!?suse_version} sed -i 's@srv@var@g' %{buildroot}%{apache_conf}/%{name}.conf %endif %clean %{__rm} -rf %{buildroot} %pre getent group %{name} >/dev/null || /usr/sbin/groupadd -r %{name} getent passwd %{name} >/dev/null || /usr/sbin/useradd -g %{name} -s /bin/false -r -c "user for %{name}" -d %{home_dir} %{name} exit 0 %post %if 0%{?suse_version} %if 0%{?suse_version} <= 1130 %run_permissions %else %set_permissions /usr/sbin/fping %endif %fillup_and_insserv %{name} %endif %preun %if 0%{?suse_version} %stop_on_removal %{name} %endif %postun %if 0%{?suse_version} %restart_on_update %{name} %{insserv_cleanup} %endif %files %defattr(-, root, root, 0755) %if 0%{?suse_version} %config %attr(0644,root,root) %{_sysconfdir}/permissions.d/fping %endif %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %attr(0644,root,%{name}) %{conf_dir}/* %config(noreplace) %attr(0640,root,%{name}) %{conf_dir}/smokeping_secrets* %config(noreplace) %attr(0644,root,%{name}) %{conf_dir}/examples/* %dir %attr(0751,root,%{name}) %{conf_dir} %dir %attr(0751,root,%{name}) %{conf_dir}/examples %config(noreplace) %{apache_conf}/%{name}.conf # %{_bindir}/smokeinfo %{_bindir}/%{name} %{_bindir}/tSmoke %dir %attr(-,%{name},%{name}) %{cgi_base_dir} %dir %attr(-,%{name},%{name}) %{cgi_dir} %attr(-,%{name},%{name}) %{cgi_dir}/smokeping.cgi %{_sysconfdir}/init.d/%{name} %{_sbindir}/rc%{name} # %{_prefix}/lib/*.pm %dir %{_prefix}/lib/Smokeping %dir %{_prefix}/lib/Smokeping/matchers %dir %{_prefix}/lib/Smokeping/probes %dir %{_prefix}/lib/Smokeping/sorters %{_prefix}/lib/Smokeping/*.pm %{_prefix}/lib/Smokeping/matchers/*.pm %{_prefix}/lib/Smokeping/probes/*.pm %{_prefix}/lib/Smokeping/sorters/*.pm %{_mandir}/man?/* # %doc CHANGES CONTRIBUTORS COPYRIGHT README TODO README.SuSE %doc doc/%{name}* # %dir %attr(0751,root,root) %{home_dir}/ %dir %attr(0751,%{name},root) %{data_dir}/ %dir %attr(0751,%{name},%{http_grp}) %{cache_dir}/ %dir %attr(0750,%{name},root) %{run_dir}/ %if 0%{!?suse_version} %dir %attr(0751,%{http_usr},root) %{_htdocs_dir} %endif %dir %attr(0751,%{http_usr},root) %{_htdocs_dir}/cropper %dir %attr(0751,%{http_usr},root) %{_htdocs_dir}/cropper/lib %defattr(-,%{http_usr},root) %{_htdocs_dir}/* %changelog