From 4ec17cc5463ef101c05ab19f415d333f53a475b7 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 14 Aug 2011 09:19:04 +0000 Subject: [PATCH] - updated to 1.9.1 NOTE: sonames changed; database format could have changed on those archs, which didn't previously use largefile by default; see gdbm18 and gdbm-export packages for compatibility and db conversion) - updated info,link-compat patches - removed obsolete jbj,linking,make-jN patches Changed files: gdbm-info.patch -> 1.4 gdbm-jbj.patch -> 1.2 gdbm-link-compat.patch -> 1.2 gdbm-linking.patch -> 1.3 gdbm-make-jN.patch -> 1.2 gdbm.spec -> 1.82 --- gdbm-info.patch | 18 ++++---- gdbm-jbj.patch | 11 ----- gdbm-link-compat.patch | 17 ++++---- gdbm-linking.patch | 35 ---------------- gdbm-make-jN.patch | 11 ----- gdbm.spec | 93 +++++++++++++++++++++++++++++------------- 6 files changed, 80 insertions(+), 105 deletions(-) delete mode 100644 gdbm-jbj.patch delete mode 100644 gdbm-linking.patch delete mode 100644 gdbm-make-jN.patch diff --git a/gdbm-info.patch b/gdbm-info.patch index 9a9e78e..f680167 100644 --- a/gdbm-info.patch +++ b/gdbm-info.patch @@ -1,14 +1,14 @@ ---- gdbm-1.8.3/gdbm.texinfo.orig Tue Oct 15 23:59:38 2002 -+++ gdbm-1.8.3/gdbm.texinfo Tue Dec 24 23:43:32 2002 -@@ -2,9 +2,9 @@ - @comment %**start of header (This is for running Texinfo on a region.) - @setfilename gdbm.info - @settitle gdbm +--- gdbm-1.9.1/doc/gdbm.texinfo.orig 2011-08-11 14:07:32.000000000 +0200 ++++ gdbm-1.9.1/doc/gdbm.texinfo 2011-08-14 09:30:31.906384656 +0200 +@@ -6,9 +6,9 @@ + @settitle gdbm manual + + @ifinfo -@dircategory Programming & development tools +@dircategory Libraries: @direntry --* GDBM: (gdbm). The GNU database manager. +-* GDBM: (gdbm). The GNU database manager. +* GDBM: (gdbm). The GNU database manager @end direntry - @c @setchapternewpage odd - @comment %**end of header (This is for running Texinfo on a region.) + @end ifinfo + diff --git a/gdbm-jbj.patch b/gdbm-jbj.patch deleted file mode 100644 index 37f494e..0000000 --- a/gdbm-jbj.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gdbm-1.8.0/gdbmopen.c.jbj Tue Aug 10 10:57:38 1999 -+++ gdbm-1.8.0/gdbmopen.c Tue Aug 10 10:59:06 1999 -@@ -214,7 +214,7 @@ - file_block_size = block_size; - - /* Get space for the file header. */ -- dbf->header = (gdbm_file_header *) malloc (file_block_size); -+ dbf->header = (gdbm_file_header *) calloc (1, file_block_size); - if (dbf->header == NULL) - { - gdbm_close (dbf); diff --git a/gdbm-link-compat.patch b/gdbm-link-compat.patch index 834b85a..430422a 100644 --- a/gdbm-link-compat.patch +++ b/gdbm-link-compat.patch @@ -1,11 +1,8 @@ ---- gdbm-1.8.3/Makefile.in~ 2007-02-06 01:33:16.000000000 +0100 -+++ gdbm-1.8.3/Makefile.in 2007-02-06 01:35:16.000000000 +0100 -@@ -161,7 +161,7 @@ - libgdbm_compat.la: $(C_LOBJS) gdbm.h - rm -f libgdbm_compat.la - $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libgdbm_compat.la -rpath $(libdir) \ -- -version-info $(SHLIB_VER) $(C_LOBJS) -+ -version-info $(SHLIB_VER) $(C_LOBJS) libgdbm.la +--- gdbm-1.9.1/compat/Makefile.am.orig 2011-08-09 16:58:44.000000000 +0200 ++++ gdbm-1.9.1/compat/Makefile.am 2011-08-14 10:31:15.926382830 +0200 +@@ -50,4 +50,5 @@ + libgdbm_compat_la_SOURCES = $(DBM_CF) $(NDBM_CF) + + libgdbm_compat_la_LDFLAGS = -version-info $(VI_CURRENT):$(VI_REVISION):$(VI_AGE) ++libgdbm_compat_la_LIBADD = $(top_builddir)/src/libgdbm.la - gdbm.h: gdbm.proto gdbmerrno.h gdbm.proto2 - rm -f gdbm.h diff --git a/gdbm-linking.patch b/gdbm-linking.patch deleted file mode 100644 index fa3daaf..0000000 --- a/gdbm-linking.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- gdbm-1.8.3/Makefile.in.orig 2007-01-23 22:55:03.000000000 +0100 -+++ gdbm-1.8.3/Makefile.in 2007-01-23 22:57:24.000000000 +0100 -@@ -130,7 +130,7 @@ - $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \ - $(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \ - $(INSTALL_ROOT)$(infodir) -- $(LIBTOOL) $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la -+ $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la - $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) gdbm.h \ - $(INSTALL_ROOT)$(includedir)/gdbm.h - $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.3 \ -@@ -140,7 +140,7 @@ - install-compat: - $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \ - $(INSTALL_ROOT)$(includedir) -- $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \ -+ $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm_compat.la \ - $(INSTALL_ROOT)$(libdir)/libgdbm_compat.la - $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/dbm.h \ - $(INSTALL_ROOT)$(includedir)/dbm.h -@@ -155,12 +155,12 @@ - - libgdbm.la: $(LOBJS) gdbm.h - rm -f libgdbm.la -- $(LIBTOOL) --mode=link $(CC) -o libgdbm.la -rpath $(libdir) \ -+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libgdbm.la -rpath $(libdir) \ - -version-info $(SHLIB_VER) $(LOBJS) - - libgdbm_compat.la: $(C_LOBJS) gdbm.h - rm -f libgdbm_compat.la -- $(LIBTOOL) --mode=link $(CC) -o libgdbm_compat.la -rpath $(libdir) \ -+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libgdbm_compat.la -rpath $(libdir) \ - -version-info $(SHLIB_VER) $(C_LOBJS) - - gdbm.h: gdbm.proto gdbmerrno.h gdbm.proto2 diff --git a/gdbm-make-jN.patch b/gdbm-make-jN.patch deleted file mode 100644 index 3815cb9..0000000 --- a/gdbm-make-jN.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gdbm-1.8.3/Makefile.in~ 2007-12-18 23:27:16.000000000 +0100 -+++ gdbm-1.8.3/Makefile.in 2007-12-18 23:31:52.750925500 +0100 -@@ -158,7 +158,7 @@ - $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libgdbm.la -rpath $(libdir) \ - -version-info $(SHLIB_VER) $(LOBJS) - --libgdbm_compat.la: $(C_LOBJS) gdbm.h -+libgdbm_compat.la: $(C_LOBJS) gdbm.h libgdbm.la - rm -f libgdbm_compat.la - $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libgdbm_compat.la -rpath $(libdir) \ - -version-info $(SHLIB_VER) $(C_LOBJS) libgdbm.la diff --git a/gdbm.spec b/gdbm.spec index e22bb95..c530580 100644 --- a/gdbm.spec +++ b/gdbm.spec @@ -1,3 +1,7 @@ +# +# Conditional build: +%bcond_without gdbmexport # gdbmexport compatibility tool +# Summary: GNU database library for C Summary(de.UTF-8): GNU-Datenbank-Library für C Summary(fr.UTF-8): La librairie GNU de bases de données pout le langage C @@ -5,19 +9,17 @@ Summary(pl.UTF-8): Biblioteka GNU bazy danych dla języka C Summary(ru.UTF-8): Библиотека базы данных GNU для C Summary(uk.UTF-8): Бібліотека бази даних GNU для C Name: gdbm -Version: 1.8.3 -Release: 8 -License: GPL +Version: 1.9.1 +Release: 1 +License: GPL v3+ Group: Libraries -Source0: ftp://ftp.gnu.org/pub/gnu/gdbm/%{name}-%{version}.tar.gz -# Source0-md5: 1d1b1d5c0245b1c00aff92da751e9aa1 +Source0: http://ftp.gnu.org/gnu/gdbm/%{name}-%{version}.tar.gz +# Source0-md5: 59f6e4c4193cb875964ffbe8aa384b58 Patch0: %{name}-info.patch -Patch1: %{name}-jbj.patch -Patch2: %{name}-linking.patch -Patch3: %{name}-link-compat.patch -Patch4: %{name}-make-jN.patch -BuildRequires: autoconf -BuildRequires: automake +Patch1: %{name}-link-compat.patch +BuildRequires: autoconf >= 2.63 +BuildRequires: automake >= 1:1.11 +%{?with_gdbmexport:BuildRequires: gdbm18-devel >= 1.8.3} BuildRequires: libtool BuildRequires: texinfo Obsoletes: libgdbm2 @@ -128,29 +130,47 @@ Biblioteka statyczna gdbm. %description static -l uk.UTF-8 Це статична бібліотека gdbm, бази даних GNU. +%package export +Summary: gdbmexport utility to export old GDBM 1.8.x databases +Summary(pl.UTF-8): Narzędzie gdbmexport pozwalające wyeksportować stare bazy GDBM 1.8.x +Group: Applications/File +Requires: gdbm18 >= 1.8.3 + +%description export +gdbmexport utility to export old GDBM 1.8.x databases in order to load +them in new GDBM format. + +%description export -l pl.UTF-8 +Narzędzie gdbmexport pozwalające wyeksportować stare bazy GDBM 1.8.x w +celu wczytania do nowego formatu GDBM. + %prep -%setup -q +%setup -q %patch0 -p1 %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 %build %{__libtoolize} %{__aclocal} %{__autoheader} %{__autoconf} -%configure +%{__automake} +%configure \ + --enable-libgdbm-compat \ + --disable-silent-rules \ +%if %{with gdbmexport} + --enable-gdbm-export \ + --with-gdbm183-includedir=%{_includedir}/gdbm-1.8 \ + --with-gdbm183-library="-lgdbm-1.8" +%endif %{__make} %install rm -rf $RPM_BUILD_ROOT -%{__make} -j1 install install-compat \ - INSTALL_ROOT=$RPM_BUILD_ROOT \ - BINOWN=`id -u` BINGRP=`id -g` +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT @@ -158,25 +178,40 @@ rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig -%post devel -p /sbin/postshell +%post devel -p /sbin/postshell -/usr/sbin/fix-info-dir -c %{_infodir} -%postun devel -p /sbin/postshell +%postun devel -p /sbin/postshell -/usr/sbin/fix-info-dir -c %{_infodir} %files %defattr(644,root,root,755) -%doc ChangeLog NEWS README -%attr(755,root,root) %{_libdir}/lib*.so.*.* +%doc AUTHORS ChangeLog NEWS NOTE-WARNING README +%attr(755,root,root) %{_bindir}/testgdbm +%attr(755,root,root) %{_libdir}/libgdbm.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libgdbm.so.4 +%attr(755,root,root) %{_libdir}/libgdbm_compat.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libgdbm_compat.so.4 %files devel %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/lib*.so -%{_libdir}/lib*.la -%{_mandir}/man3/* -%{_includedir}/* -%{_infodir}/gdbm* +%attr(755,root,root) %{_libdir}/libgdbm.so +%attr(755,root,root) %{_libdir}/libgdbm_compat.so +%{_libdir}/libgdbm.la +%{_libdir}/libgdbm_compat.la +%{_includedir}/dbm.h +%{_includedir}/gdbm.h +%{_includedir}/ndbm.h +%{_mandir}/man3/gdbm.3* +%{_infodir}/gdbm.info* %files static %defattr(644,root,root,755) -%{_libdir}/lib*.a +%{_libdir}/libgdbm.a +%{_libdir}/libgdbm_compat.a + +%if %{with gdbmexport} +%files export +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/gdbmexport +%endif -- 2.43.0