234b1f
%bcond_with largefile
234b1f
Summary: A GNU set of database routines which use extensible hashing
234b1f
Name: gdbm
234b1f
Version: 1.10
234b1f
Release: 8%{?dist}
234b1f
Source: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz
234b1f
# Prevent gdbm from storing uninitialized memory content
234b1f
# to database files.
234b1f
# The change allows Valgrind users to debug their packages without
234b1f
# dealing with gdbm-related noise. It also improves security, as 
234b1f
# the uninitialized memory might contain sensitive informations 
234b1f
# from other applications. The patch is taken from Debian.
234b1f
# See https://bugzilla.redhat.com/show_bug.cgi?id=4457
234b1f
# See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208927
234b1f
Patch0: gdbm-1.10-zeroheaders.patch
234b1f
Patch1: gdbm-1.10-fedora.patch
234b1f
Patch2: gdbm-sa1.patch
234b1f
Patch3: gdbm-aarch64.patch
234b1f
License: GPLv3+
234b1f
URL: http://www.gnu.org/software/gdbm/
234b1f
Group: System Environment/Libraries
234b1f
BuildRequires: libtool
234b1f
BuildRequires: gettext
234b1f
234b1f
%description
234b1f
Gdbm is a GNU database indexing library, including routines which use
234b1f
extensible hashing.  Gdbm works in a similar way to standard UNIX dbm
234b1f
routines.  Gdbm is useful for developers who write C applications and
234b1f
need access to a simple and efficient database or who are building C
234b1f
applications which will use such a database.
234b1f
234b1f
If you're a C developer and your programs need access to simple
234b1f
database routines, you should install gdbm.  You'll also need to
234b1f
install gdbm-devel.
234b1f
234b1f
%package devel
234b1f
Summary: Development libraries and header files for the gdbm library
234b1f
Group: Development/Libraries
234b1f
Requires: %{name} = %{version}-%{release}
234b1f
Requires(post): info
234b1f
Requires(preun): info
234b1f
234b1f
%description devel
234b1f
Gdbm-devel contains the development libraries and header files for
234b1f
gdbm, the GNU database system.  These libraries and header files are
234b1f
necessary if you plan to do development using the gdbm database.
234b1f
234b1f
Install gdbm-devel if you are developing C programs which will use the
234b1f
gdbm database library.  You'll also need to install the gdbm package.
234b1f
234b1f
%prep
234b1f
%setup -q
234b1f
%patch0 -p1 -b .zeroheaders
234b1f
%patch1 -p1 -b .fedora
234b1f
%patch2 -p1 -b .sa1
234b1f
%patch3 -p1 -b .aarch64
234b1f
234b1f
%build
234b1f
%configure \
234b1f
    --disable-static \
234b1f
%{!?with_largefile: --disable-largefile} \
234b1f
    --enable-libgdbm-compat
234b1f
234b1f
make %{?_smp_mflags}
234b1f
234b1f
%install
234b1f
make DESTDIR=$RPM_BUILD_ROOT install
234b1f
234b1f
%find_lang %{name}
234b1f
234b1f
# create symlinks for compatibility
234b1f
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/gdbm 
234b1f
ln -sf ../gdbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm/gdbm.h
234b1f
ln -sf ../ndbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm/ndbm.h
234b1f
ln -sf ../dbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm/dbm.h
234b1f
234b1f
rm -f $RPM_BUILD_ROOT/%{_libdir}/libgdbm.la
234b1f
rm -f $RPM_BUILD_ROOT/%{_libdir}/libgdbm_compat.la
234b1f
234b1f
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
234b1f
234b1f
%check
234b1f
make check
234b1f
234b1f
%post -p /sbin/ldconfig
234b1f
234b1f
%postun -p /sbin/ldconfig
234b1f
234b1f
%post devel
234b1f
/sbin/install-info %{_infodir}/gdbm.info.gz %{_infodir}/dir \
234b1f
      --entry="* gdbm: (gdbm).                   The GNU Database." || :
234b1f
234b1f
%preun devel
234b1f
if [ $1 = 0 ]; then
234b1f
    /sbin/install-info --delete %{_infodir}/gdbm.info.gz %{_infodir}/dir \
234b1f
        --entry="* gdbm: (gdbm).                   The GNU Database." || :
