%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif %define _libdir64 %{_prefix}/lib64 Summary: A GNU set of database routines which use extensible hashing. Name: gdbm Version: 1.18 %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 Source4: libgdbm.so.4-aix32 Source5: libgdbm.so.4-aix64 License: GPL URL: http://www.gnu.org/software/gdbm/ Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: gettext >= 0.10.40-6 Requires: gettext >= 0.10.40-6 %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. The library is available as 32-bit and 64-bit. %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 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export RM="/usr/bin/rm -f" export CC="xlc_r -D_LARGE_FILES" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-shared --disable-static \ --enable-memory-mapped-io make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --enable-shared --disable-static \ --enable-memory-mapped-io make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}.so* # Add the older 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 ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a libgdbm.so.3 cp %{SOURCE3} libgdbm.so.3 /usr/bin/strip -X64 -e libgdbm.so.3 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a libgdbm.so.3 cp %{SOURCE4} libgdbm.so.4 /usr/bin/strip -X32 -e libgdbm.so.4 cp libgdbm.so.4 ${RPM_BUILD_ROOT}%{_libdir}/ /usr/bin/ar -X32 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a libgdbm.so.4 cp %{SOURCE5} libgdbm.so.4 /usr/bin/strip -X64 -e libgdbm.so.4 cp libgdbm.so.4 ${RPM_BUILD_ROOT}%{_libdir64}/ /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a libgdbm.so.4 gzip --best ${RPM_BUILD_ROOT}%{_infodir}/*.info rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir ( cd ${RPM_BUILD_ROOT} for dir in include lib lib64 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 32bit/COPYING 32bit/NEWS 32bit/README %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system) %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_infodir}/*.info* %{_mandir}/man3/* /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Tue Aug 21 2018 Michael Perzl - 1.18-1 - updated to version 1.18 * Thu Aug 02 2018 Michael Perzl - 1.17-1 - updated to version 1.17 * Thu Jun 28 2018 Michael Perzl - 1.16-1 - updated to version 1.16 * Sat Jun 16 2018 Michael Perzl - 1.15-1 - updated to version 1.15 * Wed Jun 13 2018 Michael Perzl - 1.14.1-1 - updated to version 1.14.1 * Wed Jun 13 2018 Michael Perzl - 1.14-1 - updated to version 1.14 - added RTL-style shared libraries * 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