]>
Commit | Line | Data |
---|---|---|
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.UTF-8): Moduł do Apache: licznik odwiedzin | |
7 | Name: apache1-mod_%{mod_name} | |
8 | Version: 1.2.0 | |
9 | Release: 0.4 | |
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: apache1-devel >= 1.3.39 | |
21 | BuildRequires: gd-devel | |
22 | BuildRequires: libjpeg-devel | |
23 | BuildRequires: rpmbuild(macros) >= 1.268 | |
24 | Requires: apache1(EAPI) | |
25 | Obsoletes: apache-mod_ometer <= 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.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 | |
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 | %service -q apache restart | |
75 | ||
76 | %postun | |
77 | if [ "$1" = "0" ]; then | |
78 | %service -q apache restart | |
79 | fi | |
80 | ||
81 | %files | |
82 | %defattr(644,root,root,755) | |
83 | %doc *.html | |
84 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf | |
85 | %attr(755,root,root) %{_pkglibdir}/* |