]> git.pld-linux.org Git - packages/db2.git/blob - db2.spec
- release 1
[packages/db2.git] / db2.spec
1 Summary:        BSD database library for C
2 Name:           db2
3 Version:        2.4.14
4 Release:        1
5 Group:          Libraries
6 License:        BSD
7 URL:            http://www.sleepycat.com
8 # Source0:      http://www.sleepycat.com/update/2.7.7/db-2.7.7.tar.gz
9 # Taken from glibc 2.1.3
10 Source0:        db2-glibc-2.1.3.tar.gz
11 # Patch to make it standalone
12 Patch0:         db2-glibc-2.1.3.patch
13 Patch1:         db2-libdb2.patch
14 PreReq:         /sbin/ldconfig
15 Conflicts:      glibc < 2.1.90
16 Obsoletes:      glibc-db2
17 Provides:       glibc-db2
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
22 embedded database support for both traditional and client/server applications.
23 This library used to be part of the glibc package.
24
25 %package devel
26 Summary:        Development libraries and header files for Berkeley database library
27 Group:          Development/Libraries
28 Group(fr):      Development/Librairies
29 Group(pl):      Programowanie/Biblioteki
30 Requires:       %{name} = %{version}
31 Conflicts:      glibc-devel < 2.1.90
32 Obsoletes:      glibc-db2-devel
33
34 %description devel
35 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
36 embedded database support for both traditional and client/server applications.
37 Berkeley DB includes B tree, Hashing, Fixed and Variable-length record access
38 methods.
39
40 This package contains the header files, libraries, and documentation
41 for building programs which use Berkeley DB.
42
43 %package static
44 Summary:        Static libraries for Berkeley database library
45 Group:          Development/Libraries
46 Group(fr):      Development/Librairies
47 Group(pl):      Programowanie/Biblioteki
48 Requires:       %{name}-devel = %{version}
49 Conflicts:      glibc-static < 2.1.90
50 Obsoletes:      glibc-db2-static
51
52 %description static
53 The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
54 embedded database support for both traditional and client/server applications.
55 Berkeley DB includes B tree, Hashing, Fixed and Variable-length record access
56 methods.
57
58 This package contains the static libraries for building programs which use
59 Berkeley DB.
60
61 %prep
62 %setup -q -n db2
63 %patch0 -p1
64 %patch1 -p1
65
66 %build
67 %{__make} CFLAGS="$RPM_OPT_FLAGS -I. -I./include -include ./compat.h"
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT{/lib,%{_includedir}/db2,%{_libdir},%{_bindir}}
72
73 install libdb2.so.3 $RPM_BUILD_ROOT/lib/
74 install libdb2.a $RPM_BUILD_ROOT/%{_libdir}/
75 install db.h db_185.h $RPM_BUILD_ROOT/%{_includedir}/db2
76
77 for p in db_archive db_checkpoint db_deadlock db_dump db_load \
78          db_printlog db_recover db_stat; do
79         q="`echo $p | sed -e 's,^db_,db2_,'`"
80         install $p $RPM_BUILD_ROOT/%{_bindir}/$q
81 done
82
83 ln -sf ../../lib/libdb2.so.3 $RPM_BUILD_ROOT/%{_libdir}/libdb2.so
84
85 strip --strip-unneeded $RPM_BUILD_ROOT%{_bindir}/*
86 strip --strip-unneeded $RPM_BUILD_ROOT/lib/lib*.so.*
87
88 gzip -9nf README LICENSE
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %post -p /sbin/ldconfig
94 %postun -p /sbin/ldconfig
95
96 %files
97 %defattr(644,root,root,755)
98 %doc README.gz LICENSE.gz
99 %attr(755,root,root) /lib/libdb2.so.3
100
101 %files devel
102 %defattr(644,root,root,755)
103 %{_includedir}/db2/db.h
104 %{_includedir}/db2/db_185.h
105 %attr(755,root,root) %{_libdir}/libdb2.so
106 %attr(755,root,root) %{_bindir}/db2_archive
107 %attr(755,root,root) %{_bindir}/db2_checkpoint
108 %attr(755,root,root) %{_bindir}/db2_deadlock
109 %attr(755,root,root) %{_bindir}/db2_dump
110 %attr(755,root,root) %{_bindir}/db2_load
111 %attr(755,root,root) %{_bindir}/db2_printlog
112 %attr(755,root,root) %{_bindir}/db2_recover
113 %attr(755,root,root) %{_bindir}/db2_stat
114
115 %files static
116 %defattr(644,root,root,755)
117 %{_libdir}/libdb2.a
This page took 0.16167 seconds and 3 git commands to generate.