]>
Commit | Line | Data |
---|---|---|
c4dbb403 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # perform make test | |
4 | # | |
f3bf17ad | 5 | Summary: Apache Portable Runtime |
e51e866d | 6 | Summary(pl.UTF-8): Apache Portable Runtime - przenośna biblioteka uruchomieniowa |
f3bf17ad | 7 | Name: apr |
8af7f5ca | 8 | Version: 1.7.3 |
e642a4bb | 9 | Release: 1 |
f3bf17ad | 10 | Epoch: 1 |
b34d84ea | 11 | License: Apache v2.0 |
f3bf17ad | 12 | Group: Libraries |
55e3eaa9 | 13 | Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2 |
8af7f5ca | 14 | # Source0-md5: 6b4ff70222c15c6aae505518e15de9dd |
9e32e98f | 15 | Patch0: %{name}-link.patch |
e642a4bb | 16 | |
0146b639 AM |
17 | # disable some things that require recent kernel |
18 | Patch2: %{name}-disable-features.patch | |
f3bf17ad | 19 | URL: http://apr.apache.org/ |
cd9a5e0f | 20 | BuildRequires: autoconf >= 2.59 |
c7edcef5 | 21 | BuildRequires: automake |
df8efb25 | 22 | %if "%{pld_release}" != "ac" |
0db5a6e1 | 23 | BuildRequires: glibc-devel >= 6:2.9 |
1b25cd0a | 24 | BuildRequires: libtool >= 2:2.2 |
df8efb25 ER |
25 | %else |
26 | BuildRequires: libtool | |
27 | %endif | |
03334729 JP |
28 | %ifarch armv3l %{armv4} %{armv5} %{armv6} |
29 | BuildRequires: libatomic-devel | |
30 | %endif | |
69f0f35f | 31 | BuildRequires: libuuid-devel |
9e32e98f | 32 | BuildRequires: python |
df8efb25 | 33 | BuildRequires: rpm >= 4.4.9-56 |
7bac6e65 | 34 | BuildRequires: rpm-pythonprov |
03334729 | 35 | BuildRequires: rpmbuild(macros) >= 2.007 |
df8efb25 ER |
36 | BuildRequires: sed >= 4.0 |
37 | %if "%{pld_release}" != "ac" | |
1c519bd4 | 38 | BuildRequires: uname(release) >= 2.6 |
de68380e | 39 | Requires: uname(release) >= 2.6.28 |
df8efb25 | 40 | %endif |
97865247 AM |
41 | # uuid.h misdetected from this one instead of libuuid-devel |
42 | BuildConflicts: ossp-uuid-devel < 1.6.2-6 | |
52336182 JB |
43 | Conflicts: kernel24 |
44 | Conflicts: kernel24-smp | |
f3bf17ad AM |
45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
46 | ||
47 | %define _includedir /usr/include/apr | |
48 | %define _datadir /usr/share/apr | |
49 | ||
50 | %description | |
51 | The mission of the Apache Portable Runtime (APR) project is to create | |
52 | and maintain software libraries that provide a predictable and | |
53 | consistent interface to underlying platform-specific implementations. | |
54 | The primary goal is to provide an API to which software developers may | |
55 | code and be assured of predictable if not identical behaviour | |
56 | regardless of the platform on which their software is built, relieving | |
57 | them of the need to code special-case conditions to work around or | |
58 | take advantage of platform-specific deficiencies or features. | |
59 | ||
a79d9376 | 60 | %description -l pl.UTF-8 |
b4838f76 | 61 | Celem projektu APR (Apache Portable Runtime) jest stworzenie i |
a79d9376 JR |
62 | utrzymywanie bibliotek dostarczających przewidywalnego i spójnego |
63 | interfejsu do leżących u podstaw implementacji zależnych od platformy. | |
64 | Głównym celem jest dostarczenie API, którego mogą używać programiści | |
65 | mając pewność, że zachowuje się w sposób przewidywalny, jeśli nie | |
66 | identyczny, niezależnie od platformy na jakiej oprogramowanie jest | |
67 | budowane oraz bez potrzeby kodowania specjalnych warunków do | |
68 | obchodzenia lub wykorzystywania specyficznych dla platform różnic lub | |
69 | możliwości. | |
b4838f76 | 70 | |
f3bf17ad | 71 | %package devel |
b4838f76 | 72 | Summary: Header files and development documentation for apr |
e51e866d | 73 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty do apr |
f3bf17ad | 74 | Group: Development/Libraries |
b4838f76 | 75 | Requires: %{name} = %{epoch}:%{version}-%{release} |
d53f5760 | 76 | Requires: automake |
df8efb25 | 77 | %if "%{pld_release}" != "ac" |
1b25cd0a | 78 | Requires: libtool >= 2:2.2 |
df8efb25 ER |
79 | %else |
80 | Requires: libtool | |
81 | %endif | |
d9cfa95e | 82 | Requires: libuuid-devel |
7bac6e65 | 83 | Requires: python-modules |
f3bf17ad AM |
84 | |
85 | %description devel | |
b4838f76 JB |
86 | Header files and development documentation for apr. |
87 | ||
a79d9376 JR |
88 | %description devel -l pl.UTF-8 |
89 | Pliki nagłówkowe i dokumentacja programisty do apr. | |
f3bf17ad AM |
90 | |
91 | %package static | |
92 | Summary: Static apr library | |
e51e866d | 93 | Summary(pl.UTF-8): Statyczna biblioteka apr |
f3bf17ad | 94 | Group: Development/Libraries |
b4838f76 | 95 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
f3bf17ad AM |
96 | |
97 | %description static | |
98 | Static apr library. | |
99 | ||
a79d9376 | 100 | %description static -l pl.UTF-8 |
b4838f76 JB |
101 | Statyczna biblioteka apr. |
102 | ||
f3bf17ad | 103 | %prep |
af4e4c47 | 104 | %setup -q |
9e32e98f | 105 | %patch0 -p1 |
e642a4bb | 106 | |
e0b90f27 | 107 | %patch2 -p1 |
f3bf17ad | 108 | |
13f3c811 JB |
109 | cat >> config.layout <<'EOF' |
110 | <Layout PLD> | |
111 | sbindir: %{_sbindir} | |
112 | libexecdir: %{_libdir}/apr | |
113 | installbuilddir: ${datadir}/build-${APR_MAJOR_VERSION} | |
114 | localstatedir: /var/run | |
115 | runtimedir: /var/run | |
116 | libsuffix: -${APR_MAJOR_VERSION} | |
2523b113 | 117 | </Layout> |
13f3c811 JB |
118 | EOF |
119 | ||
f3bf17ad | 120 | %build |
b34d84ea | 121 | install /usr/share/automake/config.* build |
cb4191bc | 122 | %{__autoconf} |
2523b113 | 123 | |
f3bf17ad | 124 | %configure \ |
03334729 JP |
125 | %ifarch armv3l %{armv4} %{armv5} %{armv6} |
126 | LIBS="-latomic" \ | |
127 | %endif | |
13f3c811 | 128 | --enable-layout=PLD \ |
3c7d7510 | 129 | %ifarch %{ix86} %{x8664} |
02a2518a | 130 | %ifnarch i386 |
131 | --enable-nonportable-atomics \ | |
132 | %endif | |
133 | %endif | |
d28763da | 134 | --enable-pool-concurrency-check \ |
13f3c811 JB |
135 | --enable-threads \ |
136 | --with-devrandom=/dev/urandom | |
f3bf17ad AM |
137 | %{__make} |
138 | ||
9339f747 | 139 | %{?with_tests:%{__make} -j1 check} |
7bcdeaec | 140 | |
f3bf17ad AM |
141 | %install |
142 | rm -rf $RPM_BUILD_ROOT | |
143 | ||
144 | %{__make} install \ | |
145 | DESTDIR=$RPM_BUILD_ROOT | |
146 | ||
9e32e98f | 147 | mv -f $RPM_BUILD_ROOT%{_datadir}/build-1 $RPM_BUILD_ROOT%{_datadir}/build |
16773349 | 148 | install build/{*apr*.m4,*.awk,*.sh,gen-build.py} $RPM_BUILD_ROOT%{_datadir}/build |
d53f5760 | 149 | ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_datadir}/build |
d522858e ER |
150 | if [ -f /usr/share/libtool/config/ltmain.sh ]; then |
151 | ln -snf /usr/share/libtool/config/ltmain.sh $RPM_BUILD_ROOT%{_datadir}/build | |
152 | else | |
153 | ln -snf /usr/share/libtool/ltmain.sh $RPM_BUILD_ROOT%{_datadir}/build | |
154 | fi | |
d53f5760 | 155 | ln -snf /usr/bin/libtool $RPM_BUILD_ROOT%{_datadir}/build |
9e32e98f | 156 | ln -sf build $RPM_BUILD_ROOT%{_datadir}/build-1 |
8c18c9a9 | 157 | |
16773349 ER |
158 | sed -i -e 's@^\(APR_SOURCE_DIR=\).*@\1"%{_datadir}"@' \ |
159 | $RPM_BUILD_ROOT%{_bindir}/apr-1-config | |
160 | sed -i -e 's@^\(apr_builddir\|apr_builders\)=.*@\1=%{_datadir}/build-1@' \ | |
9e32e98f | 161 | $RPM_BUILD_ROOT%{_datadir}/build/apr_rules.mk |
16773349 | 162 | sed -i -e '1s@#!.*python@#!%{__python}@' $RPM_BUILD_ROOT%{_datadir}/build/gen-build.py |
f3bf17ad AM |
163 | |
164 | %clean | |
165 | rm -rf $RPM_BUILD_ROOT | |
166 | ||
b4838f76 JB |
167 | %post -p /sbin/ldconfig |
168 | %postun -p /sbin/ldconfig | |
169 | ||
f3bf17ad AM |
170 | %files |
171 | %defattr(644,root,root,755) | |
023f96c0 | 172 | %doc CHANGES docs/*.html |
7a48bef9 JB |
173 | %attr(755,root,root) %{_libdir}/libapr-1.so.*.*.* |
174 | %attr(755,root,root) %ghost %{_libdir}/libapr-1.so.0 | |
f3bf17ad AM |
175 | |
176 | %files devel | |
177 | %defattr(644,root,root,755) | |
7a48bef9 JB |
178 | %attr(755,root,root) %{_bindir}/apr-1-config |
179 | %attr(755,root,root) %{_libdir}/libapr-1.so | |
180 | %{_libdir}/libapr-1.la | |
f3bf17ad AM |
181 | %{_libdir}/apr.exp |
182 | %{_includedir} | |
183 | %dir %{_datadir} | |
9e32e98f JB |
184 | %dir %{_datadir}/build |
185 | %{_datadir}/build/*.mk | |
186 | %{_datadir}/build/*.m4 | |
187 | %{_datadir}/build/*.awk | |
188 | %attr(755,root,root) %{_datadir}/build/config.* | |
189 | %attr(755,root,root) %{_datadir}/build/*.sh | |
190 | %attr(755,root,root) %{_datadir}/build/libtool | |
16773349 | 191 | %attr(755,root,root) %{_datadir}/build/gen-build.py |
9e32e98f | 192 | %{_datadir}/build-1 |
af4e4c47 | 193 | %{_pkgconfigdir}/apr-1.pc |
f3bf17ad AM |
194 | |
195 | %files static | |
196 | %defattr(644,root,root,755) | |
7a48bef9 | 197 | %{_libdir}/libapr-1.a |