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