3 %bcond_without static_libs # don't build static library
4 %bcond_with tests # perform "make test"
6 %define apxs /usr/sbin/apxs
8 Summary: Apache Request Library
9 Summary(pl.UTF-8): Biblioteka żądań Apache
15 Source0: http://www.apache.org/dist/httpd/libapreq/%{name}-%{version}.tar.gz
16 # Source0-md5: c11fb0861aa84dcc6cd0f0798b045eee
17 Source1: apache-mod_apreq2.conf
19 URL: http://httpd.apache.org/apreq/
20 BuildRequires: %{apxs}
21 BuildRequires: apache-base >= 2.0.46
22 BuildRequires: apache-devel >= 2.0.46
23 BuildRequires: apache-mod_perl-devel >= 1:2
24 BuildRequires: apr-devel >= 1.0.0
25 BuildRequires: autoconf >= 2.53
26 BuildRequires: automake
27 BuildRequires: libtool
28 BuildRequires: perl-Apache-Test
29 BuildRequires: perl-ExtUtils-XSBuilder >= 0.23
30 BuildRequires: perl-mod_perl
31 BuildRequires: rpm-perlprov
33 BuildRequires: apache-mod_mime
34 BuildRequires: perl-libwww
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
39 %define apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
42 libapreq is a safe, standards-compliant, high-performance library used
43 for parsing HTTP cookies, query-strings and POST data.
45 Version 2 of libapreq is an improved codebase designed around APR and
46 Apache-2's input filter API.
48 %description -l pl.UTF-8
49 libapreq to bezpieczna, zgodna ze standardami, wysoko wydajna
50 biblioteka służąca do przetwarzania ciasteczek HTTP, łańcuchów zapytań
53 Wersja 2 libapreq to ulepszony kod opracowany na bazie APR i API
54 filtra wejściowego Apache 2.
57 Summary: libapreq2 header files
58 Summary(pl.UTF-8): Pliki nagłówkowe libapreq2
59 Group: Development/Libraries
60 Requires: %{name} = %{version}-%{release}
61 Requires: apache-devel >= 2.0
64 libapreq2 header files.
66 %description devel -l pl.UTF-8
67 Pliki nagłówkowe biblioteki libapreq2.
70 Summary: libapreq2 static library
71 Summary(pl.UTF-8): Statyczna biblioteka libapreq2
72 Group: Development/Libraries
73 Requires: %{name}-devel = %{version}-%{release}
76 Static version of libapreq2 library.
78 %description static -l pl.UTF-8
79 Statyczna wersja biblioteki libapreq2.
81 %package -n perl-%{name}
82 Summary: Perl APIs for libapreq2 - Apache2::Request and Apache2::Cookie
83 Summary(pl.UTF-8): Perlowe API dla libapreq2 - Apache2::Request i Apache2::Cookie
84 Group: Development/Languages/Perl
86 %description -n perl-%{name}
87 Perl APIs for libapreq2 - Apache2::Request and Apache2::Cookie.
89 %description -n perl-%{name} -l pl.UTF-8
90 Perlowe API dla libapreq2 - Apache2::Request i Apache2::Cookie.
92 %package -n apache-mod_apreq2
93 Summary: Apache module mod_apreq2
94 Summary(pl.UTF-8): Moduł serwera Apache mod_apreq2
95 Group: Networking/Daemons
96 Requires: apache(modules-api) = %apache_modules_api
97 Obsoletes: apache-mod_libapreq2
99 %description -n apache-mod_apreq2
100 Apache module mod_apreq2.
102 %description -n apache-mod_apreq2 -l pl.UTF-8
103 Moduł mod_apreq2 do serwera Apache.
116 --with-mm-opts="INSTALLDIRS=vendor" \
118 --with-apache2-apxs=%{apxs} \
119 %{!?with_static_libs:--disable-static}
123 %{?with_tests:%{__make} test}
126 rm -rf $RPM_BUILD_ROOT
129 DESTDIR=$RPM_BUILD_ROOT
131 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/APR/{Request.pod,Request/*.pod}
132 rm -f $RPM_BUILD_ROOT%{apachelibdir}/mod_apreq2.{a,la}
133 install -Dp %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/76_mod_apreq2.conf
136 rm -rf $RPM_BUILD_ROOT
138 %post -p /sbin/ldconfig
139 %postun -p /sbin/ldconfig
141 %post -n apache-mod_apreq2
142 %service -q httpd restart
144 %preun -n apache-mod_apreq2
145 if [ "$1" = "0" ]; then
146 %service -q httpd restart
150 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_libdir}/libapreq2.so.*.*
153 %ghost %{_libdir}/libapreq2.so.3
156 %defattr(644,root,root,755)
157 %attr(755,root,root) %{_libdir}/libapreq2.so
158 %{_libdir}/libapreq2.la
159 %{_includedir}/apreq2
160 %attr(755,root,root) %{_bindir}/apreq2-config
161 %dir %{_includedir}/apache/apreq2
162 %{_includedir}/apache/apreq2/apreq_module_apache2.h
164 %if %{with static_libs}
166 %defattr(644,root,root,755)
167 %{_libdir}/libapreq2.a
170 %files -n perl-%{name}
171 %defattr(644,root,root,755)
172 %{perl_vendorarch}/Apache2/*.pm
173 %{perl_vendorarch}/APR/*.pm
174 %dir %{perl_vendorarch}/APR/Request
175 %{perl_vendorarch}/APR/Request/*.pm
176 %dir %{perl_vendorarch}/auto/APR/Request
177 %dir %{perl_vendorarch}/auto/APR/Request/*
178 %attr(755,root,root) %{perl_vendorarch}/auto/APR/Request/*/*.so
180 # TODO: generate these manually; Makefile.PL (and overall logic) is broken
181 %{_mandir}/man3/Apache*
184 %files -n apache-mod_apreq2
185 %defattr(644,root,root,755)
186 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_apreq2.conf
187 %attr(755,root,root) %{apachelibdir}/mod_apreq2.so