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