3 %bcond_without static_libs # don't build static library
4 %bcond_with tests # perform "make test"
6 %define apxs /usr/sbin/apxs
8 %include /usr/lib/rpm/macros.perl
9 Summary: Apache Request Library
10 Summary(pl.UTF-8): Biblioteka żądań Apache
16 Source0: http://www.apache.org/dist/httpd/libapreq/%{name}-%{version}.tar.gz
17 # Source0-md5: c11fb0861aa84dcc6cd0f0798b045eee
18 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-Apache-Test
30 BuildRequires: perl-ExtUtils-XSBuilder >= 0.23
31 BuildRequires: perl-mod_perl
32 BuildRequires: rpm-perlprov
34 BuildRequires: apache-mod_mime
35 BuildRequires: perl-libwww
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
40 %define apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
43 libapreq is a safe, standards-compliant, high-performance library used
44 for parsing HTTP cookies, query-strings and POST data.
46 Version 2 of libapreq is an improved codebase designed around APR and
47 Apache-2's input filter API.
49 %description -l pl.UTF-8
50 libapreq to bezpieczna, zgodna ze standardami, wysoko wydajna
51 biblioteka służąca do przetwarzania ciasteczek HTTP, łańcuchów zapytań
54 Wersja 2 libapreq to ulepszony kod opracowany na bazie APR i API
55 filtra wejściowego Apache 2.
58 Summary: libapreq2 header files
59 Summary(pl.UTF-8): Pliki nagłówkowe libapreq2
60 Group: Development/Libraries
61 Requires: %{name} = %{version}-%{release}
62 Requires: apache-devel >= 2.0
65 libapreq2 header files.
67 %description devel -l pl.UTF-8
68 Pliki nagłówkowe biblioteki libapreq2.
71 Summary: libapreq2 static library
72 Summary(pl.UTF-8): Statyczna biblioteka libapreq2
73 Group: Development/Libraries
74 Requires: %{name}-devel = %{version}-%{release}
77 Static version of libapreq2 library.
79 %description static -l pl.UTF-8
80 Statyczna wersja biblioteki libapreq2.
82 %package -n perl-%{name}
83 Summary: Perl APIs for libapreq2 - Apache2::Request and Apache2::Cookie
84 Summary(pl.UTF-8): Perlowe API dla libapreq2 - Apache2::Request i Apache2::Cookie
85 Group: Development/Languages/Perl
87 %description -n perl-%{name}
88 Perl APIs for libapreq2 - Apache2::Request and Apache2::Cookie.
90 %description -n perl-%{name} -l pl.UTF-8
91 Perlowe API dla libapreq2 - Apache2::Request i Apache2::Cookie.
93 %package -n apache-mod_apreq2
94 Summary: Apache module mod_apreq2
95 Summary(pl.UTF-8): Moduł serwera Apache mod_apreq2
96 Group: Networking/Daemons
97 Requires: apache(modules-api) = %apache_modules_api
98 Obsoletes: apache-mod_libapreq2
100 %description -n apache-mod_apreq2
101 Apache module mod_apreq2.
103 %description -n apache-mod_apreq2 -l pl.UTF-8
104 Moduł mod_apreq2 do serwera Apache.
117 --with-mm-opts="INSTALLDIRS=vendor" \
119 --with-apache2-apxs=%{apxs} \
120 %{!?with_static_libs:--disable-static}
124 %{?with_tests:%{__make} test}
127 rm -rf $RPM_BUILD_ROOT
130 DESTDIR=$RPM_BUILD_ROOT
132 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/APR/{Request.pod,Request/*.pod}
133 rm -f $RPM_BUILD_ROOT%{apachelibdir}/mod_apreq2.{a,la}
134 install -Dp %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/76_mod_apreq2.conf
137 rm -rf $RPM_BUILD_ROOT
139 %post -p /sbin/ldconfig
140 %postun -p /sbin/ldconfig
142 %post -n apache-mod_apreq2
143 %service -q httpd restart
145 %preun -n apache-mod_apreq2
146 if [ "$1" = "0" ]; then
147 %service -q httpd restart
151 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_libdir}/libapreq2.so.*.*
154 %ghost %{_libdir}/libapreq2.so.3
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_libdir}/libapreq2.so
159 %{_libdir}/libapreq2.la
160 %{_includedir}/apreq2
161 %attr(755,root,root) %{_bindir}/apreq2-config
162 %dir %{_includedir}/apache/apreq2
163 %{_includedir}/apache/apreq2/apreq_module_apache2.h
165 %if %{with static_libs}
167 %defattr(644,root,root,755)
168 %{_libdir}/libapreq2.a
171 %files -n perl-%{name}
172 %defattr(644,root,root,755)
173 %{perl_vendorarch}/Apache2/*.pm
174 %{perl_vendorarch}/APR/*.pm
175 %dir %{perl_vendorarch}/APR/Request
176 %{perl_vendorarch}/APR/Request/*.pm
177 %dir %{perl_vendorarch}/auto/APR/Request
178 %dir %{perl_vendorarch}/auto/APR/Request/*
179 %attr(755,root,root) %{perl_vendorarch}/auto/APR/Request/*/*.so
181 # TODO: generate these manually; Makefile.PL (and overall logic) is broken
182 %{_mandir}/man3/Apache*
185 %files -n apache-mod_apreq2
186 %defattr(644,root,root,755)
187 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_apreq2.conf
188 %attr(755,root,root) %{apachelibdir}/mod_apreq2.so