Summary: Shared memory allocation library Name: mm Version: 1.4.2 Release: 1 License: BSD Group: System Environment/Libraries Source0: ftp://ftp.ossp.org/pkg/lib/mm/mm-%{version}.tar.gz URL: http://www.ossp.org/pkg/lib/mm/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description OSSP mm is a 2-layer abstraction library which simplifies the usage of shared memory between forked (and this way strongly related) processes under Unix platforms. On the first layer it hides all platform dependent implementation details (allocation and locking) when dealing with shared memory segments and on the second layer it provides a high-level malloc(3)-style API for a convenient and well known way to work with data structures inside those shared memory segments. The library is available as 32-bit and 64-bit. %package devel Summary: Header files and libraries for %{name} development Group: Development/Libraries Requires: %{name} = %{version} %description devel The %{name}-devel package contains the header files and libraries needed to develop programs that use the %{name} library. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc -q64" or "gcc -maix64". %prep %setup -q %build # 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 -q64" ./configure \ --prefix=%{_prefix} \ --mandir=%{_prefix}/man \ --enable-shared --enable-static make %{?_smp_mflags} cp .libs/libmm.so.14 . make distclean # now build the 32-bit version export CC="xlc" ./configure \ --prefix=%{_prefix} \ --mandir=%{_prefix}/man \ --enable-shared --enable-static make %{?_smp_mflags} %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" # add the 64-bit shared objects to the installed shared library containing # already the 32-bit shared objects ${AR} -q $RPM_BUILD_ROOT%{_libdir}/libmm.a ./libmm.so.14 %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,system,-) %doc LICENSE THANKS README %{_libdir}/*.a %files devel %doc ChangeLog %defattr(-,root,system) %{_bindir}/mm-config %{_includedir}/mm.h %{_libdir}/*.la %{_mandir}/man1/mm-config.1 %{_mandir}/man3/mm.3 %changelog * Thu Jan 03 2008 Michael Perzl - 1.4.2-1 - first version for AIX V5.1 and higher