]> git.pld-linux.org Git - packages/apr.git/blob - apr.spec
- racy version bug doesn't use new API thus should work on old kernels, too
[packages/apr.git] / apr.spec
1 %bcond_with     tests
2 Summary:        Apache Portable Runtime
3 Summary(pl.UTF-8):      Apache Portable Runtime - przenośna biblioteka uruchomieniowa
4 Name:           apr
5 Version:        1.3.3
6 Release:        9
7 Epoch:          1
8 License:        Apache v2.0
9 Group:          Libraries
10 Source0:        http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
11 # Source0-md5:  2090c21dee4f0eb1512604127dcd158f
12 Patch0:         %{name}-link.patch
13 Patch1:         %{name}-metuxmpm.patch
14 Patch2:         %{name}-libtool.patch
15 Patch3:         %{name}-bug-46425.patch
16 URL:            http://apr.apache.org/
17 BuildRequires:  autoconf >= 2.50
18 BuildRequires:  automake
19 BuildRequires:  glibc-devel >= 6:2.9
20 %if "%{pld_release}" != "ac"
21 BuildRequires:  libtool >= 2:2.2
22 %else
23 BuildRequires:  libtool
24 %endif
25 BuildRequires:  libuuid-devel
26 BuildRequires:  python
27 BuildRequires:  rpm >= 4.4.9-56
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  sed >= 4.0
30 %if "%{pld_release}" != "ac"
31 BuildRequires:  uname(release) >= 2.6
32 Requires:       uname(release) >= 2.6.27
33 %endif
34 Conflicts:      kernel24
35 Conflicts:      kernel24-smp
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         _includedir     /usr/include/apr
39 %define         _datadir        /usr/share/apr
40
41 %description
42 The mission of the Apache Portable Runtime (APR) project is to create
43 and maintain software libraries that provide a predictable and
44 consistent interface to underlying platform-specific implementations.
45 The primary goal is to provide an API to which software developers may
46 code and be assured of predictable if not identical behaviour
47 regardless of the platform on which their software is built, relieving
48 them of the need to code special-case conditions to work around or
49 take advantage of platform-specific deficiencies or features.
50
51 %description -l pl.UTF-8
52 Celem projektu APR (Apache Portable Runtime) jest stworzenie i
53 utrzymywanie bibliotek dostarczających przewidywalnego i spójnego
54 interfejsu do leżących u podstaw implementacji zależnych od platformy.
55 Głównym celem jest dostarczenie API, którego mogą używać programiści
56 mając pewność, że zachowuje się w sposób przewidywalny, jeśli nie
57 identyczny, niezależnie od platformy na jakiej oprogramowanie jest
58 budowane oraz bez potrzeby kodowania specjalnych warunków do
59 obchodzenia lub wykorzystywania specyficznych dla platform różnic lub
60 możliwości.
61
62 %package devel
63 Summary:        Header files and development documentation for apr
64 Summary(pl.UTF-8):      Pliki nagłówkowe i dokumentacja programisty do apr
65 Group:          Development/Libraries
66 Requires:       %{name} = %{epoch}:%{version}-%{release}
67 Requires:       automake
68 %if "%{pld_release}" != "ac"
69 Requires:       libtool >= 2:2.2
70 %else
71 Requires:       libtool
72 %endif
73 Requires:       libuuid-devel
74 Requires:       python-modules
75
76 %description devel
77 Header files and development documentation for apr.
78
79 %description devel -l pl.UTF-8
80 Pliki nagłówkowe i dokumentacja programisty do apr.
81
82 %package static
83 Summary:        Static apr library
84 Summary(pl.UTF-8):      Statyczna biblioteka apr
85 Group:          Development/Libraries
86 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
87
88 %description static
89 Static apr library.
90
91 %description static -l pl.UTF-8
92 Statyczna biblioteka apr.
93
94 %prep
95 %setup -q
96 %patch0 -p1
97 %patch1 -p1
98 %patch2 -p1
99 %patch3 -p1
100
101 cat >> config.layout <<'EOF'
102 <Layout PLD>
103 sbindir:        %{_sbindir}
104 libexecdir:     %{_libdir}/apr
105 installbuilddir: ${datadir}/build-${APR_MAJOR_VERSION}
106 localstatedir:  /var/run
107 runtimedir:     /var/run
108 libsuffix:      -${APR_MAJOR_VERSION}
109 </Layout>
110 EOF
111
112 %build
113 install /usr/share/automake/config.* build
114 %{__autoconf}
115
116 %configure \
117         --enable-layout=PLD \
118 %ifarch %{ix86} %{x8664}
119 %ifnarch i386
120         --enable-nonportable-atomics \
121 %endif
122 %endif
123         --enable-threads \
124         --with-devrandom=/dev/urandom
125 %{__make}
126
127 %{?with_tests:%{__make} -j1 test}
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131
132 %{__make} install \
133         DESTDIR=$RPM_BUILD_ROOT
134
135 mv -f $RPM_BUILD_ROOT%{_datadir}/build-1 $RPM_BUILD_ROOT%{_datadir}/build
136 install build/{*apr*.m4,*.awk,*.sh,gen-build.py} $RPM_BUILD_ROOT%{_datadir}/build
137 ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_datadir}/build
138 if [ -f /usr/share/libtool/config/ltmain.sh ]; then
139         ln -snf /usr/share/libtool/config/ltmain.sh $RPM_BUILD_ROOT%{_datadir}/build
140 else
141         ln -snf /usr/share/libtool/ltmain.sh $RPM_BUILD_ROOT%{_datadir}/build
142 fi
143 ln -snf /usr/bin/libtool $RPM_BUILD_ROOT%{_datadir}/build
144 ln -sf build $RPM_BUILD_ROOT%{_datadir}/build-1
145
146 sed -i -e 's@^\(APR_SOURCE_DIR=\).*@\1"%{_datadir}"@' \
147         $RPM_BUILD_ROOT%{_bindir}/apr-1-config
148 sed -i -e 's@^\(apr_builddir\|apr_builders\)=.*@\1=%{_datadir}/build-1@' \
149         $RPM_BUILD_ROOT%{_datadir}/build/apr_rules.mk
150 sed -i -e '1s@#!.*python@#!%{__python}@' $RPM_BUILD_ROOT%{_datadir}/build/gen-build.py
151
152 %clean
153 rm -rf $RPM_BUILD_ROOT
154
155 %post   -p /sbin/ldconfig
156 %postun -p /sbin/ldconfig
157
158 %files
159 %defattr(644,root,root,755)
160 %doc CHANGES docs/*.html
161 %attr(755,root,root) %{_libdir}/libapr-1.so.*.*.*
162 %attr(755,root,root) %ghost %{_libdir}/libapr-1.so.0
163
164 %files devel
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_bindir}/apr-1-config
167 %attr(755,root,root) %{_libdir}/libapr-1.so
168 %{_libdir}/libapr-1.la
169 %{_libdir}/apr.exp
170 %{_includedir}
171 %dir %{_datadir}
172 %dir %{_datadir}/build
173 %{_datadir}/build/*.mk
174 %{_datadir}/build/*.m4
175 %{_datadir}/build/*.awk
176 %attr(755,root,root) %{_datadir}/build/config.*
177 %attr(755,root,root) %{_datadir}/build/*.sh
178 %attr(755,root,root) %{_datadir}/build/libtool
179 %attr(755,root,root) %{_datadir}/build/gen-build.py
180 %{_datadir}/build-1
181 %{_pkgconfigdir}/apr-1.pc
182
183 %files static
184 %defattr(644,root,root,755)
185 %{_libdir}/libapr-1.a
This page took 0.316031 seconds and 3 git commands to generate.