%{expand: %%global _includedir %{_includedir}/gdbm} Summary: A GNU set of database routines which use extensible hashing. Name: gdbm Version: 1.8.3 Release: 5ark Source: ftp://ftp.gnu.org/gnu/gdbm-%{version}.tar.bz2 Patch0: gdbm-1.8.3-binown.patch Patch1: gdbm-1.8.3-libtool-2.2.patch License: GPL URL: http://www.gnu.org/software/gdbm/ Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-root %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: %name = %version-%release 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. %package static Summary: Libraries for linking statically to gdbm Requires: %name-devel = %version-%release Group: Development/Libraries %description static Gdbm-static contains the development libraries for linking statically to gdbm, the GNU database system. These libraries and header files are necessary if you plan to compile or develop applications that link statically to gdbm. Linking statically increases the size of your binaries, but allows them to run on systems that don't have gdbm installed. %prep %setup -q %patch0 -p1 -b .binown %patch1 -p1 -b .libtool~ %build libtoolize --force --copy aclocal autoreconf %configure make %?_smp_mflags %install rm -rf ${RPM_BUILD_ROOT} %makeinstall install-compat pushd $RPM_BUILD_ROOT ln -sf gdbm/gdbm.h .%{_oldincludedir}/gdbm.h %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %post devel /sbin/install-info %{_infodir}/gdbm.info.* %{_infodir}/dir --entry="* gdbm: (gdbm). The GNU Database." %preun devel if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/gdbm.info.* %{_infodir}/dir --entry="* gdbm: (gdbm). The GNU Database." fi %files %defattr(-,root,root) %doc COPYING NEWS README %{_libdir}/libgdbm.so* %{_libdir}/libgdbm_compat.so* %files devel %defattr(-,root,root) %{_oldincludedir}/gdbm.h %{_includedir} %{_infodir}/*.info* %files static %defattr(-,root,root) %{_libdir}/libgdbm.a %{_libdir}/libgdbm_compat.a %clean rm -rf ${RPM_BUILD_ROOT} %changelog * Thu Jun 18 2009 Bernhard Rosenkraenzer <bero@arklinux.org> 1.8.3-5ark - Fix %%post devel script * Tue Oct 21 2008 Bernhard Rosenkraenzer <bero@arklinux.org> 1.8.3-4ark - Modify spec file to make rpm5 happy - Make it build with current libtool * Sun Oct 29 2006 Bernhard Rosenkraenzer <bero@arklinux.org> 1.8.3-3ark - Rebuild -- after 3 years, the compiler changes should have some effect ;) - Remove *.a files from -devel, they're in -static too (where they belong...) - Remove *.la mess - Don't own /usr/include - Put *.so files in core package for dlopening * Wed Jul 30 2003 Bernhard Rosenkraenzer <bero@arklinux.org> 1.8.3-2ark - Fix libgdbm.so symlink - Split out static libraries * Tue Jul 29 2003 David Sainty <saint@arklinux.org> 1.8.3-1ark - 1.8.3 - Remove old patches - Fix typo in %preun devel - info.bz2 not info.bz2