]> git.pld-linux.org Git - packages/db3.git/blob - db3.spec
- release 3.
[packages/db3.git] / db3.spec
1 Summary:        BSD database library for C
2 Name:           db3
3 Version:        3.1.14
4 Release:        3
5 Group:          Libraries
6 Group(fr):      Librairies
7 Group(pl):      Biblioteki
8 License:        GPL
9 URL:            http://www.sleepycat.com
10 Source0:        http://www.sleepycat.com/update/%{version}/db-%{version}.tar.gz
11 #Patch0:        http://www.sleepycat.com/update/%{version}/patch.3.0.55.1
12 Patch0:         %{name}-align.patch
13 Patch1:         %{name}-linux-threads.patch
14 Patch2:         %{name}-shmget.patch
15 Patch3:         %{name}-static.patch
16 Patch4:         http://www.sleepycat.com/update/3.1.14/patch.3.1.14.1
17 PreReq:         /sbin/ldconfig
18 BuildRequires:  db1-static
19 BuildRequires:  tcl-devel
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
24 provides embedded database support for both traditional and
25 client/server applications. Berkeley DB is used by many applications,
26 including Python and Perl, so this should be installed on all systems.
27
28 %package utils
29 Summary:        Command line tools for managing Berkeley DB databases.
30 Group:          Applications/Databases
31 Group(pl):      Aplikacje/Bazy danych
32 Requires:       %{name} = %{version}
33
34 %description utils
35 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
36 provides embedded database support for both traditional and
37 client/server applications. Berkeley DB includes B+tree, Extended
38 Linear Hashing, Fixed and Variable-length record access methods,
39 transactions, locking, logging, shared memory caching and database
40 recovery. DB supports C, C++, Java and Perl APIs.
41
42 This package contains command line tools for managing Berkeley DB
43 databases.
44
45 %package tcl
46 Summary:        Berkeley database library for TCL
47 Group:          Development/Languages/Tcl
48 Group(pl):      Programowanie/Jêzyki/Tcl
49 Requires:       %{name} = %{version}
50
51 %description tcl
52 Berkeley database library for TCL.
53
54 %package devel
55 Summary:        Development libraries and header files for Berkeley database library
56 Group:          Development/Libraries
57 Group(fr):      Development/Librairies
58 Group(pl):      Programowanie/Biblioteki
59 Requires:       %{name} = %{version}
60
61 %description devel
62 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
63 provides embedded database support for both traditional and
64 client/server applications. Berkeley DB includes B+tree, Extended
65 Linear Hashing, Fixed and Variable-length record access methods,
66 transactions, locking, logging, shared memory caching and database
67 recovery. DB supports C, C++, Java and Perl APIs.
68
69 This package contains the header files, libraries, and documentation
70 for building programs which use Berkeley DB.
71
72 %package static
73 Summary:        Static libraries for Berkeley database library
74 Group:          Development/Libraries
75 Group(fr):      Development/Librairies
76 Group(pl):      Programowanie/Biblioteki
77 Requires:       %{name}-devel = %{version}
78
79 %description static
80 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
81 provides embedded database support for both traditional and
82 client/server applications. Berkeley DB includes B+tree, Extended
83 Linear Hashing, Fixed and Variable-length record access methods,
84 transactions, locking, logging, shared memory caching and database
85 recovery. DB supports C, C++, Java and Perl APIs.
86
87 This package contains the static libraries for building programs which
88 use Berkeley DB.
89
90 %prep
91 %setup -q -n db-%{version}
92 #%patch0 -p0
93 #%patch1 -p1
94 # XXX not applied
95 #%patch2 -p1
96 %patch3 -p1
97 %patch4 -p0
98
99 %build
100 cp -a build_unix build_unix.static
101
102 cd build_unix.static
103
104 LDFLAGS="-s" \
105 CFLAGS="$RPM_OPT_FLAGS" \
106 CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-implicit-templates" \
107 ../dist/configure \
108         --prefix=%{_prefix} \
109         --with-tcl=%{_libdir} \
110         --enable-compat185 \
111         --enable-dump185 \
112         --disable-shared \
113         --enable-static \
114         --enable-rpc \
115         --enable-cxx
116
117 %{__make} static db_dump185
118
119 cd ../build_unix
120
121 LDFLAGS="-s" \
122 CFLAGS="$RPM_OPT_FLAGS" \
123 CXXFLAGS="$RPM_OPT_FLAGS -fno-rtti -fno-implicit-templates" \
124 ../dist/configure \
125         --prefix=%{_prefix} \
126         --enable-compat185 \
127         --enable-shared \
128         --disable-static \
129         --enable-rpc \
130         --enable-cxx \
131         --enable-tcl
132
133 %{__make} TCFLAGS='-I$(builddir) -I%{_includedir}'
134
135 %install
136 rm -rf $RPM_BUILD_ROOT
137 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir},/lib}
138
139 cd build_unix.static
140
141 %{__make} prefix=$RPM_BUILD_ROOT%{_prefix} \
142         install_static \
143         install_static_cxx
144
145 install db_dump185 $RPM_BUILD_ROOT%{_bindir}
146
147 cd ../build_unix
148
149 %{__make} \
150         prefix=$RPM_BUILD_ROOT%{_prefix} \
151         includedir=$RPM_BUILD_ROOT%{_includedir}/db3 \
152         install_include \
153         install_dynamic \
154         install_dynamic_cxx \
155         install_tcl \
156         install_utilities
157
158 mv -f $RPM_BUILD_ROOT%{_libdir}/libdb-*.so $RPM_BUILD_ROOT/lib
159 ln -s ../../lib/libdb-3.1.so $RPM_BUILD_ROOT%{_libdir}/libdb3.so
160 ln -s libdb-3.1.a $RPM_BUILD_ROOT%{_libdir}/libdb3.a
161 rm -f $RPM_BUILD_ROOT%{_libdir}/libdb.so
162
163 for i in $RPM_BUILD_ROOT%{_bindir}/db_* ; do
164         mv -f $i `echo $i | sed -e 's,/db_,/db3_,'`
165 done
166
167 strip --strip-unneeded $RPM_BUILD_ROOT%{_bindir}/*
168 strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so
169
170 gzip -9nf ../LICENSE ../README
171
172 %clean
173 rm -rf $RPM_BUILD_ROOT
174
175 %post -p /sbin/ldconfig
176 %postun -p /sbin/ldconfig
177
178 %post tcl -p /sbin/ldconfig
179 %postun tcl -p /sbin/ldconfig
180
181 %files
182 %defattr(644,root,root,755)
183 %doc LICENSE.gz README.gz
184 %attr(755,root,root) /lib/libdb-*.so
185
186 %files utils
187 %defattr(644,root,root,755)
188 %doc docs/utility/*
189 %attr(755,root,root) %{_bindir}/berkeley_db_svc
190 %attr(755,root,root) %{_bindir}/db*_archive
191 %attr(755,root,root) %{_bindir}/db*_checkpoint
192 %attr(755,root,root) %{_bindir}/db*_deadlock
193 %attr(755,root,root) %{_bindir}/db*_dump
194 %attr(755,root,root) %{_bindir}/db*_dump185
195 %attr(755,root,root) %{_bindir}/db*_load
196 %attr(755,root,root) %{_bindir}/db*_printlog
197 %attr(755,root,root) %{_bindir}/db*_recover
198 %attr(755,root,root) %{_bindir}/db*_stat
199 %attr(755,root,root) %{_bindir}/db*_upgrade
200 %attr(755,root,root) %{_bindir}/db*_verify
201
202 %files tcl
203 %defattr(644,root,root,755)
204 %attr(755,root,root) %{_libdir}/libdb_tcl-*.so
205
206 %files devel
207 %defattr(644,root,root,755)
208 %doc docs/{api*,ref,index.html,sleepycat,images} examples*
209 %attr(755,root,root) %{_libdir}/libdb*.la
210 %attr(755,root,root) %{_libdir}/libdb3.so
211 %attr(755,root,root) %{_libdir}/libdb_tcl.so
212 %attr(755,root,root) %{_libdir}/libdb_cxx*.so
213 %{_includedir}/db3
214
215 %files static
216 %defattr(644,root,root,755)
217 %{_libdir}/lib*.a
This page took 1.762344 seconds and 3 git commands to generate.