]> git.pld-linux.org Git - packages/bbclone.git/blame - bbclone.spec
- first version
[packages/bbclone.git] / bbclone.spec
CommitLineData
8b4bbd11 1Summary: BBClone - A PHP based Web Counter on Steroids
2Summary(pl): BBClone - bazowany na PHP licznik stron WWW
3Name: bbclone
4Version: 0.4.7
5Release: 0.1
6License: GPL 2
7Group: Applications/WWW
8Source0: http://www.bbclone.de/download.php?get=%{name}-%{version}.tar.gz
9# Source0-md5: cc4141767818e75950f1dd5a56ec1201
10Source1: %{name}.conf
11Source2: %{name}.txt
12Patch0: %{name}-security.patch
13URL: http://www.bbclone.de/
14Requires: apache >= 1.3.33-2
15Requires: apache(mod_access)
16Requires: apache(mod_alias)
17Requires: php >= 4.1.0
18BuildArch: noarch
19BuildRoot: %{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
28BBclone is a web counter written in PHP and gives a detailed view
29of 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
31visited the web site, not just showing a number of visitors.
32This is very handy for webmasters that want to see who is visiting
33their sites, what browser people use, where they came from etc.
34
35For 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,
49robots, page views and hostnames
50
51%prep
52%setup -q -n %{name}
53%patch0 -p1
54
55%install
56rm -rf $RPM_BUILD_ROOT
57install -d $RPM_BUILD_ROOT%{_sysconfdir} \
58 $RPM_BUILD_ROOT%{_vardir}/%{name} \
59 $RPM_BUILD_ROOT%{_appdir}/{doc,images,ip2ext,language,lib}
60
61cp -pR *.php $RPM_BUILD_ROOT%{_appdir}
62
63cp -pR images/* $RPM_BUILD_ROOT%{_appdir}/images
64cp -pR ip2ext/* $RPM_BUILD_ROOT%{_appdir}/ip2ext
65cp -pR language/* $RPM_BUILD_ROOT%{_appdir}/language
66cp -pR lib/* $RPM_BUILD_ROOT%{_appdir}/lib
67
68cp -pR conf/* $RPM_BUILD_ROOT%{_sysconfdir}
69cp -pR var/* $RPM_BUILD_ROOT%{_vardir}/%{name}
70cp -pR var/.htalock $RPM_BUILD_ROOT%{_vardir}/%{name}
71
72ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/conf
73ln -s %{_vardir}/%{name} $RPM_BUILD_ROOT%{_appdir}/var
74
75install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache-%{name}.conf
76install %{SOURCE2} $RPM_BUILD_ROOT%{_appdir}/example.txt
77
78%clean
79rm -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
98if [ "$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
113fi
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
This page took 0.100488 seconds and 4 git commands to generate.