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