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