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