]> git.pld-linux.org Git - packages/db3.git/blame - db3.spec
f846c920598dd018a8af64d7edb04398 cvsmapfs-1.3.tar.gz
[packages/db3.git] / db3.spec
CommitLineData
fd88317a
JR
1%define __soversion 3.1
2%define _libdb_a libdb-%{__soversion}.a
3
4Summary: BSD database library for C
5Name: db3
6Version: 3.1.14
08bc0c20 7Release: 1
4c8f2663 8Group: Libraries
fd88317a
JR
9License: GPL
10URL: http://www.sleepycat.com
11Source0: http://www.sleepycat.com/update/%{version}/db-%{version}.tar.gz
12#Patch0: http://www.sleepycat.com/update/%{version}/patch.3.0.55.1
13Patch0: db3-align.patch
14Patch1: db3-linux-threads.patch
15Patch2: db3-shmget.patch
16PreReq: /sbin/ldconfig
08bc0c20 17
fd88317a
JR
18# XXX written as a file prereq in order to build with glibc-2.1.3
19%ifos linux
20BuildPrereq: /usr/lib/libdb1.a
21%endif
22
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
08bc0c20
AF
24
25%description
fd88317a
JR
26The Berkeley Database (Berkeley DB) is a programmatic toolkit that
27provides embedded database support for both traditional and
28client/server applications. Berkeley DB is used by many applications,
29including Python and Perl, so this should be installed on all systems.
30
31%package utils
32Summary: Command line tools for managing Berkeley DB databases.
33Group: Applications/Databases
34Group(pl): Aplikacje/Bazy danych
35Requires: %{name} = %{version}
36
37%description utils
38The Berkeley Database (Berkeley DB) is a programmatic toolkit that
39provides embedded database support for both traditional and
40client/server applications. Berkeley DB includes B+tree, Extended
41Linear Hashing, Fixed and Variable-length record access methods,
42transactions, locking, logging, shared memory caching and database
43recovery. DB supports C, C++, Java and Perl APIs.
44
45This package contains command line tools for managing Berkeley DB
46databases.
08bc0c20
AF
47
48%package devel
fd88317a 49Summary: Development libraries and header files for Berkeley database library
4c8f2663 50Group: Development/Libraries
51Group(fr): Development/Librairies
52Group(pl): Programowanie/Biblioteki
53Requires: %{name} = %{version}
08bc0c20
AF
54
55%description devel
fd88317a
JR
56The Berkeley Database (Berkeley DB) is a programmatic toolkit that
57provides embedded database support for both traditional and
58client/server applications. Berkeley DB includes B+tree, Extended
59Linear Hashing, Fixed and Variable-length record access methods,
60transactions, locking, logging, shared memory caching and database
61recovery. DB supports C, C++, Java and Perl APIs.
62
63This package contains the header files, libraries, and documentation
64for building programs which use Berkeley DB.
65
66%package static
67Summary: Static libraries for Berkeley database library
68Group: Development/Libraries
69Group(fr): Development/Librairies
70Group(pl): Programowanie/Biblioteki
71Requires: %{name}-devel = %{version}
08bc0c20 72
fd88317a
JR
73%description static
74The Berkeley Database (Berkeley DB) is a programmatic toolkit that
75provides embedded database support for both traditional and
76client/server applications. Berkeley DB includes B+tree, Extended
77Linear Hashing, Fixed and Variable-length record access methods,
78transactions, locking, logging, shared memory caching and database
79recovery. DB supports C, C++, Java and Perl APIs.
80
81This package contains the static libraries for building programs which use
82Berkeley DB.
08bc0c20
AF
83
84%prep
fd88317a
JR
85%setup -q -n db-%{version}
86#%patch0 -p0
87#%patch1 -p1
88# XXX not applied
89#%patch1 -p1
08bc0c20
AF
90
91%build
fd88317a
JR
92
93cd build_unix
94
95# XXX --enable-tcl can't add without picking up dependency on libtcl.so
96# XXX --enable-posixmutexes (missing pthread_{cond,mutex}attr_setpshared)
97# XXX --enable-cxx (barfs on clone proto in %{_includedir}/bits/sched.h)
98# XXX --enable-debug_{r,w}op should be disabled for production.
99CFLAGS="$RPM_OPT_FLAGS" ../dist/configure --prefix=%{_prefix} --enable-debug --enable-compat185 --enable-diagnostic --enable-dump185 --enable-shared --enable-static --enable-rpc --enable-tcl # --enable-test --enable-debug --enable-debug_rop --enable-debug_wop # --enable-posixmutexes
100
101%{__make} libdb=%{_libdb_a} %{_libdb_a}
102
103# Static link with old db-185 libraries.
104/bin/sh ./libtool --mode=compile cc -c -O2 -g -g -I%{_includedir}/db1 -I../dist/../include -D_REENTRANT ../dist/../db_dump185/db_dump185.c
105cc -s -static -o db_dump185 db_dump185.lo -L%{_libdir} -ldb1
106
107# Compile rest normally.
108%{__make} libdb=%{_libdb_a} TCFLAGS='-I$(builddir) -I%{_includedir}' LDFLAGS="-s"
08bc0c20
AF
109
110%install
111rm -rf $RPM_BUILD_ROOT
fd88317a
JR
112install -d ${RPM_BUILD_ROOT}%{_includedir}
113install -d ${RPM_BUILD_ROOT}%{_libdir}
114
115cd build_unix
08bc0c20 116
fd88317a
JR
117# XXX install_tcl
118# XXX install_static_cxx
119# XXX install_dynamic_cxx
120# XXX install_java
121# XXX install_docs (handled by %docs)
122%{__make} libdb=%{_libdb_a} LDFLAGS="-s" prefix=${RPM_BUILD_ROOT}%{_prefix} install_include install_dynamic install_static install_tcl install_utilities
08bc0c20 123
fd88317a
JR
124# XXX annoying
125set -x
126( cd ${RPM_BUILD_ROOT}
127
128%ifos linux
129 install -d ./lib
130 mv -f .%{_libdir}/libdb[-.]*so* ./lib
131 if [ "%{_libdir}" != "%{_libdir}" ]; then
132 install -d .%{_libdir}
133 mv -f .%{_libdir}/libdb* .%{_libdir}
134 fi
135%endif
136
137 mkdir -p .%{_includedir}/db3
138 mv -f .%{_prefix}/include/*.h .%{_includedir}/db3
139 ln -sf db3/db.h .%{_includedir}/db.h
140# for F in .%{_prefix}/bin/db_* ; do
141# mv $F `echo $F | sed -e 's,/db_,/db3_,'`
142# done
143)
144set +x
08bc0c20
AF
145
146%clean
147rm -rf $RPM_BUILD_ROOT
148
fd88317a
JR
149%post -p /sbin/ldconfig
150%postun -p /sbin/ldconfig
151
08bc0c20
AF
152%files
153%defattr(644,root,root,755)
fd88317a
JR
154%doc LICENSE README docs/images
155%ifos linux
156/lib/libdb-%{__soversion}.so
157%else
158%{_libdir}/libdb-%{__soversion}.so
159%endif
160
161%files utils
162%defattr(644,root,root,755)
163%doc docs/utility
164%{_libdir}/libdb_tcl-%{__soversion}.so
165%attr(755,root,root) %{_bindir}/berkeley_db_svc
166%attr(755,root,root) %{_bindir}/db*_archive
167%attr(755,root,root) %{_bindir}/db*_checkpoint
168%attr(755,root,root) %{_bindir}/db*_deadlock
169%attr(755,root,root) %{_bindir}/db*_dump
170%attr(755,root,root) %{_bindir}/db*_dump185
171%attr(755,root,root) %{_bindir}/db*_load
172%attr(755,root,root) %{_bindir}/db*_printlog
173%attr(755,root,root) %{_bindir}/db*_recover
174%attr(755,root,root) %{_bindir}/db*_stat
175%attr(755,root,root) %{_bindir}/db*_upgrade
176%attr(755,root,root) %{_bindir}/db*_verify
08bc0c20
AF
177
178%files devel
179%defattr(644,root,root,755)
fd88317a
JR
180%doc docs/api_c docs/api_cxx docs/api_java docs/api_tcl docs/index.html
181%doc docs/ref docs/sleepycat
182%doc examples_c examples_cxx
183%{_libdir}/libdb-%{__soversion}.la
184%{_libdir}/libdb_tcl-%{__soversion}.la
185%{_libdir}/%{_libdb_a}
186%{_includedir}/db3/db.h
187%{_includedir}/db3/db_185.h
188%{_includedir}/db3/db_cxx.h
189%{_includedir}/db.h
190%ifos linux
191/lib/libdb.so
192%else
193%{_libdir}/libdb.so
194%endif
195%{_libdir}/libdb_tcl.so
08bc0c20 196
fd88317a
JR
197%files static
198%defattr(644,root,root,755)
199%{_libdir}/%{_libdb_a}
This page took 0.105296 seconds and 4 git commands to generate.