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