]> git.pld-linux.org Git - packages/apr-compat.git/blob - apr-compat.spec
- rel 4; some important fixes from 1.2 branch
[packages/apr-compat.git] / apr-compat.spec
1 #
2 # Conditional build (Linux 2.4 compat, switch after Ac):
3 %bcond_with     epoll           # use epoll() syscall (requires Linux 2.6)
4 %bcond_with     sendfile64      # use sendfile64 on even if it requires Linux 2.6
5 %bcond_with     tcpnodelaycork  # use TCP_NODELAY|TCP_CORK flags (requires Linux 2.6)
6 #
7 # Linux 2.4.32 supports sendfile64 only on i386 and mips (only 32-bit archs matter)
8 %ifnarch ppc sparc sparc64
9 %define         with_sendfile64         1
10 %endif
11 Summary:        Apache Portable Runtime
12 Summary(pl):    Apache Portable Runtime - przeno¶na biblioteka uruchomieniowa
13 Name:           apr
14 Version:        1.2.2
15 Release:        4
16 Epoch:          1
17 License:        Apache v2.0
18 Group:          Libraries
19 Source0:        http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
20 # Source0-md5:  c43d923b02cf1983106d694976be89c1
21 Patch0:         %{name}-link.patch
22 Patch1:         %{name}-metuxmpm.patch
23 Patch2:         %{name}-no-epoll.patch
24 Patch3:         %{name}-libtool.patch
25 Patch4:         %{name}-branch.patch
26 URL:            http://apr.apache.org/
27 BuildRequires:  autoconf >= 2.13
28 BuildRequires:  automake
29 BuildRequires:  libtool >= 1.3.3
30 BuildRequires:  libuuid-devel
31 BuildRequires:  sed >= 4.0
32 BuildRequires:  python
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define         _includedir     /usr/include/apr
36 %define         _datadir        /usr/share/apr
37
38 %description
39 The mission of the Apache Portable Runtime (APR) project is to create
40 and maintain software libraries that provide a predictable and
41 consistent interface to underlying platform-specific implementations.
42 The primary goal is to provide an API to which software developers may
43 code and be assured of predictable if not identical behaviour
44 regardless of the platform on which their software is built, relieving
45 them of the need to code special-case conditions to work around or
46 take advantage of platform-specific deficiencies or features.
47
48 %description -l pl
49 Celem projektu APR (Apache Portable Runtime) jest stworzenie i
50 utrzymywanie bibliotek dostarczaj±cych przewidywalnego i spójnego
51 interfejsu do le¿±cych u podstaw implementacji zale¿nych od platformy.
52 G³ównym celem jest dostarczenie API, którego mog± u¿ywaæ programi¶ci
53 maj±c pewno¶æ, ¿e zachowuje siê w sposób przewidywalny, je¶li nie
54 identyczny, niezale¿nie od platformy na jakiej oprogramowanie jest
55 budowane oraz bez potrzeby kodowania specjalnych warunków do
56 obchodzenia lub wykorzystywania specyficznych dla platform ró¿nic lub
57 mo¿liwo¶ci.
58
59 %package devel
60 Summary:        Header files and development documentation for apr
61 Summary(pl):    Pliki nag³ówkowe i dokumentacja programisty do apr
62 Group:          Development/Libraries
63 Requires:       %{name} = %{epoch}:%{version}-%{release}
64 Requires:       libuuid-devel
65 Requires:       automake
66 Requires:       libtool
67
68 %description devel
69 Header files and development documentation for apr.
70
71 %description devel -l pl
72 Pliki nag³ówkowe i dokumentacja programisty do apr.
73
74 %package static
75 Summary:        Static apr library
76 Summary(pl):    Statyczna biblioteka apr
77 Group:          Development/Libraries
78 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
79
80 %description static
81 Static apr library.
82
83 %description static -l pl
84 Statyczna biblioteka apr.
85
86 %prep
87 %setup -q
88 %patch0 -p1
89 %patch1 -p1
90 %{!?with_epoll:%patch2 -p1}
91 %patch3 -p1
92 %patch4 -p0
93
94 %build
95 install /usr/share/automake/config.* build
96 ./buildconf
97 %configure \
98         %{!?with_tcpnodelaycork:apr_cv_tcp_nodelay_with_cork=no} \
99         %{!?with_sendfile64:ac_cv_func_sendfile64=no} \
100         --with-devrandom=/dev/urandom \
101 %ifarch %{ix86} %{i8664}
102 %ifnarch i386
103         --enable-nonportable-atomics \
104 %endif
105 %endif
106         --enable-threads
107 %{__make}
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111
112 %{__make} install \
113         DESTDIR=$RPM_BUILD_ROOT
114
115 ln -sf %{_bindir}/libtool $RPM_BUILD_ROOT%{_datadir}/libtool
116
117 mv -f $RPM_BUILD_ROOT%{_datadir}/build-1 $RPM_BUILD_ROOT%{_datadir}/build
118 install build/{*apr*.m4,*.awk,*.sh,gen-build.py} $RPM_BUILD_ROOT%{_datadir}/build
119 ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_datadir}/build
120 ln -snf /usr/share/libtool/ltmain.sh $RPM_BUILD_ROOT%{_datadir}/build
121 ln -snf /usr/bin/libtool $RPM_BUILD_ROOT%{_datadir}/build
122 ln -sf build $RPM_BUILD_ROOT%{_datadir}/build-1
123
124 sed -i -e 's@^\(APR_SOURCE_DIR=\).*@\1"%{_datadir}"@' \
125         $RPM_BUILD_ROOT%{_bindir}/apr-1-config
126 sed -i -e 's@^\(apr_builddir\|apr_builders\)=.*@\1=%{_datadir}/build-1@' \
127         $RPM_BUILD_ROOT%{_datadir}/build/apr_rules.mk
128 sed -i -e '1s@#!.*python@#!%{__python}@' $RPM_BUILD_ROOT%{_datadir}/build/gen-build.py
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %post   -p /sbin/ldconfig
134 %postun -p /sbin/ldconfig
135
136 %files
137 %defattr(644,root,root,755)
138 %doc CHANGES docs/*.html
139 %attr(755,root,root) %{_libdir}/lib*.so.*.*
140
141 %files devel
142 %defattr(644,root,root,755)
143 %attr(755,root,root) %{_bindir}/*
144 %attr(755,root,root) %{_libdir}/lib*.so
145 %{_libdir}/lib*.la
146 %{_libdir}/apr.exp
147 %{_includedir}
148 %dir %{_datadir}
149 %dir %{_datadir}/build
150 %{_datadir}/build/*.mk
151 %{_datadir}/build/*.m4
152 %{_datadir}/build/*.awk
153 %attr(755,root,root) %{_datadir}/build/config.*
154 %attr(755,root,root) %{_datadir}/build/*.sh
155 %attr(755,root,root) %{_datadir}/build/libtool
156 %attr(755,root,root) %{_datadir}/build/gen-build.py
157 %{_datadir}/build-1
158 %{_pkgconfigdir}/apr-1.pc
159
160 %files static
161 %defattr(644,root,root,755)
162 %{_libdir}/lib*.a
This page took 0.061526 seconds and 3 git commands to generate.