source: spec/trunk/SPECS/apr-util.spec@ 1010

Last change on this file since 1010 was 300, checked in by Yuri Dario, 14 years ago

spec: added apr, apr-util, serf builds.

File size: 5.4 KB
Line 
1
2%define apuver 1
3
4Summary: Apache Portable Runtime Utility library
5Name: apr-util
6Version: 1.4.1
7Release: 1%{?dist}
8License: ASL 2.0
9Group: System Environment/Libraries
10URL: http://apr.apache.org/
11Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
12
13Patch1: aprutil-os2.patch
14
15BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
16BuildRequires: apr-devel >= 1.3.0
17#BuildRequires: autoconf
18#BuildRequires: db4-devel, expat-devel, libuuid-devel
19
20%description
21The mission of the Apache Portable Runtime (APR) is to provide a
22free library of C data structures and routines. This library
23contains additional utility interfaces for APR; including support
24for XML, LDAP, database interfaces, URI parsing and more.
25
26%package devel
27Group: Development/Libraries
28Summary: APR utility library development kit
29Requires: apr-util = %{version}-%{release}, apr-devel, pkgconfig
30Requires: db4-devel
31#Requires: expat-devel
32#Requires: openldap-devel
33
34%description devel
35This package provides the support files which can be used to
36build applications using the APR utility library. The mission
37of the Apache Portable Runtime (APR) is to provide a free
38library of C data structures and routines.
39
40%package pgsql
41Group: Development/Libraries
42Summary: APR utility library PostgreSQL DBD driver
43#BuildRequires: postgresql-devel
44Requires: apr-util = %{version}-%{release}
45
46%description pgsql
47This package provides the PostgreSQL driver for the apr-util
48DBD (database abstraction) interface.
49
50%package mysql
51Group: Development/Libraries
52Summary: APR utility library MySQL DBD driver
53#BuildRequires: mysql-devel
54Requires: apr-util = %{version}-%{release}
55
56%description mysql
57This package provides the MySQL driver for the apr-util DBD
58(database abstraction) interface.
59
60%package sqlite
61Group: Development/Libraries
62Summary: APR utility library SQLite DBD driver
63BuildRequires: sqlite-devel >= 3.0.0
64Requires: apr-util = %{version}-%{release}
65
66%description sqlite
67This package provides the SQLite driver for the apr-util DBD
68(database abstraction) interface.
69
70%package freetds
71Group: Development/Libraries
72Summary: APR utility library FreeTDS DBD driver
73#BuildRequires: freetds-devel
74Requires: apr-util = %{version}-%{release}
75
76%description freetds
77This package provides the FreeTDS driver for the apr-util DBD
78(database abstraction) interface.
79
80%package odbc
81Group: Development/Libraries
82Summary: APR utility library ODBC DBD driver
83#BuildRequires: unixODBC-devel
84Requires: apr-util = %{version}-%{release}
85
86%description odbc
87This package provides the ODBC driver for the apr-util DBD
88(database abstraction) interface.
89
90%package ldap
91Group: Development/Libraries
92Summary: APR utility library LDAP support
93#BuildRequires: openldap-devel
94Requires: apr-util = %{version}-%{release}
95
96%description ldap
97This package provides the LDAP support for the apr-util.
98
99%prep
100%setup -q
101%patch1 -p1 -b .os2
102
103%build
104#autoheader && autoconf
105# A fragile autoconf test which fails if the code trips
106# any other warning; force correct result for OpenLDAP:
107#export ac_cv_ldap_set_rebind_proc_style=three
108
109export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
110export LDFLAGS="-Zhigh-mem -Zargs-wild -Zargs-resp"
111export LIBS="-lurpo -lmmap"
112
113%configure --with-apr=%{_prefix} \
114 --includedir=%{_includedir}/apr-%{apuver} \
115 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
116
117# --with-ldap --without-gdbm \
118# --with-sqlite3 --with-pgsql --with-mysql --with-freetds --with-odbc \
119# --with-berkeley-db \
120# --without-sqlite2
121
122# the TARGET_LIB hack prevents smp builds. %{?_smp_mflags}
123make
124
125%install
126rm -rf $RPM_BUILD_ROOT
127make install DESTDIR=$RPM_BUILD_ROOT
128
129mkdir -p $RPM_BUILD_ROOT/%{_datadir}/aclocal
130install -m 644 build/find_apu.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal
131
132# Unpackaged files; remove the static libaprutil
133rm -f $RPM_BUILD_ROOT%{_libdir}/aprutil.exp \
134 $RPM_BUILD_ROOT%{_libdir}/apr*.la
135
136# And remove the reference to the static libaprutil from the .la
137# file.
138#sed -i '/^old_library/s,libapr.*\.a,,' \
139# $RPM_BUILD_ROOT%{_libdir}/apr*.la
140# Remove unnecessary exports from dependency_libs
141#sed -ri '/^dependency_libs/{s,-l(pq|sqlite[0-9]|rt|dl|uuid) ,,g}' \
142# $RPM_BUILD_ROOT%{_libdir}/apr*.la
143
144# Trim libtool DSO cruft
145rm -f $RPM_BUILD_ROOT%{_libdir}/apr-util-%{apuver}/*.*a
146
147# rename static library
148mv $RPM_BUILD_ROOT%{_libdir}/apru-%{apuver}.lib $RPM_BUILD_ROOT%{_libdir}/apru-%{apuver}_s.lib
149# import library
150emximp -o $RPM_BUILD_ROOT%{_libdir}/apru-%{apuver}.lib $RPM_BUILD_ROOT%{_libdir}/apru-%{apuver}.dll
151
152%clean
153rm -rf $RPM_BUILD_ROOT
154
155%files
156%defattr(-,root,root,-)
157%doc CHANGES LICENSE NOTICE
158%{_libdir}/apru-%{apuver}.dll
159%dir %{_libdir}/apr-util-%{apuver}
160
161%files pgsql
162%defattr(-,root,root,-)
163#%{_libdir}/apr-util-%{apuver}/apr_dbd_pgsql*
164
165%files mysql
166%defattr(-,root,root,-)
167#%{_libdir}/apr-util-%{apuver}/apr_dbd_mysql*
168
169%files sqlite
170%defattr(-,root,root,-)
171%{_libdir}/apr-util-%{apuver}/apr_dbd_sqlite*
172
173%files freetds
174%defattr(-,root,root,-)
175#%{_libdir}/apr-util-%{apuver}/apr_dbd_freetds*
176
177%files odbc
178%defattr(-,root,root,-)
179#%{_libdir}/apr-util-%{apuver}/apr_dbd_odbc*
180
181%files ldap
182%defattr(-,root,root,-)
183#%{_libdir}/apr-util-%{apuver}/apr_ldap*
184
185%files devel
186%defattr(-,root,root,-)
187%{_bindir}/apu-%{apuver}-config
188%{_libdir}/apru-%{apuver}_s.lib
189%{_libdir}/apru-%{apuver}.lib
190%{_includedir}/apr-%{apuver}/*.h
191%{_libdir}/pkgconfig/*.pc
192%{_datadir}/aclocal/*.m4
193
194%changelog
195* Fri Mar 02 2012 yd
196- initial unixroot build.
Note: See TracBrowser for help on using the repository browser.