Summary: A GNU set of database routines which use extensible hashing. Name: gdbm Version: 1.8.0 Release: 6 Source: ftp://prep.ai.mit.edu/pub/gnu/gdbm-%{version}.tar.gz Copyright: GPL Group: System Environment/Libraries Prefix: %{_prefix} Buildroot: /var/tmp/%{name}-root BuildRequires: libtool >= 1.3.5 %ifarch ia64 %define stdlib lib/ia64l32 %define stdlib64 lib/ia64l64 %define liblink ../../.. %define PKG64 %{name}-%{version}-ia64l64 %define DIRS . %{_builddir}/%{PKG64}/%{name}-%{version} %define DEFCCIA cc %define DEFCC %{DEFCCIA} %else %define stdlib lib %define liblink ../.. %define DIRS . %define DEFCC cc %endif %description Gdbm is a GNU database indexing library, including routines which use extensible hashing. Gdbm works in a similar way to standard UNIX dbm routines. Gdbm is useful for developers who write C applications and need access to a simple and efficient database or who are building C applications which will use such a database. If you're a C developer and your programs need access to simple database routines, you should install gdbm. You'll also need to install gdbm-devel. %package devel Summary: Development libraries and header files for the gdbm library. Group: Development/Libraries Requires: gdbm Prereq: /sbin/install-info %description devel Gdbm-devel contains the development libraries and header files for gdbm, the GNU database system. These libraries and header files are necessary if you plan to do development using the gdbm database. Install gdbm-devel if you are developing C programs which will use the gdbm database library. You'll also need to install the gdbm package. %prep %ifarch ia64 %setup -q -c -n %{PKG64} cd %{name}-%{version} %endif %setup -q %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if [[ "$CC" != "gcc" ]] then %ifarch ia64 if [[ "$CC" = "bcc" ]] then export CC="bcc -Nilp32" export CC64=bcc else export CC64="$CC -q64" fi %endif export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` export CFLAGS="$RPM_OPT_FLAGS" fi for dir in %{DIRS}; do cd $dir; if [[ $dir != "." ]]; then export CC="$CC64"; fi libtoolize --force # XXX --includedir dinna work %configure make includedir=%{_prefix}/include/gdbm done %install rm -rf $RPM_BUILD_ROOT # Potential loop if building 64-bit libraries for IA64 for dir in %{DIRS}; do cd $dir; if [[ $dir = "." ]]; then INSTDIR=%{_prefix}; else INSTDIR=/%{PKG64}%{_prefix}; fi # XXX --includedir dinna work make install install-compat \ prefix=${RPM_BUILD_ROOT}$INSTDIR \ includedir=${RPM_BUILD_ROOT}$INSTDIR/include/gdbm done ( cd $RPM_BUILD_ROOT ln -sf gdbm/gdbm.h .%{_prefix}/include/gdbm.h gzip -9nf .%{_prefix}/info/gdbm*info* mkdir -p usr/include || : mkdir -p usr/%{stdlib} || : cd usr/include ln -sf ../..%{_prefix}/include/* . cd - cd usr/%{stdlib} ln -sf %{liblink}%{_prefix}/lib/* . ) %ifarch ppc || %ifarch rs6000 && %ifnarch linux ( cd $RPM_BUILD_ROOT/%{prefix}/lib # Create a compatibility member to mitigate differences with Bull Freeware # offering COMPATMEMBER=libgdbm.so for lib in *.a do /usr/bin/dump -Tv $lib |/usr/bin/awk 'match($4,"EXP|Exp") { print $NF }' > tmp.exp libbase=`print $lib | sed -e 's/.a$//' -e 's/^lib//'` ld -L. -bI:tmp.exp -bE:tmp.exp -l$libbase -bM:SRE -bnoentry -o $COMPATMEMBER /usr/bin/strip -e $COMPATMEMBER # Make shr.o a load-only module /usr/bin/ar -r $lib $COMPATMEMBER rm -f $COMPATMEMBER tmp.exp done ) %endif %ifarch ia64 # Add 64-bit libs to main install tree mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{stdlib64} mv ${RPM_BUILD_ROOT}/%{PKG64}%{_prefix}/lib/* $RPM_BUILD_ROOT%{_prefix}/%{stdlib64} # Add system links cd $RPM_BUILD_ROOT mkdir -p usr/%{stdlib64} cd usr/%{stdlib64} ln -sf %{liblink}%{prefix}/%{stdlib64}/* . %endif %post devel /sbin/install-info %{_prefix}/info/gdbm.info.gz %{_prefix}/info/dir --entry="* gdbm: (gdbm). The GNU Database." %preun devel if [ $1 = 0 ]; then /sbin/install-info --delete %{_prefix}/info/gdbm.info.gz %{_prefix}/info/dir --entry="* gdbm: (gdbm). The GNU Database." fi %files %defattr(-,root,root) %ifarch ia64 %{_prefix}/lib/libgdbm.so* /usr/%{stdlib}/libgdbm.so* %{_prefix}/%{stdlib64}/lib* /usr/%{stdlib64}/lib* %else %{_prefix}/lib/libgdbm.a /usr/%{stdlib}/libgdbm.a %endif %files devel %defattr(-,root,root) /usr/include/* /usr/%{stdlib}/libgdbm.la %{_prefix}/lib/libgdbm.la %{_prefix}/include/* %{_prefix}/info/gdbm*gz %{_prefix}/man/man3/* %clean rm -rf $RPM_BUILD_ROOT %changelog * Thu Mar 22 2001 Marc Stephenson - Build both 32- and 64-bit libraries * Fri Mar 09 2001 Marc Stephenson - Use libtool 1.3.5a - Rebuild against new shared objects - Build with default compiler - Add Bull freeware compatibility member * Thu Feb 22 2001 aixtoolbox - Account for different standard lib location in IA64 32-bit ABI * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution * Mon Feb 7 2000 Bill Nottingham - handle compressed manpages * Tue Aug 10 1999 Jeff Johnson - make sure created database header is initialized (#4457). * Tue Jun 1 1999 Jeff Johnson - update to 1.8.0. - repackage to include /usr/include/gdbm/*dbm.h compatibility includes. * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 19) * Thu Dec 17 1998 Cristian Gafton - build against glibc 2.1 * Thu May 07 1998 Prospector System - translations modified for de, fr, tr * Thu Apr 30 1998 Cristian Gafton - gdbm-devel moved to Development/Libraries * Wed Apr 08 1998 Cristian Gafton - buildroot and built for Manhattan * Tue Oct 14 1997 Donnie Barnes - spec file cleanups * Thu Jun 12 1997 Erik Troan - built against glibc