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