]>
Commit | Line | Data |
---|---|---|
ab2a64b6 ER |
1 | Summary: CheckPing |
2 | Name: checkping | |
3 | Version: 0.4 | |
4 | Release: 1 | |
5 | License: GPL | |
6 | Group: Applications/WWW | |
7 | Source0: http://dl.sourceforge.net/checkping/%{name}-%{version}.tar.gz | |
8 | # Source0-md5: 79b61771893779a47c70de4814e6d66f | |
9 | URL: http://sourceforge.net/projects/checkping/ | |
10 | Requires: php(gd) | |
11 | Requires: php(mysql) | |
12 | BuildArch: noarch | |
13 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
14 | ||
15 | %define _sysconfdir /etc/%{name} | |
16 | %define _appdir %{_datadir}/%{name} | |
17 | ||
18 | %description | |
19 | Keep your eye on unlimited number of machines using CheckPing. | |
20 | Timeouts, ping times, live graphs and notification via | |
21 | mail/SMS/pager/etc. | |
22 | ||
23 | %prep | |
24 | %setup -q | |
25 | ||
26 | %{__sed} -i -e " | |
27 | s,HOMEDIR='/path/to/checkping-0.4',HOMEDIR='%{_sysconfdir}', | |
28 | s,DBUSER='root',DBUSER='mysql', | |
29 | s,DBPASS='mysecretpass',DBPASS='', | |
30 | s,ERRORMAIL='cal6@spam.ee',ERRORMAIL='root@localhost', | |
31 | " checkping.sh | |
32 | ||
33 | %{__sed} -i -e " | |
34 | s/'root'/'mysql'/ | |
35 | s/'mysecretpass'/''/ | |
36 | " connect.php | |
37 | ||
38 | %{__sed} -n '3,/^##/p' checkping.sh > README | |
39 | ||
40 | %install | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir},%{_appdir}} | |
43 | install checkping.sh $RPM_BUILD_ROOT%{_bindir}/checkping | |
44 | touch $RPM_BUILD_ROOT%{_sysconfdir}/iplist.txt | |
45 | cp -a *.php $RPM_BUILD_ROOT%{_appdir} | |
46 | ||
47 | %clean | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
50 | %files | |
51 | %defattr(644,root,root,755) | |
52 | %doc README | |
53 | %attr(755,root,root) %{_bindir}/checkping | |
54 | %dir %{_sysconfdir} | |
55 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/iplist.txt | |
56 | %{_appdir} |