]> git.pld-linux.org Git - packages/apache1-mod_ometer.git/blob - apache1-mod_ometer.spec
- massive attack s/pld.org.pl/pld-linux.org/
[packages/apache1-mod_ometer.git] / apache1-mod_ometer.spec
1 %define         mod_name        ometer
2 %define         apxs            /usr/sbin/apxs
3 Summary:        Apache module: Web counter
4 Summary(pl):    Modu³ do Apache: licznik odwiedzin
5 Name:           apache-mod_%{mod_name}
6 Version:        1.2.0
7 Release:        1
8 License:        BSD
9 Group:          Networking/Daemons
10 Source0:        http://www.umich.edu/~umweb/downloads/mod_%{mod_name}-%{version}.tar.gz
11 Source1:        %{name}.conf
12 Source2:        http://www.umich.edu/~umweb/how-to/cgi-scripts/counter.html
13 Patch0:         %{name}-configure.patch
14 Patch1:         %{name}-symbols.patch
15 URL:            http://modometer.org/
16 BuildRequires:  %{apxs}
17 BuildRequires:  apache(EAPI)-devel
18 BuildRequires:  libjpeg-devel
19 Requires(post,preun):   %{apxs}
20 Requires(post,preun):   grep
21 Requires(preun):        fileutils
22 Requires:       apache(EAPI)
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
26 %define         _sysconfdir     /etc/httpd
27
28 %description
29 mod_ometer is a Web counter implemented as an Apache C module. It uses
30 gd to generate its images. gd has some built-in fonts, but you can use
31 any TrueType font you want for the counter. In addition to allowing
32 font choice, mod_ometer has all sorts of options for customizing the
33 size, width, and color of your counter, as well as the ability to
34 output the counter as JPEG or PNG.
35
36 %description -l pl
37 mod_ometer jest licznikiem odwiedzin dzia³aj±cym jako modu³ Apache'a
38 u¿ywaj±cym biblioteki gd do generowania obrazków. gd posiada kilka
39 wbudowanych fontów, lecz w liczniku mo¿na u¿yæ dowolnych fontów
40 TrueType. Poza mo¿liwo¶ci± wyboru kroju czcionki mod_ometer posiada
41 opcje umo¿liwiaj±ce zmianê szeroko¶ci, wysoko¶ci i kolorów licznika
42 oraz formatu obrazka: JPEG lub PNG.
43
44 %prep
45 %setup -q -n mod_%{mod_name}-%{version}
46 %patch0 -p1
47 %patch1 -p1
48 cp %SOURCE2 .
49
50 %build
51 export LDFLAGS=" "
52 %configure
53 %{__make}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
58
59 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
60 install %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/mod_%{mod_name}.conf
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %post
66 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
67 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_ometer.conf" /etc/httpd/httpd.conf; then
68         echo "Include /etc/httpd/mod_ometer.conf" >> /etc/httpd/httpd.conf
69 fi
70 if [ -f /var/lock/subsys/httpd ]; then
71         /etc/rc.d/init.d/httpd restart 1>&2
72 fi
73
74 %preun
75 if [ "$1" = "0" ]; then
76         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
77         umask 027
78         grep -v "^Include.*mod_ometer.conf" /etc/httpd/httpd.conf > \
79                 /etc/httpd/httpd.conf.tmp
80         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
81         if [ -f /var/lock/subsys/httpd ]; then
82                 /etc/rc.d/init.d/httpd restart 1>&2
83         fi
84 fi
85
86 %files
87 %defattr(644,root,root,755)
88 %doc *.html
89 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mod_ometer.conf
90 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.039412 seconds and 3 git commands to generate.