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