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