234b1f
fi
234b1f
234b1f
%files -f %{name}.lang
234b1f
%doc COPYING NEWS README THANKS AUTHORS NOTE-WARNING 
234b1f
%{_libdir}/libgdbm.so.4*
234b1f
%{_libdir}/libgdbm_compat.so.4*
234b1f
%{_bindir}/testgdbm
234b1f
234b1f
%files devel
234b1f
%{_libdir}/libgdbm.so
234b1f
%{_libdir}/libgdbm_compat.so
234b1f
%{_includedir}/*
234b1f
%{_infodir}/*.info*
234b1f
%{_mandir}/man3/* 
234b1f
234b1f
%changelog
234b1f
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.10-8
234b1f
- Mass rebuild 2014-01-24
234b1f
234b1f
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.10-7
234b1f
- Mass rebuild 2013-12-27
234b1f
234b1f
* Mon Mar 25 2013 Honza Horak <hhorak@redhat.com> - 1.10-6
234b1f
- Fixed some issues found by Coverity
234b1f
- Add support of aarch64
234b1f
234b1f
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-5
234b1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
234b1f
234b1f
* Mon Aug 27 2012 Honza Horak <hhorak@redhat.com> - 1.10-4
234b1f
- Spec file cleanup
234b1f
- Use make DESTDIR=... install instead of %%make_install
234b1f
234b1f
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-3
234b1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
234b1f
234b1f
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-2
234b1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
234b1f
234b1f
* Mon Nov 14 2011 Honza Horak <hhorak@redhat.com> - 1.10-1
234b1f
- Updated to new upstream release 1.10
234b1f
- Dropped -shortread patch, which has been already applied by upstream
234b1f
- Disable large file support, that is enabled by default since 1.9, 
234b1f
  but not compatible with db files created using gdbm-1.8.3 and lower
234b1f
- License change to GPLv3+
234b1f
- Add doc files THANKS AUTHORS NOTE-WARNING
234b1f
- Changed text in NOTE-WARNING to correspond with build settings
234b1f
234b1f
* Tue Sep 20 2011 Honza Horak <hhorak@redhat.com> - 1.9.1-1
234b1f
- Updated to new upstream release 1.9.1
234b1f
- Dropped -filestruct, -ndbmlock and -fhs patches, they are not 
234b1f
  needed anymore and GDBM_NOLOCK is used always
234b1f
- Run testsuite
234b1f
234b1f
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.3-9
234b1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
234b1f
234b1f
* Thu Jan 13 2011 Jan Horak <hhorak@redhat.com> - 1.8.3-8
234b1f
- Added filestruct patch (#668178)
234b1f
234b1f
* Mon Jan 03 2011 Karel Klic <kklic@redhat.com> - 1.8.3-7
234b1f
- Removed BuildRoot tag
234b1f
- Removed %%clean section
234b1f
- Added ndbmlock patch (#663932)
234b1f
234b1f
* Mon Apr 12 2010 Karel Klic <kklic@redhat.com> - 1.8.3-6
234b1f
- Use fcntl instead of flock for locking to make nfs safe (#477300)
234b1f
234b1f
* Thu Mar 11 2010 Karel Klic <kklic@redhat.com> - 1.8.3-5
234b1f
- Removed fake Provides: libgdbm.so.2 and corresponding symlinks
234b1f
- Moved autoconf, libtoolize from %%build to %%prep section
234b1f
- Remove static builds from the devel package (#556050)
234b1f
234b1f
* Thu Mar 11 2010 Karel Klic <kklic@redhat.com> - 1.8.3-4
234b1f
- Provides: libgdbm.so.2()(64bit) for x86_64 architecture
234b1f
234b1f
* Thu Mar 11 2010 Karel Klic <kklic@redhat.com> - 1.8.3-3
234b1f
- Added temporary symlinks to retain compatibility with gdbm 1.8.0
234b1f
234b1f
* Wed Mar 10 2010 Rex Dieter <rdieter@fedoraproject.org> - 1.8.3-2
234b1f
- %%files: track shlib sonames, so abi breaks are less of a surprise
234b1f
234b1f
* Tue Mar 09 2010 Karel Klic <kklic@redhat.com> - 1.8.3-1
234b1f
- Newer upstream release
234b1f
- Removed gdbm-1.8.0-64offset.patch, because it was merged by the upstream
234b1f
- `jbj' patch extended and renamed to `zeroheaders'
234b1f
- Added shortread patch from Debian
234b1f
234b1f
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-33
234b1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
234b1f
234b1f
* Fri Apr 17 2009 Stepan Kasal <skasal@redhat.com> - 1.8.0-32
234b1f
- Clean up the spec, for merge review.
234b1f
234b1f
* Fri Feb 27 2009 Stepan Kasal <skasal@redhat.com> - 1.8.0-31
234b1f
- drop *-cflags.patch, move all makefile fixes to *-fhs.patch
234b1f
- propagate libdir to Makefile; no need to set it on cmdline
234b1f
234b1f
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-30
234b1f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
234b1f
234b1f
* Mon Jul 21 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.8.0-29
234b1f
- fix license tag
234b1f
234b1f
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.8.0-28
234b1f
- Autorebuild for GCC 4.3
234b1f
234b1f
* Tue Apr 3 2007 Ondrej Dvoracek <odvorace@redhat.com> - 1.8.0-27
234b1f
- made install-info use in scriptlets safe (#223688)
234b1f
234b1f
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.8.0-26.2.1
234b1f
- rebuild
234b1f
234b1f
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.8.0-26.2
234b1f
- bump again for double-long bug on ppc(64)
234b1f
234b1f
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.8.0-26.1
234b1f
- rebuilt for new gcc4.1 snapshot and glibc changes
234b1f
234b1f
* Tue Jan 24 2006 Warren Togami <wtogami@redhat.com> 1.8.0-26
234b1f
- remove .la (#171535)
234b1f
234b1f
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
234b1f
- rebuilt
234b1f
234b1f
* Sat Apr 09 2005 Florian La Roche <laroche@redhat.com>
234b1f
- rebuild
234b1f
234b1f
* Sun Aug  8 2004 Alan Cox <alan@redhat.com> 1.8.0-24
234b1f
- Close bug #125319
234b1f
234b1f
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
234b1f
- rebuilt
234b1f
234b1f
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
234b1f
- rebuilt
234b1f
234b1f
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
234b1f
- rebuilt
234b1f
234b1f
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
234b1f
- rebuilt
234b1f
234b1f
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
234b1f
- rebuilt
234b1f
234b1f
* Fri Oct  4 2002 Nalin Dahyabhai <nalin@redhat.com> 1.8.0-19
234b1f
- rebuild
234b1f
234b1f
* Fri Sep 13 2002 Nalin Dahyabhai <nalin@redhat.com> 1.8.0-18.1
234b1f
- run make with libdir overridden so that it has the value passed to configure
234b1f
  instead of $(prefix)/lib
234b1f
234b1f
* Wed Jul 24 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.8.0-18
234b1f
- Remove cflags for large database support - not compatible 
234b1f
  with databases without it
234b1f
234b1f
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
234b1f
- automated rebuild
234b1f
234b1f
* Thu May 23 2002 Tim Powers <timp@redhat.com>
234b1f
- automated rebuild
234b1f
234b1f
* Thu Apr 25 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.8.0-15
234b1f
- Use 64bit offset
234b1f
- Patch to make the above not break from downsj@downsj.com (#63980) 
234b1f
234b1f
* Tue Feb 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.8.0-14
234b1f
- Rebuild
234b1f
234b1f
* Fri Jan 25 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.8.0-13
234b1f
- Update location
234b1f
- auto* changes to make it build
234b1f
234b1f
* Wed Oct 17 2001 Trond Eivind Glomsrød <teg@redhat.com> 1.8.0-11
234b1f
- Add URL (# 54607)
234b1f
234b1f
* Mon Jun 25 2001 Nalin Dahyabhai <nalin@redhat.com>
234b1f
- s/Copyright:/License:/g
234b1f
- include text docs in binary package
234b1f
234b1f
* Tue Jun 12 2001 Than Ngo <than@redhat.com>
234b1f
- fix to build against new libtool
234b1f
234b1f
* Mon Mar 19 2001 Trond Eivind Glomsrød <teg@redhat.com>
234b1f
- Make it respect RPM_OPT_FLAGS/CFLAGS - #32242. 
234b1f
  Patch from dan@D00M.cmc.msu.ru
234b1f
234b1f
* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
234b1f
- automatic rebuild
234b1f
234b1f
* Mon Jun  5 2000 Jeff Johnson <jbj@redhat.com>
234b1f
- FHS packaging.
234b1f
234b1f
* Mon Feb  7 2000 Bill Nottingham <notting@redhat.com>
234b1f
- handle compressed manpages
234b1f
234b1f
* Tue Aug 10 1999 Jeff Johnson <jbj@redhat.com>
234b1f
- make sure created database header is initialized (#4457).
234b1f
234b1f
* Tue Jun  1 1999 Jeff Johnson <jbj@redhat.com>
234b1f
- update to 1.8.0.
234b1f
- repackage to include /usr/include/gdbm/*dbm.h compatibility includes.
234b1f
234b1f
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
234b1f
- auto rebuild in the new build environment (release 19)
234b1f
234b1f
* Thu Dec 17 1998 Cristian Gafton <gafton@redhat.com>
234b1f
- build against glibc 2.1
234b1f
234b1f
* Thu May 07 1998 Prospector System <bugs@redhat.com>
234b1f
- translations modified for de, fr, tr
234b1f
234b1f
* Thu Apr 30 1998 Cristian Gafton <gafton@redhat.com>
234b1f
- gdbm-devel moved to Development/Libraries
234b1f
234b1f
* Wed Apr 08 1998 Cristian Gafton <gafton@redhat.com>
234b1f
- buildroot and built for Manhattan
234b1f
234b1f
* Tue Oct 14 1997 Donnie Barnes <djb@redhat.com>
234b1f
- spec file cleanups
234b1f
234b1f
* Thu Jun 12 1997 Erik Troan <ewt@redhat.com>
234b1f
- built against glibc