3 %bcond_without static_libs # don't build static library
4 %bcond_with tests # perform "make test"
6 %include /usr/lib/rpm/macros.perl
7 %define apxs /usr/sbin/apxs
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: 76e2acde0d82246dea6f2565f3746eec
18 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-ExtUtils-XSBuilder >= 0.23
29 BuildRequires: rpm-perlprov
31 BuildRequires: apache-mod_mime
32 BuildRequires: perl-Apache-Test
33 BuildRequires: perl-libwww
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
38 %define apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
41 libapreq is a safe, standards-compliant, high-performance library used
42 for parsing HTTP cookies, query-strings and POST data.
44 Version 2 of libapreq is an improved codebase designed around APR and
45 Apache-2's input filter API.
47 %description -l pl.UTF-8
48 libapreq to bezpieczna, zgodna ze standardami, wysoko wydajna
49 biblioteka służąca do przetwarzania ciasteczek HTTP, łańcuchów zapytań
52 Wersja 2 libapreq to ulepszony kod opracowany na bazie APR i API
53 filtra wejściowego Apache 2.
56 Summary: libapreq2 header files
57 Summary(pl.UTF-8): Pliki nagłówkowe libapreq2
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
60 Requires: apache-devel >= 2.0
63 libapreq2 header files.
65 %description devel -l pl.UTF-8
66 Pliki nagłówkowe biblioteki libapreq2.
69 Summary: libapreq2 static library
70 Summary(pl.UTF-8): Statyczna biblioteka libapreq2
71 Group: Development/Libraries
72 Requires: %{name}-devel = %{version}-%{release}
75 Static version of libapreq2 library.
77 %description static -l pl.UTF-8
78 Statyczna wersja biblioteki libapreq2.
80 %package -n perl-%{name}
81 Summary: Perl APIs for libapreq2 - Apache2::Request and Apache2::Cookie
82 Summary(pl.UTF-8): Perlowe API dla libapreq2 - Apache2::Request i Apache2::Cookie
83 Group: Development/Languages/Perl
85 %description -n perl-%{name}
86 Perl APIs for libapreq2 - Apache2::Request and Apache2::Cookie.
88 %description -n perl-%{name} -l pl.UTF-8
89 Perlowe API dla libapreq2 - Apache2::Request i Apache2::Cookie.
91 %package -n apache-mod_apreq2
92 Summary: Apache module mod_apreq2
93 Summary(pl.UTF-8): Moduł serwera Apache mod_apreq2
94 Group: Networking/Daemons
95 Requires: apache(modules-api) = %apache_modules_api
96 Obsoletes: apache-mod_libapreq2
98 %description -n apache-mod_apreq2
99 Apache module mod_apreq2.
101 %description -n apache-mod_apreq2 -l pl.UTF-8
102 Moduł mod_apreq2 do serwera Apache.
114 --with-mm-opts="INSTALLDIRS=vendor" \
116 --with-apache2-apxs=%{apxs} \
117 %{!?with_static_libs:--disable-static}
121 %{?with_tests:%{__make} test}
124 rm -rf $RPM_BUILD_ROOT
127 DESTDIR=$RPM_BUILD_ROOT
129 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/APR/{Request.pod,Request/*.pod}
130 rm -f $RPM_BUILD_ROOT%{apachelibdir}/mod_apreq2.{a,la}
131 install -D %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/76_mod_apreq2.conf
134 rm -rf $RPM_BUILD_ROOT
136 %post -p /sbin/ldconfig
137 %postun -p /sbin/ldconfig
139 %post -n apache-mod_apreq2
140 %service -q httpd restart
142 %preun -n apache-mod_apreq2
143 if [ "$1" = "0" ]; then
144 %service -q httpd restart
148 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_libdir}/libapreq2.so.*.*
153 %defattr(644,root,root,755)
154 %attr(755,root,root) %{_libdir}/libapreq2.so
155 %{_libdir}/libapreq2.la
156 %{_includedir}/apreq2
157 %attr(755,root,root) %{_bindir}/apreq2-config
158 %dir %{_includedir}/apache/apreq2
159 %{_includedir}/apache/apreq2/apreq_module_apache2.h
161 %if %{with static_libs}
163 %defattr(644,root,root,755)
164 %{_libdir}/libapreq2.a
167 %files -n perl-%{name}
168 %defattr(644,root,root,755)
169 %{perl_vendorarch}/Apache2/*.pm
170 %{perl_vendorarch}/APR/*.pm
171 %dir %{perl_vendorarch}/APR/Request
172 %{perl_vendorarch}/APR/Request/*.pm
173 %dir %{perl_vendorarch}/auto/APR/Request
174 %dir %{perl_vendorarch}/auto/APR/Request/*
175 %{perl_vendorarch}/auto/APR/Request/*/*.bs
176 %attr(755,root,root) %{perl_vendorarch}/auto/APR/Request/*/*.so
178 # TODO: generate these manually; Makefile.PL (and overall logic) is broken
179 %{_mandir}/man3/Apache*
182 %files -n apache-mod_apreq2
183 %defattr(644,root,root,755)
184 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_apreq2.conf
185 %attr(755,root,root) %{apachelibdir}/mod_apreq2.so