]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static library | |
4 | %bcond_with tests # perform "make test" | |
5 | # | |
6 | %include /usr/lib/rpm/macros.perl | |
7 | %define apxs /usr/sbin/apxs | |
8 | %define pdir libapreq2 | |
9 | Summary: Apache Request Library | |
10 | Summary(pl.UTF-8): Biblioteka żądań Apache | |
11 | Name: libapreq2 | |
12 | Version: 2.09 | |
13 | Release: 5 | |
14 | License: Apache 2.0 | |
15 | Group: Libraries | |
16 | #Source0: http://www.apache.org/dist/httpd/libapreq/%{name}-%{version}.tar.gz | |
17 | Source0: http://people.apache.org/~pgollucci/apreq2/%{name}-%{version}.tar.gz | |
18 | # Source0-md5: 3cd98755da8a8431ef35a47461ad67d7 | |
19 | Source1: apache-mod_apreq2.conf | |
20 | URL: http://httpd.apache.org/apreq/ | |
21 | BuildRequires: %{apxs} | |
22 | BuildRequires: apache-base >= 2.0.46 | |
23 | BuildRequires: apache-devel >= 2.0.46 | |
24 | BuildRequires: apache-mod_perl-devel >= 1:2 | |
25 | BuildRequires: apr-devel >= 1.0.0 | |
26 | BuildRequires: autoconf >= 2.53 | |
27 | BuildRequires: automake | |
28 | BuildRequires: libtool | |
29 | BuildRequires: perl-ExtUtils-XSBuilder >= 0.23 | |
30 | %if %{with tests} | |
31 | BuildRequires: apache-mod_mime | |
32 | BuildRequires: perl-libwww | |
33 | %endif | |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %define pkgconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d | |
37 | %define pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
38 | ||
39 | %description | |
40 | libapreq is a safe, standards-compliant, high-performance library used | |
41 | for parsing HTTP cookies, query-strings and POST data. | |
42 | ||
43 | Version 2 of libapreq is an improved codebase designed around APR and | |
44 | Apache-2's input filter API. | |
45 | ||
46 | %description -l pl.UTF-8 | |
47 | libapreq to bezpieczna, zgodna ze standardami, wysoko wydajna | |
48 | biblioteka służąca do przetwarzania ciasteczek HTTP, łańcuchów zapytań | |
49 | oraz danych POST. | |
50 | ||
51 | Wersja 2 libapreq to ulepszony kod opracowany na bazie APR i API | |
52 | filtra wejściowego Apache 2. | |
53 | ||
54 | %package devel | |
55 | Summary: libapreq2 header files | |
56 | Summary(pl.UTF-8): Pliki nagłówkowe libapreq2 | |
57 | Group: Development/Libraries | |
58 | Requires: %{name} = %{version}-%{release} | |
59 | Requires: apache-devel >= 2.0 | |
60 | ||
61 | %description devel | |
62 | libapreq2 header files. | |
63 | ||
64 | %description devel -l pl.UTF-8 | |
65 | Pliki nagłówkowe biblioteki libapreq2. | |
66 | ||
67 | %package static | |
68 | Summary: libapreq2 static library | |
69 | Summary(pl.UTF-8): Statyczna biblioteka libapreq2 | |
70 | Group: Development/Libraries | |
71 | Requires: %{name}-devel = %{version}-%{release} | |
72 | ||
73 | %description static | |
74 | Static version of libapreq2 library. | |
75 | ||
76 | %description static -l pl.UTF-8 | |
77 | Statyczna wersja biblioteki libapreq2. | |
78 | ||
79 | %package -n perl-%{name} | |
80 | Summary: Perl APIs for libapreq2 - Apache2::Request and Apache2::Cookie | |
81 | Summary(pl.UTF-8): Perlowe API dla libapreq2 - Apache2::Request i Apache2::Cookie | |
82 | Group: Development/Languages/Perl | |
83 | ||
84 | %description -n perl-%{name} | |
85 | Perl APIs for libapreq2 - Apache2::Request and Apache2::Cookie. | |
86 | ||
87 | %description -n perl-%{name} -l pl.UTF-8 | |
88 | Perlowe API dla libapreq2 - Apache2::Request i Apache2::Cookie. | |
89 | ||
90 | %package -n apache-mod_apreq2 | |
91 | Summary: Apache module mod_apreq2 | |
92 | Summary(pl.UTF-8): Moduł serwera Apache mod_apreq2 | |
93 | Group: Networking/Daemons | |
94 | Requires: apache(modules-api) = %apache_modules_api | |
95 | Obsoletes: apache-mod_libapreq2 | |
96 | ||
97 | %description -n apache-mod_apreq2 | |
98 | Apache module mod_apreq2. | |
99 | ||
100 | %description -n apache-mod_apreq2 -l pl.UTF-8 | |
101 | Moduł mod_apreq2 do serwera Apache. | |
102 | ||
103 | %prep | |
104 | %setup -q | |
105 | ||
106 | %build | |
107 | %{__libtoolize} | |
108 | %{__aclocal} | |
109 | %{__autoheader} | |
110 | %{__autoconf} | |
111 | %{__automake} | |
112 | %configure \ | |
113 | --with-mm-opts="INSTALLDIRS=vendor" \ | |
114 | --enable-perl-glue \ | |
115 | --with-apache2-apxs=%{apxs} \ | |
116 | %{!?with_static_libs:--disable-static} | |
117 | ||
118 | %{__make} | |
119 | ||
120 | %{?with_tests:%{__make} test} | |
121 | ||
122 | %install | |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
125 | %{__make} install \ | |
126 | DESTDIR=$RPM_BUILD_ROOT | |
127 | ||
128 | rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/APR/{Request.pod,Request/*.pod} | |
129 | rm -f $RPM_BUILD_ROOT%{pkglibdir}/mod_apreq2.{a,la} | |
130 | install -D %{SOURCE1} $RPM_BUILD_ROOT%{pkgconfdir}/76_mod_apreq2.conf | |
131 | ||
132 | %clean | |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
135 | %post -p /sbin/ldconfig | |
136 | %postun -p /sbin/ldconfig | |
137 | ||
138 | %post -n apache-mod_apreq2 | |
139 | %service -q httpd restart | |
140 | ||
141 | %preun -n apache-mod_apreq2 | |
142 | if [ "$1" = "0" ]; then | |
143 | %service -q httpd restart | |
144 | fi | |
145 | ||
146 | %files | |
147 | %defattr(644,root,root,755) | |
148 | %doc CHANGES README | |
149 | %attr(755,root,root) %{_libdir}/libapreq2.so.*.* | |
150 | ||
151 | %files devel | |
152 | %defattr(644,root,root,755) | |
153 | %attr(755,root,root) %{_libdir}/libapreq2.so | |
154 | %{_libdir}/libapreq2.la | |
155 | %{_includedir}/apreq2 | |
156 | %attr(755,root,root) %{_bindir}/apreq2-config | |
157 | %dir %{_includedir}/apache/apreq2 | |
158 | %{_includedir}/apache/apreq2/apreq_module_apache2.h | |
159 | ||
160 | %if %{with static_libs} | |
161 | %files static | |
162 | %defattr(644,root,root,755) | |
163 | %{_libdir}/libapreq2.a | |
164 | %endif | |
165 | ||
166 | %files -n perl-%{name} | |
167 | %defattr(644,root,root,755) | |
168 | %{perl_vendorarch}/Apache2/*.pm | |
169 | %{perl_vendorarch}/APR/*.pm | |
170 | %dir %{perl_vendorarch}/APR/Request | |
171 | %{perl_vendorarch}/APR/Request/*.pm | |
172 | %dir %{perl_vendorarch}/auto/APR/Request | |
173 | %dir %{perl_vendorarch}/auto/APR/Request/* | |
174 | %{perl_vendorarch}/auto/APR/Request/*/*.bs | |
175 | %attr(755,root,root) %{perl_vendorarch}/auto/APR/Request/*/*.so | |
176 | ||
177 | # TODO: generate these manually; Makefile.PL (and overall logic) is broken | |
178 | %{_mandir}/man3/Apache* | |
179 | %{_mandir}/man3/APR* | |
180 | ||
181 | %files -n apache-mod_apreq2 | |
182 | %defattr(644,root,root,755) | |
183 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{pkgconfdir}/*_mod_apreq2.conf | |
184 | %attr(755,root,root) %{pkglibdir}/mod_apreq2.so |