]>
Commit | Line | Data |
---|---|---|
8de12d0f ER |
1 | # TODO |
2 | # - doesn't build. see rev 1.11 | |
237fbaa3 | 3 | %define mod_name ometer |
d106fbad | 4 | %define apxs /usr/sbin/apxs1 |
237fbaa3 | 5 | Summary: Apache module: Web counter |
9b2d8210 | 6 | Summary(pl.UTF-8): Moduł do Apache: licznik odwiedzin |
d106fbad | 7 | Name: apache1-mod_%{mod_name} |
237fbaa3 | 8 | Version: 1.2.0 |
3a469f95 | 9 | Release: 0.3 |
a6822568 | 10 | License: BSD |
237fbaa3 TO |
11 | Group: Networking/Daemons |
12 | Source0: http://www.umich.edu/~umweb/downloads/mod_%{mod_name}-%{version}.tar.gz | |
376f0c64 | 13 | # Source0-md5: 50b7b641409abd5d1a57077422fd444e |
c3f0024f TO |
14 | Source1: %{name}.conf |
15 | Source2: http://www.umich.edu/~umweb/how-to/cgi-scripts/counter.html | |
018ade06 | 16 | # Source2-md5: 6d6f56cec95c5fa2a28caf0ecb86b034 |
237fbaa3 | 17 | Patch0: %{name}-configure.patch |
c3f0024f | 18 | Patch1: %{name}-symbols.patch |
237fbaa3 | 19 | URL: http://modometer.org/ |
0b9c0320 | 20 | BuildRequires: apache1-devel >= 1.3.39 |
9bd9cf9d | 21 | BuildRequires: gd-devel |
e4527271 | 22 | BuildRequires: libjpeg-devel |
1db1fc49 | 23 | BuildRequires: rpmbuild(macros) >= 1.268 |
8de12d0f | 24 | Requires: apache1 >= 1.3.33-2 |
1db1fc49 | 25 | Obsoletes: apache-mod_ometer <= 1.2.0 |
237fbaa3 TO |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
8de12d0f ER |
28 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
29 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
237fbaa3 TO |
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 | ||
2a350c4c JR |
39 | %description -l pl.UTF-8 |
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 | |
237fbaa3 TO |
45 | oraz formatu obrazka: JPEG lub PNG. |
46 | ||
47 | %prep | |
48 | %setup -q -n mod_%{mod_name}-%{version} | |
49 | %patch0 -p1 | |
c3f0024f | 50 | %patch1 -p1 |
acbdf116 | 51 | cp %{SOURCE2} . |
237fbaa3 TO |
52 | |
53 | %build | |
54 | export LDFLAGS=" " | |
8de12d0f | 55 | |
d106fbad | 56 | %configure \ |
8de12d0f ER |
57 | apxspath=%{apxs} \ |
58 | found_apache=yes \ | |
59 | ||
d106fbad | 60 | %{__make} \ |
8de12d0f | 61 | CFLAGS="%{rpmcflags} -I$(%{apxs} -q INCLUDEDIR CFLAGS)" |
237fbaa3 TO |
62 | |
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
8de12d0f | 65 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} |
237fbaa3 TO |
66 | |
67 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
8de12d0f | 68 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf |
237fbaa3 TO |
69 | |
70 | %clean | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %post | |
1db1fc49 | 74 | %service -q apache restart |
237fbaa3 | 75 | |
3a469f95 | 76 | %postun |
237fbaa3 | 77 | if [ "$1" = "0" ]; then |
1db1fc49 | 78 | %service -q apache restart |
237fbaa3 TO |
79 | fi |
80 | ||
81 | %files | |
82 | %defattr(644,root,root,755) | |
c3f0024f | 83 | %doc *.html |
e4527271 | 84 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf |
237fbaa3 | 85 | %attr(755,root,root) %{_pkglibdir}/* |