]>
Commit | Line | Data |
---|---|---|
8b4bbd11 | 1 | Summary: BBClone - A PHP based Web Counter on Steroids |
2 | Summary(pl): BBClone - bazowany na PHP licznik stron WWW | |
3 | Name: bbclone | |
4 | Version: 0.4.7 | |
5 | Release: 0.1 | |
6 | License: GPL 2 | |
7 | Group: Applications/WWW | |
8 | Source0: http://www.bbclone.de/download.php?get=%{name}-%{version}.tar.gz | |
9 | # Source0-md5: cc4141767818e75950f1dd5a56ec1201 | |
10 | Source1: %{name}.conf | |
11 | Source2: %{name}.txt | |
12 | Patch0: %{name}-security.patch | |
13 | URL: http://www.bbclone.de/ | |
14 | Requires: apache >= 1.3.33-2 | |
15 | Requires: apache(mod_access) | |
16 | Requires: apache(mod_alias) | |
17 | Requires: php >= 4.1.0 | |
18 | BuildArch: noarch | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define _appdir /usr/share/bbclone | |
22 | %define _sysconfdir /etc/bbclone | |
23 | %define _vardir /var/lib | |
24 | %define _apache1dir /etc/apache | |
25 | %define _apache2dir /etc/httpd | |
26 | ||
27 | %description | |
28 | BBclone is a web counter written in PHP and gives a detailed view | |
29 | of the visitors of your web site by displaying the nth last users | |
30 | (and the data they provided, like their IP, browser and so on) that | |
31 | visited the web site, not just showing a number of visitors. | |
32 | This is very handy for webmasters that want to see who is visiting | |
33 | their sites, what browser people use, where they came from etc. | |
34 | ||
35 | For each visitor, BBClone can display: | |
36 | * IP address, | |
37 | * hostname, | |
38 | * operating system, | |
39 | * robots, | |
40 | * browser, | |
41 | * referring URL (where do they come from), | |
42 | * visit date, | |
43 | * number of time the visitor has loaded the page, | |
44 | * number of visitor | |
45 | * the visited pages in the order someone viewed them | |
46 | * the last visited page | |
47 | * the search engine query that lead to your site (if applicable) | |
48 | * ranking of the most frequent countries, referrers, OS, browsers, | |
49 | robots, page views and hostnames | |
50 | ||
51 | %prep | |
52 | %setup -q -n %{name} | |
53 | %patch0 -p1 | |
54 | ||
55 | %install | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | install -d $RPM_BUILD_ROOT%{_sysconfdir} \ | |
58 | $RPM_BUILD_ROOT%{_vardir}/%{name} \ | |
59 | $RPM_BUILD_ROOT%{_appdir}/{doc,images,ip2ext,language,lib} | |
60 | ||
61 | cp -pR *.php $RPM_BUILD_ROOT%{_appdir} | |
62 | ||
63 | cp -pR images/* $RPM_BUILD_ROOT%{_appdir}/images | |
64 | cp -pR ip2ext/* $RPM_BUILD_ROOT%{_appdir}/ip2ext | |
65 | cp -pR language/* $RPM_BUILD_ROOT%{_appdir}/language | |
66 | cp -pR lib/* $RPM_BUILD_ROOT%{_appdir}/lib | |
67 | ||
68 | cp -pR conf/* $RPM_BUILD_ROOT%{_sysconfdir} | |
69 | cp -pR var/* $RPM_BUILD_ROOT%{_vardir}/%{name} | |
70 | cp -pR var/.htalock $RPM_BUILD_ROOT%{_vardir}/%{name} | |
71 | ||
72 | ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/conf | |
73 | ln -s %{_vardir}/%{name} $RPM_BUILD_ROOT%{_appdir}/var | |
74 | ||
75 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf | |
76 | install %{SOURCE2} $RPM_BUILD_ROOT%{_appdir}/example.txt | |
77 | ||
78 | %clean | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %post | |
82 | # apache1 | |
83 | if [ -d %{_apache1dir}/conf.d ]; then | |
84 | ln -sf %{_sysconfdir}/apache-%{name}.conf %{_apache1dir}/conf.d/99_%{name}.conf | |
85 | if [ -f /var/lock/subsys/apache ]; then | |
86 | /etc/rc.d/init.d/apache restart 1>&2 | |
87 | fi | |
88 | fi | |
89 | # apache2 | |
90 | if [ -d %{_apache2dir}/httpd.conf ]; then | |
91 | ln -sf %{_sysconfdir}/apache-%{name}.conf %{_apache2dir}/httpd.conf/99_%{name}.conf | |
92 | if [ -f /var/lock/subsys/httpd ]; then | |
93 | /etc/rc.d/init.d/httpd restart 1>&2 | |
94 | fi | |
95 | fi | |
96 | ||
97 | %postun | |
98 | if [ "$1" = "0" ]; then | |
99 | # apache1 | |
100 | if [ -d %{_apache1dir}/conf.d ]; then | |
101 | rm -f %{_apache1dir}/conf.d/99_%{name}.conf | |
102 | if [ -f /var/lock/subsys/apache ]; then | |
103 | /etc/rc.d/init.d/apache restart 1>&2 | |
104 | fi | |
105 | fi | |
106 | # apache2 | |
107 | if [ -d %{_apache2dir}/httpd.conf ]; then | |
108 | rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf | |
109 | if [ -f /var/lock/subsys/httpd ]; then | |
110 | /etc/rc.d/init.d/httpd restart 1>&2 | |
111 | fi | |
112 | fi | |
113 | fi | |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
117 | %doc doc/* | |
118 | %attr(750,root,http) %dir %{_sysconfdir} | |
119 | %attr(640,root,root) %config(noreplace) %{_sysconfdir}/apache-%{name}.conf | |
120 | %attr(640,root,http) %config(noreplace) %{_sysconfdir}/config.php | |
121 | %attr(660,root,http) %{_vardir}/%{name}/*.php | |
122 | %attr(660,root,http) %{_vardir}/%{name}/*.inc | |
123 | %attr(660,root,http) %{_vardir}/%{name}/.htalock | |
124 | ||
125 | %dir %{_appdir} | |
126 | %{_appdir}/*.php | |
127 | %{_appdir}/example.txt | |
128 | %{_appdir}/conf | |
129 | %{_appdir}/images | |
130 | %{_appdir}/ip2ext | |
131 | %{_appdir}/language | |
132 | %{_appdir}/lib | |
133 | %{_appdir}/var |