%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif Summary: A GNU set of database routines which use extensible hashing. Name: gdbm Version: 1.13 %if %{p7build} Release: 1.p7 %else Release: 1 %endif Source0: ftp://ftp.gnu.org/gnu/%{name}-%{version}.tar.gz Source1: ftp://ftp.gnu.org/gnu/%{name}-%{version}.tar.gz.sig Source2: libgdbm.so.3-aix32 Source3: libgdbm.so.3-aix64 License: GPL URL: http://www.gnu.org/software/gdbm/ Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: gettext Requires: gettext %if %{p7build} %ifos aix6.1 Requires: AIX-rpm >= 6.1.8.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.3.0 %endif %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: %{name} = %{version} Requires: /sbin/install-info, 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 %setup -q %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export RM="/usr/bin/rm -f" # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="xlc_r -q64 -D_LARGE_FILES" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-shared --disable-static make %{?_smp_mflags} cp src/.libs/libgdbm.so.4 . make distclean # now build the 32-bit version export CC="xlc_r -D_LARGE_FILES" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-shared --disable-static make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q src/.libs/libgdbm.a ./libgdbm.so.4 # Add the older 1.8.3 shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') cp %{SOURCE2} libgdbm.so.3 /usr/bin/strip -X32 -e libgdbm.so.3 /usr/bin/ar -X32 -q src/.libs/libgdbm.a libgdbm.so.3 cp %{SOURCE3} libgdbm.so.3 /usr/bin/strip -X64 -e libgdbm.so.3 /usr/bin/ar -X64 -q src/.libs/libgdbm.a libgdbm.so.3 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install gzip --best ${RPM_BUILD_ROOT}%{_infodir}/*.info rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir ( cd ${RPM_BUILD_ROOT} for dir in include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %post devel /sbin/install-info %{_infodir}/gdbm.info.gz %{_infodir}/dir --entry="* gdbm: (gdbm). The GNU Database." || : %preun devel if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/gdbm.info.gz %{_infodir}/dir --entry="* gdbm: (gdbm). The GNU Database." || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc COPYING NEWS README %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system) %{_includedir}/* %{_libdir}/*.la %{_infodir}/*.info* %{_mandir}/man3/* /usr/include/* /usr/lib/*.la %changelog * Mon Mar 13 2017 Michael Perzl - 1.13-1 - updated to version 1.13 * Tue May 17 2016 Michael Perzl - 1.12-1 - updated to version 1.12 * Thu Dec 26 2013 Michael Perzl - 1.11-1 - updated to version 1.11 * Mon Nov 14 2011 Michael Perzl - 1.10-1 - updated to version 1.10 * Sat Aug 13 2011 Michael Perzl - 1.9.1-1 - updated to version 1.9.1 * Mon Jun 30 2008 Michael Perzl - 1.8.3-1 - first version for AIX V5.1 and higher