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