]>
Commit | Line | Data |
---|---|---|
0a0f3f62 JR |
1 | Summary: BSD database library for C |
2 | Name: db1 | |
3 | Version: 1.85 | |
4 | Release: 0.2 | |
5 | Group: Libraries | |
6 | License: BSD | |
7 | URL: http://www.sleepycat.com | |
8 | Source0: http://www.sleepycat.com/update/%{version}/db.%{version}.tar.gz | |
9 | Patch0: db.%{version}.patch | |
10 | PreReq: /sbin/ldconfig | |
11 | Conflicts: glibc < 2.1.90 | |
12 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
13 | ||
14 | %description | |
15 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides | |
16 | embedded database support for both traditional and client/server applications. | |
17 | It should be installed if compatibility is needed with databases created with | |
18 | db1. This library used to be part of the glibc package. | |
19 | ||
20 | %package devel | |
21 | Summary: Development libraries and header files for Berkeley database library | |
22 | Group: Development/Libraries | |
23 | Group(fr): Development/Librairies | |
24 | Group(pl): Programowanie/Biblioteki | |
25 | Requires: %{name} = %{version} | |
26 | Conflicts: glibc-devel < 2.1.90 | |
27 | ||
28 | %description devel | |
29 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides | |
30 | embedded database support for both traditional and client/server applications. | |
31 | Berkeley DB includes B tree, Hashing, Fixed and Variable-length record access | |
32 | methods. | |
33 | ||
34 | This package contains the header files, libraries, and documentation | |
35 | for building programs which use Berkeley DB. | |
36 | ||
37 | %package static | |
38 | Summary: Static libraries for Berkeley database library | |
39 | Group: Development/Libraries | |
40 | Group(fr): Development/Librairies | |
41 | Group(pl): Programowanie/Biblioteki | |
42 | Requires: %{name}-devel = %{version} | |
43 | Conflicts: glibc-static < 2.1.90 | |
44 | ||
45 | %description static | |
46 | The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides | |
47 | embedded database support for both traditional and client/server applications. | |
48 | Berkeley DB includes B tree, Hashing, Fixed and Variable-length record access | |
49 | methods. | |
50 | ||
51 | This package contains the static libraries for building programs which use | |
52 | Berkeley DB. | |
53 | ||
54 | %prep | |
55 | %setup -q -n db.%{version} | |
56 | %patch -p1 | |
57 | ||
58 | %build | |
59 | cd PORT/linux | |
60 | %{__make} OORG="$RPM_OPT_FLAGS" | |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | install -d ${RPM_BUILD_ROOT}%{_prefix}/{include/db1,lib,bin} | |
65 | ||
66 | sed -n '/^\/\*-/,/^ \*\//s/^.\*.\?//p' include/db.h | grep -v '^@.*db\.h' > LICENSE | |
67 | ||
68 | cd PORT/linux | |
69 | sover=`echo libdb.so.* | sed 's/libdb.so.//'` | |
70 | install libdb.a $RPM_BUILD_ROOT/%{_libdir}/libdb1.a | |
71 | install libdb.so.$sover $RPM_BUILD_ROOT/%{_libdir}/libdb1.so.$sover | |
72 | ln -sf libdb1.so.$sover $RPM_BUILD_ROOT/%{_libdir}/libdb1.so | |
73 | ln -sf libdb1.so.$sover $RPM_BUILD_ROOT/%{_libdir}/libdb.so.$sover | |
74 | install ../include/ndbm.h $RPM_BUILD_ROOT/%{_includedir}/db1/ | |
75 | install ../../include/db.h $RPM_BUILD_ROOT/%{_includedir}/db1/ | |
76 | install ../../include/mpool.h $RPM_BUILD_ROOT/%{_includedir}/db1/ | |
77 | install -s db_dump185 $RPM_BUILD_ROOT/%{_bindir}/db1_dump185 | |
78 | cd ../.. | |
79 | ||
80 | strip --strip-unneeded $RPM_BUILD_ROOT%{_bindir}/* | |
81 | strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so.* | |
82 | ||
83 | gzip -9nf docs/*.ps README LICENSE changelog | |
84 | ||
85 | %clean | |
86 | rm -rf ${RPM_BUILD_ROOT} | |
87 | ||
88 | %post -p /sbin/ldconfig | |
89 | %postun -p /sbin/ldconfig | |
90 | ||
91 | %files | |
92 | %defattr(644,root,root,755) | |
93 | %doc {README,LICENSE,changelog}.gz | |
94 | %attr(755,root,root) %{_libdir}/libdb*.so.* | |
95 | %attr(755,root,root) %{_bindir}/db1_dump185 | |
96 | ||
97 | %files devel | |
98 | %defattr(644,root,root,755) | |
99 | %doc docs/*.ps.gz | |
100 | %attr(755,root,root) %{_libdir}/libdb1.so | |
101 | %{_includedir}/db1 | |
102 | ||
103 | %files static | |
104 | %defattr(644,root,root,755) | |
105 | %{_libdir}/libdb1.a |