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