76c50a
%bcond_with largefile
76c50a
76c50a
Summary: A GNU set of database routines which use extensible hashing
76c50a
Name: gdbm
76c50a
Version: 1.18
9095a6
Release: 2%{?dist}
76c50a
Epoch: 1
76c50a
License: GPLv3+
76c50a
URL: http://www.gnu.org/software/gdbm/
76c50a
76c50a
Source: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz
76c50a
9095a6
Patch1: gdbm-1.17-coverity-fixes.patch
9095a6
# Backport of upstream commit: 00ba17479ff31c6825f0e6f28b965f11525e83f6
9095a6
Patch2: gdbm-1.18-backward-compatibility.patch
76c50a
76c50a
BuildRequires: gcc
76c50a
BuildRequires: libtool
76c50a
BuildRequires: gettext
76c50a
BuildRequires: readline-devel
76c50a
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
76c50a
76c50a
%description
76c50a
Gdbm is a GNU database indexing library, including routines which use
76c50a
extensible hashing.  Gdbm works in a similar way to standard UNIX dbm
76c50a
routines.  Gdbm is useful for developers who write C applications and
76c50a
need access to a simple and efficient database or who are building C
76c50a
applications which will use such a database.
76c50a
76c50a
If you're a C developer and your programs need access to simple
76c50a
database routines, you should install gdbm.  You'll also need to
76c50a
install gdbm-devel.
76c50a
76c50a
%package libs
76c50a
Summary: Libraries files for gdbm
76c50a
76c50a
%description libs
76c50a
Libraries for the Gdbm GNU database indexing library
76c50a
76c50a
%package devel
76c50a
Summary: Development libraries and header files for the gdbm library
76c50a
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
76c50a
Requires(post): info
76c50a
Requires(preun): info
76c50a
76c50a
%description devel
76c50a
Gdbm-devel contains the development libraries and header files for
76c50a
gdbm, the GNU database system.  These libraries and header files are
76c50a
necessary if you plan to do development using the gdbm database.
76c50a
76c50a
Install gdbm-devel if you are developing C programs which will use the
76c50a
gdbm database library.  You'll also need to install the gdbm package.
76c50a
76c50a
%prep
76c50a
%setup -q
9095a6
%patch1 -p1
76c50a
%patch2 -p1
76c50a
76c50a
%build
76c50a
%configure \
76c50a
    --disable-static \
76c50a
%{!?with_largefile: --disable-largefile} \
76c50a
    --disable-rpath \
76c50a
    --enable-libgdbm-compat
76c50a
76c50a
# get rid of rpath (as per https://fedoraproject.org/wiki/Packaging:Guidelines#Beware_of_Rpath)
76c50a
# currently --disable-rpath doesn't work for gdbm_dump|load, gdbmtool and libgdbm_compat.so.4
76c50a
# https://puszcza.gnu.org.ua/bugs/index.php?359
76c50a
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
76c50a
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
76c50a
76c50a
make %{?_smp_mflags}
76c50a
76c50a
%install
76c50a
make DESTDIR=$RPM_BUILD_ROOT install
76c50a
76c50a
%find_lang %{name}
76c50a
76c50a
# create symlinks for compatibility
76c50a
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/gdbm 
76c50a
ln -sf ../gdbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm/gdbm.h
76c50a
ln -sf ../ndbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm/ndbm.h
76c50a
ln -sf ../dbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm/dbm.h
76c50a
76c50a
# Remove libtool archives
76c50a
find %{buildroot} -type f -name "*.la" -delete
76c50a
76c50a
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
76c50a
76c50a
%check
76c50a
export LD_LIBRARY_PATH=`pwd`/src/.libs/:`pwd`/compat/.libs/
76c50a
make check
76c50a
76c50a
%ldconfig_scriptlets libs
76c50a
76c50a
%post devel
76c50a
/sbin/install-info %{_infodir}/gdbm.info.gz %{_infodir}/dir \
76c50a
      --entry="* gdbm: (gdbm).                   The GNU Database." || :
76c50a
76c50a
%preun devel
76c50a
if [ $1 = 0 ]; then
76c50a
    /sbin/install-info --delete %{_infodir}/gdbm.info.gz %{_infodir}/dir \
76c50a
        --entry="* gdbm: (gdbm).                   The GNU Database." || :
