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