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