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