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