source: projects/specs/trunk/lib/libd/libdb/libdb-vl.spec @ 8458

Revision 8458, 18.4 KB checked in by tomop, 12 years ago (diff)

libdb-5.3.28-5

Line 
1%define __soversion_major 5
2%define __soversion %{__soversion_major}.3
3
4%bcond_with java
5
6Summary: The Berkeley DB database library for C
7Name: libdb
8Version: 5.3.28
9Release: 5%{?_dist_release}
10Source0: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz
11Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz
12# For mt19937db.c
13Source2: http://www.gnu.org/licenses/lgpl-2.1.txt
14Patch0: libdb-multiarch.patch
15# db-1.85 upstream patches
16Patch10: http://www.oracle.com/technology/products/berkeley-db/db/update/1.85/patch.1.1
17Patch11: http://www.oracle.com/technology/products/berkeley-db/db/update/1.85/patch.1.2
18Patch12: http://www.oracle.com/technology/products/berkeley-db/db/update/1.85/patch.1.3
19Patch13: http://www.oracle.com/technology/products/berkeley-db/db/update/1.85/patch.1.4
20# other patches
21Patch20: db-1.85-errno.patch
22Patch22: db-4.6.21-1.85-compat.patch
23Patch24: db-4.5.20-jni-include-dir.patch
24# License clarification patch
25# http://devel.trisquel.info/gitweb/?p=package-helpers.git;a=blob;f=helpers/DATA/db4.8/007-mt19937db.c_license.patch;h=1036db4d337ce4c60984380b89afcaa63b2ef88f;hb=df48d40d3544088338759e8bea2e7f832a564d48
26Patch25: 007-mt19937db.c_license.patch
27URL: http://www.oracle.com/database/berkeley-db/
28License: BSD and LGPLv2 and Sleepycat
29Group: System Environment/Libraries
30BuildRequires: perl libtool
31BuildRequires: tcl >= 8.5.2-3
32%if %{with java}
33BuildRequires: java-devel >= 1:1.6.0
34%endif
35#BuildRequires: chrpath
36#Conflicts: filesystem < 3
37
38Vendor: Project Vine
39Distribution: Vine Linux
40Packager: tomop
41
42%description
43The Berkeley Database (Berkeley DB) is a programmatic toolkit that
44provides embedded database support for both traditional and
45client/server applications. The Berkeley DB includes B+tree, Extended
46Linear Hashing, Fixed and Variable-length record access methods,
47transactions, locking, logging, shared memory caching, and database
48recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is
49used by many applications, including Python and Perl, so this should
50be installed on all systems.
51
52%package utils
53Summary: Command line tools for managing Berkeley DB databases
54Group: Applications/Databases
55Requires: %{name}%{?_isa} = %{version}-%{release}
56Obsoletes: db4-utils
57
58%description utils
59The Berkeley Database (Berkeley DB) is a programmatic toolkit that
60provides embedded database support for both traditional and
61client/server applications. Berkeley DB includes B+tree, Extended
62Linear Hashing, Fixed and Variable-length record access methods,
63transactions, locking, logging, shared memory caching, and database
64recovery. DB supports C, C++, Java and Perl APIs.
65
66%package devel
67Summary: C development files for the Berkeley DB library
68Group: Development/Libraries
69Requires: %{name}%{?_isa} = %{version}-%{release}
70Obsoletes: db4-devel
71
72%description devel
73The Berkeley Database (Berkeley DB) is a programmatic toolkit that
74provides embedded database support for both traditional and
75client/server applications. This package contains the header files,
76libraries, and documentation for building programs which use the
77Berkeley DB.
78
79%package devel-doc
80Summary: C development documentation files for the Berkeley DB library
81Group: Documentation
82Requires: %{name} = %{version}-%{release}
83Requires: %{name}-devel = %{version}-%{release}
84BuildArch: noarch
85
86%description devel-doc
87The Berkeley Database (Berkeley DB) is a programmatic toolkit that
88provides embedded database support for both traditional and
89client/server applications. This package contains the header files,
90libraries, and documentation for building programs which use the
91Berkeley DB.
92
93%package devel-static
94Summary: Berkeley DB static libraries
95Group: Development/Libraries
96Requires: %{name}-devel%{?_isa} = %{version}-%{release}
97
98%description devel-static
99The Berkeley Database (Berkeley DB) is a programmatic toolkit that
100provides embedded database support for both traditional and
101client/server applications. This package contains static libraries
102needed for applications that require static linking of
103Berkeley DB.
104
105%package cxx
106Summary: The Berkeley DB database library for C++
107Group: System Environment/Libraries
108Requires: %{name}%{?_isa} = %{version}-%{release}
109
110%description cxx
111The Berkeley Database (Berkeley DB) is a programmatic toolkit that
112provides embedded database support for both traditional and
113client/server applications. The Berkeley DB includes B+tree, Extended
114Linear Hashing, Fixed and Variable-length record access methods,
115transactions, locking, logging, shared memory caching, and database
116recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is
117used by many applications, including Python and Perl, so this should
118be installed on all systems.
119
120%package cxx-devel
121Summary: The Berkeley DB database library for C++
122Group: System Environment/Libraries
123Requires: %{name}-cxx%{?_isa} = %{version}-%{release}
124Requires: %{name}-devel%{?_isa} = %{version}-%{release}
125
126%description cxx-devel
127The Berkeley Database (Berkeley DB) is a programmatic toolkit that
128provides embedded database support for both traditional and
129client/server applications. The Berkeley DB includes B+tree, Extended
130Linear Hashing, Fixed and Variable-length record access methods,
131transactions, locking, logging, shared memory caching, and database
132recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is
133used by many applications, including Python and Perl, so this should
134be installed on all systems.
135
136%package tcl
137Summary: Development files for using the Berkeley DB with tcl
138Group: Development/Libraries
139Requires: %{name}%{?_isa} = %{version}-%{release}
140
141%description tcl
142The Berkeley Database (Berkeley DB) is a programmatic toolkit that
143provides embedded database support for both traditional and
144client/server applications. This package contains the libraries
145for building programs which use the Berkeley DB in Tcl.
146
147%package tcl-devel
148Summary: Development files for using the Berkeley DB with tcl
149Group: Development/Libraries
150Requires: %{name}-tcl%{?_isa} = %{version}-%{release}
151
152%description tcl-devel
153The Berkeley Database (Berkeley DB) is a programmatic toolkit that
154provides embedded database support for both traditional and
155client/server applications. This package contains the libraries
156for building programs which use the Berkeley DB in Tcl.
157
158%package sql
159Summary: Development files for using the Berkeley DB with sql
160Group: Development/Libraries
161Requires: %{name}%{?_isa} = %{version}-%{release}
162
163%description sql
164The Berkeley Database (Berkeley DB) is a programmatic toolkit that
165provides embedded database support for both traditional and
166client/server applications. This package contains the libraries
167for building programs which use the Berkeley DB in SQL.
168
169%package sql-devel
170Summary: Development files for using the Berkeley DB with sql
171Group: Development/Libraries
172Requires: %{name}-sql%{?_isa} = %{version}-%{release}
173
174%description sql-devel
175The Berkeley Database (Berkeley DB) is a programmatic toolkit that
176provides embedded database support for both traditional and
177client/server applications. This package contains the libraries
178for building programs which use the Berkeley DB in SQL.
179
180%if %{with java}
181%package java
182Summary: Development files for using the Berkeley DB with Java
183Group: Development/Libraries
184Requires: %{name}%{?_isa} = %{version}-%{release}
185
186%description java
187The Berkeley Database (Berkeley DB) is a programmatic toolkit that
188provides embedded database support for both traditional and
189client/server applications. This package contains the libraries
190for building programs which use the Berkeley DB in Java.
191
192%package java-devel
193Summary: Development files for using the Berkeley DB with Java
194Group: Development/Libraries
195Requires: %{name}-java%{?_isa} = %{version}-%{release}
196
197%description java-devel
198The Berkeley Database (Berkeley DB) is a programmatic toolkit that
199provides embedded database support for both traditional and
200client/server applications. This package contains the libraries
201for building programs which use the Berkeley DB in Java.
202%endif
203
204%prep
205%setup -q -n db-%{version} -a 1
206cp %{SOURCE2} .
207
208%patch0 -p1 -b .multiarch
209pushd db.1.85/PORT/linux
210%patch10 -p0 -b .1.1
211popd
212pushd db.1.85
213%patch11 -p0 -b .1.2
214%patch12 -p0 -b .1.3
215%patch13 -p0 -b .1.4
216%patch20 -p1 -b .errno
217popd
218
219%patch22 -p1 -b .185compat
220%patch24 -p1 -b .4.5.20.jni
221%patch25 -p1 -b .licensefix
222
223cd dist
224./s_config
225cd ..
226
227%build
228CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
229CFLAGS="$CFLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -I../../../lang/sql/sqlite/ext/fts3/"
230export CFLAGS
231
232# Build the old db-185 libraries.
233make -C db.1.85/PORT/%{_os} OORG="$CFLAGS"
234
235test -d dist/dist-tls || mkdir dist/dist-tls
236# Static link db_dump185 with old db-185 libraries.
237/bin/sh libtool --tag=CC --mode=compile %{__cc} $RPM_OPT_FLAGS -Idb.1.85/PORT/%{_os}/include -D_REENTRANT -c util/db_dump185.c -o dist/dist-tls/db_dump185.lo
238/bin/sh libtool --tag=LD --mode=link %{__cc} -o dist/dist-tls/db_dump185 dist/dist-tls/db_dump185.lo db.1.85/PORT/%{_os}/libdb.a
239
240# Update config files to understand aarch64
241#for dir in dist lang/sql/sqlite lang/sql/jdbc lang/sql/odbc; do
242#  cp /usr/lib/rpm/config.{guess,sub} "$dir"
243#done
244
245pushd dist/dist-tls
246%define _configure ../configure
247%configure -C \
248        --enable-compat185 \
249        --enable-dump185 \
250        --enable-shared \
251        --enable-static \
252        --enable-tcl \
253        --with-tcl=%{_libdir} \
254        --enable-cxx \
255        --enable-sql \
256        --enable-test \
257        --disable-rpath \
258        --with-tcl=%{_libdir}/tcl8.5 \
259%if %{with java}
260        --enable-java
261%endif
262
263# Remove libtool predep_objects and postdep_objects wonkiness so that
264# building without -nostdlib doesn't include them twice.  Because we
265# already link with g++, weird stuff happens if you don't let the
266# compiler handle this.
267perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' libtool
268perl -pi -e 's/^postdep_objects=".*$/postdep_objects=""/' libtool
269perl -pi -e 's/-shared -nostdlib/-shared/' libtool
270
271make %{?_smp_mflags}
272
273%if %{with java}
274# XXX hack around libtool not creating ./libs/libdb_java-X.Y.lai
275LDBJ=./.libs/libdb_java-%{__soversion}.la
276if test -f ${LDBJ} -a ! -f ${LDBJ}i; then
277        sed -e 's,^installed=no,installed=yes,' < ${LDBJ} > ${LDBJ}i
278fi
279%endif
280
281popd
282
283%install
284rm -rf ${RPM_BUILD_ROOT}
285mkdir -p ${RPM_BUILD_ROOT}%{_includedir}
286mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
287
288%makeinstall STRIP=/bin/true -C dist/dist-tls
289
290# XXX Nuke non-versioned archives and symlinks
291rm -f ${RPM_BUILD_ROOT}%{_libdir}/{libdb.a,libdb_cxx.a,libdb_tcl.a,libdb_sql.a}
292
293chmod +x ${RPM_BUILD_ROOT}%{_libdir}/*.so*
294
295# Move the header files to a subdirectory, in case we're deploying on a
296# system with multiple versions of DB installed.
297mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/%{name}
298mv ${RPM_BUILD_ROOT}%{_includedir}/*.h ${RPM_BUILD_ROOT}%{_includedir}/%{name}/
299
300# Create symlinks to includes so that "use <db.h> and link with -ldb" works.
301for i in db.h db_cxx.h db_185.h; do
302        ln -s %{name}/$i ${RPM_BUILD_ROOT}%{_includedir}
303done
304
305%if %{with java}
306# Move java jar file to the correct place
307mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/java
308mv ${RPM_BUILD_ROOT}%{_libdir}/*.jar ${RPM_BUILD_ROOT}%{_datadir}/java
309%endif
310
311# Eliminate installed doco
312rm -rf ${RPM_BUILD_ROOT}%{_prefix}/docs
313
314# XXX Avoid Permission denied. strip when building as non-root.
315chmod u+w ${RPM_BUILD_ROOT}%{_bindir} ${RPM_BUILD_ROOT}%{_bindir}/*
316
317# remove unneeded .la files (#225675)
318rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la
319
320# remove RPATHs
321#chrpath -d ${RPM_BUILD_ROOT}%{_libdir}/*.so ${RPM_BUILD_ROOT}%{_bindir}/*
322
323# unify documentation and examples, remove stuff we don't need
324rm -rf docs/csharp
325rm -rf examples/csharp
326rm -rf docs/installation
327mv examples docs
328
329%clean
330rm -rf ${RPM_BUILD_ROOT}
331
332%post
333/sbin/ldconfig
334
335%postun
336/sbin/ldconfig
337
338%post cxx
339/sbin/ldconfig
340
341%postun cxx
342/sbin/ldconfig
343
344%post sql
345/sbin/ldconfig
346
347%postun sql
348/sbin/ldconfig
349
350%post tcl
351/sbin/ldconfig
352
353%postun tcl
354 /sbin/ldconfig
355
356%if %{with java}
357%post java
358/sbin/ldconfig
359
360%postun java
361/sbin/ldconfig
362
363%endif
364
365%files
366%defattr(-,root,root,-)
367%doc LICENSE README lgpl-2.1.txt
368%{_libdir}/libdb-%{__soversion}.so
369%{_libdir}/libdb-%{__soversion_major}.so
370
371%files devel
372%defattr(-,root,root,-)
373%{_libdir}/libdb.so
374%dir %{_includedir}/%{name}
375%{_includedir}/%{name}/db.h
376%{_includedir}/%{name}/db_185.h
377%{_includedir}/db.h
378%{_includedir}/db_185.h
379
380%files devel-doc
381%defattr(-,root,root,-)
382%doc    docs/*
383
384%files devel-static
385%defattr(-,root,root,-)
386%{_libdir}/libdb-%{__soversion}.a
387%{_libdir}/libdb_cxx-%{__soversion}.a
388%{_libdir}/libdb_tcl-%{__soversion}.a
389%{_libdir}/libdb_sql-%{__soversion}.a
390%if %{with java}
391%{_libdir}/libdb_java-%{__soversion}.a
392%endif
393
394%files utils
395%defattr(-,root,root,-)
396%{_bindir}/db*_archive
397%{_bindir}/db*_checkpoint
398%{_bindir}/db*_deadlock
399%{_bindir}/db*_dump*
400%{_bindir}/db*_hotbackup
401%{_bindir}/db*_load
402%{_bindir}/db*_printlog
403%{_bindir}/db*_recover
404%{_bindir}/db*_replicate
405%{_bindir}/db*_stat
406%{_bindir}/db*_upgrade
407%{_bindir}/db*_verify
408%{_bindir}/db*_tuner
409
410%files cxx
411%defattr(-,root,root,-)
412%{_libdir}/libdb_cxx-%{__soversion}.so
413%{_libdir}/libdb_cxx-%{__soversion_major}.so
414
415%files cxx-devel
416%defattr(-,root,root,-)
417%{_includedir}/%{name}/db_cxx.h
418%{_includedir}/db_cxx.h
419%{_libdir}/libdb_cxx.so
420
421%files tcl
422%defattr(-,root,root,-)
423%{_libdir}/libdb_tcl-%{__soversion}.so
424%{_libdir}/libdb_tcl-%{__soversion_major}.so
425
426%files tcl-devel
427%defattr(-,root,root,-)
428%{_libdir}/libdb_tcl.so
429
430%files sql
431%defattr(-,root,root,-)
432%{_libdir}/libdb_sql-%{__soversion}.so
433%{_libdir}/libdb_sql-%{__soversion_major}.so
434
435%files sql-devel
436%defattr(-,root,root,-)
437%{_bindir}/dbsql
438%{_libdir}/libdb_sql.so
439%{_includedir}/%{name}/dbsql.h
440
441%if %{with java}
442%files java
443%defattr(-,root,root,-)
444%{_libdir}/libdb_java-%{__soversion_major}*.so
445%{_datadir}/java/*.jar
446
447%files java-devel
448%defattr(-,root,root,-)
449%{_libdir}/libdb_java.so
450%endif
451
452%changelog
453* Mon May 19 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.3.28-5
454- initial build for Vine Linux.
455
456* Sat Feb 22 2014 Peter Robinson <pbrobinson@fedoraproject.org> 5.3.28-4
457- Add some of the previous aarch64 bits back as the sub configure don't use the macro
458
459* Sun Jan 26 2014 Peter Robinson <pbrobinson@fedoraproject.org> 5.3.28-3
460- Fix configure macro usage for better aarch64 build fix
461
462* Wed Nov 06 2013 Jan Stanek <jstanek@redhat.com> - 5.3.28-2
463- Updated config files to allow build on aarch64 (#1022970)
464
465* Tue Oct 08 2013 Jan Stanek <jstanek@redhat.com> - 5.3.28-1
466- Added Sleepycat to the license list (#1013841)
467- Updated to 5.3.28 (#1013233)
468
469* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.3.21-13
470- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
471
472* Tue May 28 2013 Tom Callaway <spot@fedoraproject.org> - 5.3.21-12
473- add copy of lgpl-2.1.txt
474
475* Thu May 16 2013 Jan Stanek <jstanek@redhat.com> - 5.3.21-11
476- Fix missing debuginfo issue for utils subpackage
477
478* Thu May  9 2013 Tom Callaway <spot@fedoraproject.org> - 5.3.21-10
479- add license clarification fix
480
481* Wed Apr 03 2013 Jan Stanek <jstanek@redhat.com> 5.3.21-9
482- Added sqlite compability CFLAGS (#788496)
483
484* Wed Mar 27 2013 Jan Stanek <jstanek@redhat.com> 5.3.21-8
485- Cleaning the specfile - removed gcc-java dependecy other way
486
487* Wed Mar 27 2013 Jan Stanek <jstanek@redhat.com> 5.3.21-7
488- Removed dependency on obsolete gcc-java package (#927742)
489
490* Thu Mar  7 2013 Jindrich Novy <jnovy@redhat.com> 5.3.21-6
491- add LGPLv2+ and remove Sleepycat in license tag (#886838)
492
493* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.3.21-5
494- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
495
496* Tue Nov 27 2012 Tom Callaway <spot@fedoraproject.org> - 5.3.21-4
497- fix license tag
498
499* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.3.21-3
500- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
501
502* Sat Jul 14 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 5.3.21-2
503- Specify tag for libtool (fixes FTBFS # 838334 )
504
505* Thu Jul  5 2012 Jindrich Novy <jnovy@redhat.com> 5.3.21-1
506- update to 5.3.21
507http://download.oracle.com/otndocs/products/berkeleydb/html/changelog_5_3.html
508
509* Tue Jul  3 2012 Jindrich Novy <jnovy@redhat.com> 5.3.15-5
510- move C++ header files to cxx-devel
511
512* Tue Jul  3 2012 Jindrich Novy <jnovy@redhat.com> 5.3.15-4
513- fix -devel packages dependencies yet more (#832225)
514
515* Sun May  6 2012 Jindrich Novy <jnovy@redhat.com> 5.3.15-3
516- package -devel packages correctly
517
518* Sat Apr 21 2012 Jindrich Novy <jnovy@redhat.com> 5.3.15-2
519- fix multiarch conflict in libdb-devel (#812901)
520- remove unneeded dos2unix BR
521
522* Thu Mar 15 2012 Jindrich Novy <jnovy@redhat.com> 5.3.15-1
523- update to 5.3.15
524  http://download.oracle.com/otndocs/products/berkeleydb/html/changelog_5_3.html
525
526* Fri Feb 17 2012 Deepak Bhole <dbhole@redhat.com> 5.2.36-5
527- Resolves rhbz#794472
528- Patch from Omair Majid <omajid@redhat.com> to remove explicit Java 6 req.
529
530* Wed Jan 25 2012 Harald Hoyer <harald@redhat.com> 5.2.36-4
531- add filesystem guard
532
533* Wed Jan 25 2012 Harald Hoyer <harald@redhat.com> 5.2.36-3
534- install everything in /usr
535  https://fedoraproject.org/wiki/Features/UsrMove
536
537* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.36-2
538- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
539
540* Wed Jun 15 2011 Jindrich Novy <jnovy@redhat.com> 5.2.36-1
541- update to 5.2.36,
542  http://download.oracle.com/otndocs/products/berkeleydb/html/changelog_5_2.html#id3647664
543
544* Wed Jun 15 2011 Jindrich Novy <jnovy@redhat.com> 5.2.28-2
545- move development documentation to devel-doc subpackage (#705386)
546
547* Tue Jun 14 2011 Jindrich Novy <jnovy@redhat.com> 5.2.28-1
548- update to 5.2.28
549
550* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.25-2
551- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
552
553* Thu Feb  3 2011 Jindrich Novy <jnovy@redhat.com> 5.1.25-1
554- update to 5.1.25
555
556* Wed Sep 29 2010 jkeating - 5.1.19-2
557- Rebuilt for gcc bug 634757
558
559* Fri Sep 10 2010 Jindrich Novy <jnovy@redhat.com> 5.1.19-1
560- update to 5.1.19
561- rename -devel-static to -static subpackage (#617800)
562- build java on all arches
563
564* Wed Jul  7 2010 Jindrich Novy <jnovy@redhat.com> 5.0.26-1
565- update to 5.0.26
566- drop BR: ed
567
568* Thu Jun 17 2010 Jindrich Novy <jnovy@redhat.com> 5.0.21-2
569- add Requires: libdb-cxx to libdb-devel
570
571* Wed Apr 21 2010 Jindrich Novy <jnovy@redhat.com> 5.0.21-1
572- initial build
573
574* Thu Apr 15 2010 Jindrich Novy <jnovy@redhat.com> 5.0.21-0.2
575- remove C# documentation
576- disable/remove rpath
577- fix description
578- tighten dependencies
579- run ldconfig for cxx and sql subpackages
580
581* Fri Apr  9 2010 Jindrich Novy <jnovy@redhat.com> 5.0.21-0.1
582- enable sql
583- package 5.0.21
Note: See TracBrowser for help on using the repository browser.