76c50a
fi
76c50a
76c50a
%files -f %{name}.lang
76c50a
%doc NEWS README THANKS AUTHORS NOTE-WARNING
76c50a
%{_bindir}/gdbm*
76c50a
%{_mandir}/man1/gdbm*
76c50a
76c50a
%files libs
76c50a
%license COPYING
76c50a
%{_libdir}/libgdbm.so.6*
76c50a
%{_libdir}/libgdbm_compat.so.4*
76c50a
76c50a
%files devel
76c50a
%{_libdir}/libgdbm.so
76c50a
%{_libdir}/libgdbm_compat.so
76c50a
%{_includedir}/*
76c50a
%{_infodir}/*.info*
76c50a
%{_mandir}/man3/* 
76c50a
76c50a
%changelog
9095a6
* Fri Jul 01 2022 <fjanus@redhat.com> - 1.18-2
9095a6
- Add backward compatibility patch
9095a6
- Resolves: #2097704
9095a6
- Backport from upstream commit: 00ba17479ff31c6825f0e6f28b965f11525e83f6
9095a6
76c50a
* Mon Sep 03 2018 mskalick@redhat.com - 1:1.18-1
76c50a
- Rebase to latest release 1.18
76c50a
- Fix issues found by coverity
76c50a
  Resolves: RHBZ#1606956
76c50a
76c50a
* Tue Aug 07 2018 mskalick@redhat.com - 1:1.17-1
76c50a
- Rebase to upstream release 1.17
76c50a
76c50a
* Thu Jun 28 2018 mskalick@redhat.com - 1:1.16-1
76c50a
- Rebase to latest release 1.16
76c50a
76c50a
* Wed Jun 20 2018 mskalick@redhat.com - 1:1.15-1
76c50a
- Rebase to latest upstream relase 1.15
76c50a
76c50a
* Mon Mar 12 2018 Peter Robinson <pbrobinson@fedoraproject.org>a 1:1.14.1-4
76c50a
- Split libraries out to separate libs subpackage
76c50a
- Minor spec cleanups
76c50a
76c50a
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.14.1-3
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
76c50a
76c50a
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:1.14.1-2
76c50a
- Switch to %%ldconfig_scriptlets
76c50a
76c50a
* Mon Jan 29 2018 Marek Skalický <mskalick@redhat.com> - 1:1.14.1-1
76c50a
- Rebase to latest upstream release
76c50a
  (soname bump for ABI breakage in 1.14)
76c50a
76c50a
* Tue Jan 16 2018 Marek Skalický <mskalick@redhat.com> - 1:1.14-3
76c50a
- Fix -devel require to include also epoch
76c50a
76c50a
* Tue Jan 16 2018 Marek Skalický <mskalick@redhat.com> - 1:1.14-2
76c50a
- Introduce epoch to not to break upgrade path from F27
76c50a
76c50a
* Wed Jan 03 2018 Petr Kubat <pkubat@redhat.com> - 1.14-1
76c50a
- Upgrade to gdbm 1.14
76c50a
- Resolves #1467431
76c50a
76c50a
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.13-3
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
76c50a
76c50a
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.13-2
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
76c50a
76c50a
* Thu Mar 23 2017 Marek Skalický <mskalick@redhat.com> - 1.13-1
76c50a
- Upgrade to gdbm 1.13
76c50a
76c50a
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.12-2
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
76c50a
76c50a
* Thu Mar 17 2016 Marek Skalicky <mskalick@redhat.com> - 1.12-1
76c50a
- Upgrade to gdbm-1.12 (#1336604)
76c50a
76c50a
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.11-7
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
76c50a
76c50a
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-6
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
76c50a
76c50a
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1.11-5
76c50a
- Rebuilt for Fedora 23 Change
76c50a
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
76c50a
76c50a
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-4
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
76c50a
76c50a
* Sat Jul 12 2014 Tom Callaway <spot@fedoraproject.org> - 1.11-3
76c50a
- fix license handling
76c50a
76c50a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-2
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
76c50a
76c50a
* Wed Mar 05 2014 Honza Horak <hhorak@redhat.com> - 1.11-1
76c50a
- Upgrade to gdbm-1.11
76c50a
  Resolves: #1046643
76c50a
76c50a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-7
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
76c50a
76c50a
* Mon Mar 25 2013 Honza Horak <hhorak@redhat.com> - 1.10-6
76c50a
- Fixed some issues found by Coverity
76c50a
- Add support of aarch64
76c50a
76c50a
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-5
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
76c50a
76c50a
* Mon Aug 27 2012 Honza Horak <hhorak@redhat.com> - 1.10-4
76c50a
- Spec file cleanup
76c50a
- Use make DESTDIR=... install instead of %%make_install
76c50a
76c50a
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-3
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
76c50a
76c50a
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-2
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
76c50a
76c50a
* Mon Nov 14 2011 Honza Horak <hhorak@redhat.com> - 1.10-1
76c50a
- Updated to new upstream release 1.10
76c50a
- Dropped -shortread patch, which has been already applied by upstream
76c50a
- Disable large file support, that is enabled by default since 1.9, 
76c50a
  but not compatible with db files created using gdbm-1.8.3 and lower
76c50a
- License change to GPLv3+
76c50a
- Add doc files THANKS AUTHORS NOTE-WARNING
76c50a
- Changed text in NOTE-WARNING to correspond with build settings
76c50a
76c50a
* Tue Sep 20 2011 Honza Horak <hhorak@redhat.com> - 1.9.1-1
76c50a
- Updated to new upstream release 1.9.1
76c50a
- Dropped -filestruct, -ndbmlock and -fhs patches, they are not 
76c50a
  needed anymore and GDBM_NOLOCK is used always
76c50a
- Run testsuite
76c50a
76c50a
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.3-9
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
76c50a
76c50a
* Thu Jan 13 2011 Jan Horak <hhorak@redhat.com> - 1.8.3-8
76c50a
- Added filestruct patch (#668178)
76c50a
76c50a
* Mon Jan 03 2011 Karel Klic <kklic@redhat.com> - 1.8.3-7
76c50a
- Removed BuildRoot tag
76c50a
- Removed %%clean section
76c50a
- Added ndbmlock patch (#663932)
76c50a
76c50a
* Mon Apr 12 2010 Karel Klic <kklic@redhat.com> - 1.8.3-6
76c50a
- Use fcntl instead of flock for locking to make nfs safe (#477300)
76c50a
76c50a
* Thu Mar 11 2010 Karel Klic <kklic@redhat.com> - 1.8.3-5
76c50a
- Removed fake Provides: libgdbm.so.2 and corresponding symlinks
76c50a
- Moved autoconf, libtoolize from %%build to %%prep section
76c50a
- Remove static builds from the devel package (#556050)
76c50a
76c50a
* Thu Mar 11 2010 Karel Klic <kklic@redhat.com> - 1.8.3-4
76c50a
- Provides: libgdbm.so.2()(64bit) for x86_64 architecture
76c50a
76c50a
* Thu Mar 11 2010 Karel Klic <kklic@redhat.com> - 1.8.3-3
76c50a
- Added temporary symlinks to retain compatibility with gdbm 1.8.0
76c50a
76c50a
* Wed Mar 10 2010 Rex Dieter <rdieter@fedoraproject.org> - 1.8.3-2
76c50a
- %%files: track shlib sonames, so abi breaks are less of a surprise
76c50a
76c50a
* Tue Mar 09 2010 Karel Klic <kklic@redhat.com> - 1.8.3-1
76c50a
- Newer upstream release
76c50a
- Removed gdbm-1.8.0-64offset.patch, because it was merged by the upstream
76c50a
- `jbj' patch extended and renamed to `zeroheaders'
76c50a
- Added shortread patch from Debian
76c50a
76c50a
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-33
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
76c50a
76c50a
* Fri Apr 17 2009 Stepan Kasal <skasal@redhat.com> - 1.8.0-32
76c50a
- Clean up the spec, for merge review.
76c50a
76c50a
* Fri Feb 27 2009 Stepan Kasal <skasal@redhat.com> - 1.8.0-31
76c50a
- drop *-cflags.patch, move all makefile fixes to *-fhs.patch
76c50a
- propagate libdir to Makefile; no need to set it on cmdline
76c50a
76c50a
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-30
76c50a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
76c50a
76c50a
* Mon Jul 21 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.8.0-29
76c50a
- fix license tag
76c50a
76c50a
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.8.0-28
76c50a
- Autorebuild for GCC 4.3
76c50a
76c50a
* Tue Apr 3 2007 Ondrej Dvoracek <odvorace@redhat.com> - 1.8.0-27
76c50a
- made install-info use in scriptlets safe (#223688)
76c50a
76c50a
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.8.0-26.2.1
76c50a
- rebuild
76c50a
76c50a
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.8.0-26.2
76c50a
- bump again for double-long bug on ppc(64)
76c50a
76c50a
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.8.0-26.1
76c50a
- rebuilt for new gcc4.1 snapshot and glibc changes
76c50a
76c50a
* Tue Jan 24 2006 Warren Togami <wtogami@redhat.com> 1.8.0-26
76c50a
- remove .la (#171535)
76c50a
76c50a
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
76c50a
- rebuilt
76c50a
76c50a
* Sat Apr 09 2005 Florian La Roche <laroche@redhat.com>
76c50a
- rebuild
76c50a
76c50a
* Sun Aug  8 2004 Alan Cox <alan@redhat.com> 1.8.0-24
76c50a
- Close bug #125319
76c50a
76c50a
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
76c50a
- rebuilt
76c50a
76c50a
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
76c50a
- rebuilt
76c50a
76c50a
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
76c50a
- rebuilt
76c50a
76c50a
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
76c50a
- rebuilt
76c50a
76c50a
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
76c50a
- rebuilt
76c50a
76c50a
* Fri Oct  4 2002 Nalin Dahyabhai <nalin@redhat.com> 1.8.0-19
76c50a
- rebuild
76c50a
76c50a
* Fri Sep 13 2002 Nalin Dahyabhai <nalin@redhat.com> 1.8.0-18.1
76c50a
- run make with libdir overridden so that it has the value passed to configure
76c50a
  instead of $(prefix)/lib
76c50a
76c50a
* Wed Jul 24 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.8.0-18
76c50a
- Remove cflags for large database support - not compatible 
76c50a
  with databases without it
76c50a
76c50a
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
76c50a
- automated rebuild
76c50a
76c50a
* Thu May 23 2002 Tim Powers <timp@redhat.com>
76c50a
- automated rebuild
76c50a
76c50a
* Thu Apr 25 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.8.0-15
76c50a
- Use 64bit offset
76c50a
- Patch to make the above not break from downsj@downsj.com (#63980) 
76c50a
76c50a
* Tue Feb 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.8.0-14
76c50a
- Rebuild
76c50a
76c50a
* Fri Jan 25 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.8.0-13
76c50a
- Update location
76c50a
- auto* changes to make it build
76c50a
76c50a
* Wed Oct 17 2001 Trond Eivind Glomsrød <teg@redhat.com> 1.8.0-11
76c50a
- Add URL (# 54607)
76c50a
76c50a
* Mon Jun 25 2001 Nalin Dahyabhai <nalin@redhat.com>
76c50a
- s/Copyright:/License:/g
76c50a
- include text docs in binary package
76c50a
76c50a
* Tue Jun 12 2001 Than Ngo <than@redhat.com>
76c50a
- fix to build against new libtool
76c50a
76c50a
* Mon Mar 19 2001 Trond Eivind Glomsrød <teg@redhat.com>
76c50a
- Make it respect RPM_OPT_FLAGS/CFLAGS - #32242. 
76c50a
  Patch from dan@D00M.cmc.msu.ru
76c50a
76c50a
* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
76c50a
- automatic rebuild
76c50a
76c50a
* Mon Jun  5 2000 Jeff Johnson <jbj@redhat.com>
76c50a
- FHS packaging.
76c50a
76c50a
* Mon Feb  7 2000 Bill Nottingham <notting@redhat.com>
76c50a
- handle compressed manpages
76c50a
76c50a
* Tue Aug 10 1999 Jeff Johnson <jbj@redhat.com>
76c50a
- make sure created database header is initialized (#4457).
76c50a
76c50a
* Tue Jun  1 1999 Jeff Johnson <jbj@redhat.com>
76c50a
- update to 1.8.0.
76c50a
- repackage to include /usr/include/gdbm/*dbm.h compatibility includes.
76c50a
76c50a
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
76c50a
- auto rebuild in the new build environment (release 19)
76c50a
76c50a
* Thu Dec 17 1998 Cristian Gafton <gafton@redhat.com>
76c50a
- build against glibc 2.1
76c50a
76c50a
* Thu May 07 1998 Prospector System <bugs@redhat.com>
76c50a
- translations modified for de, fr, tr
76c50a
76c50a
* Thu Apr 30 1998 Cristian Gafton <gafton@redhat.com>
76c50a
- gdbm-devel moved to Development/Libraries
76c50a
76c50a
* Wed Apr 08 1998 Cristian Gafton <gafton@redhat.com>
76c50a
- buildroot and built for Manhattan
76c50a
76c50a
* Tue Oct 14 1997 Donnie Barnes <djb@redhat.com>
76c50a
- spec file cleanups
76c50a
76c50a
* Thu Jun 12 1997 Erik Troan <ewt@redhat.com>
76c50a
- built against glibc