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