# # spec file for package libmm14 # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define pkg_name mm # # note that the maximum size that 2.4 kernel allows is 32 MB by default # (that's low, but it's runtime configurable). # but then again, php typically allocates the maximum size possible # each time it is started, so we don't necessarily want to increase this # and definitely it must not be higher than /proc/sys/kernel/shmmax because # mm_create will fail if a larger size is requested. # # mm is not runtime configurable wrt max segment size. Thus we need to # choose a reasonably low value for all those machines out there. # Ideally this would be runtime configurable; and in addition php should # possibly only mm_create a reasonable sized segment and mm_realloc it # later if need be. # # limit the shared memory maximum segment size to this many MB %define mm_segment_limit 32 Name: libmm14 Version: 1.4.2 Release: 112.1 Summary: Shared Memory Library License: MIT Group: System/Libraries Url: http://www.ossp.org/pkg/lib/mm/ #Repackaged from: #Source: ftp://ftp.ossp.org/pkg/lib/mm/mm-%{version}.tar.gz Source: %{pkg_name}-%{version}.tar.bz2 Patch0: segment_size.diff BuildRequires: libtool BuildRoot: %{_tmppath}/%{name}-%{version}-build %description The MM library is a 2-layer abstraction library that 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. %package -n libmm-devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version} Provides: %{name}-devel = %{version}-%{release} %description -n libmm-devel Libraries and Includes for %{name} %prep %setup -q -n %{pkg_name}-%{version} %patch0 %build %configure \ --with-shm=IPCSHM \ --with-max-segment-size=%{mm_segment_limit} make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool %ifnarch %arm %check make %{?_smp_mflags} test %endif %install make DESTDIR=%{buildroot} install %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool rm %{buildroot}/%{_libdir}/libmm.{,l}a %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %{_libdir}/libmm.so.14.0.22 %{_libdir}/libmm.so.14 %doc ChangeLog LICENSE README THANKS %files -n libmm-devel %defattr(-,root,root,-) %{_bindir}/mm-config %{_includedir}/mm.h %{_libdir}/libmm.so %{_mandir}/man1/mm-config.1* %{_mandir}/man3/mm.3* %changelog * Fri Mar 13 2015 tchvatal@suse.com - Cleanup a bit with spec-cleaner - Reduce some tags and fix rpmlint warnings * Sun Nov 20 2011 jengelh@medozas.de - Remove redundant/unwanted tags/section (cf. specfile guidelines) - Use %%_smp_mflags for parallel building * Sat Nov 19 2011 coolo@suse.com - add libtool as buildrequire to avoid implicit dependency * Sat Dec 19 2009 jengelh@medozas.de - enable parallel build * Tue Sep 4 2007 coolo@suse.de - correctly obsolete old name (#293401) * Mon Jun 11 2007 mrueckert@suse.de - sync files from OSSP/libmm14 and abuild - renamed the package to follow the versioning policy. - renamed devel package to libmm-devel and added provides for the old name - removed static lib * Wed May 23 2007 anosek@suse.cz - fixed mm package installs useless libtool archive by default [#272059] - taken spec file by Marcus Rueckert from BS * Fri Aug 18 2006 postadal@suse.cz - updated to version 1.4.2 * added new API function MM_reset() and mm_reset() * corrected description of mm_sizeof() * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Tue Nov 15 2005 uli@suse.de - no test on ARM (unimplemented calls in QEMU) * Fri Oct 21 2005 poeml@suse.de - update to 1.4.0 Changes between 1.3.1 and 1.4.0 (12-Sep-2003 to 02-Sep-2005) * ) Optimize insertion of free memory chunks by merging with the spare area if possible to decrease memory fragmentation. * ) Fix mm_realloc() function: If the memory chunk passed to mm_realloc() can't be extended and a new chunk must be allocated, the old memory is copied into the new chunk with a call to memcpy(3). However, the used size is the length of the new data and will cause memcpy(3) to access memory beyond the old data chunk's boundaries. * ) Upgraded build environment to GNU Libtool 1.5.20 and GNU shtool 2.0.2 * ) Updated all copyright messages for year 2005. Changes between 1.3.0 and 1.3.1 (07-Mar-2003 to 12-Sep-2004) * ) Upgraded build environment to GNU Shtool 2.0.1, GNU Libtool 1.5.8 and Autoconf 2.59. * Mon Apr 26 2004 poeml@suse.de - remove unneeded neededforbuild items - buildroot is cleaned by %%prep * Tue Jan 13 2004 schwab@suse.de - Don't call aclocal. * Sun Jan 11 2004 adrian@suse.de - fix build as user * Thu Nov 6 2003 mmj@suse.de - Put includes and static libs in mm-devel - Clean up our mess after building - Use %%run_ldconfig in %%post * Thu Jul 24 2003 poeml@suse.de - update to 1.3.0 - Correctly cleanup under MM_SHMT_MMZERO in case of a shared memory segment creation error. - Close the filedescriptor of the underlying object immediately after mmap(2)'ing it in case of MM_SHMT_MMPOSX, MM_SHMT_MMZERO and MM_SHMT_MMFILE. - don't explicitely strip binaries since RPM does it (and may keep the stripped information somewhere else) * Thu Jan 2 2003 poeml@suse.de - update to 1.2.2 (no significant changes) * Tue Oct 29 2002 ro@suse.de - remove old libtool macros * Tue Sep 17 2002 ro@suse.de - removed bogus self-provides * Mon Jul 29 2002 poeml@suse.de - updated to 1.2.1, buildrooted, outdated patches dropped - run test * Fri Jun 28 2002 uli@suse.de - use %%_libdir consistently * Thu Jun 27 2002 poeml@suse.de - Fixes possible apache+mod_php4 start failure [#16760] We need to set the maximum shared memory segment size --which is hardcoded at compile time-- to the target system default value (32MB), and not to the current value on the *build* host. (mm's configure tries to find out how much it can get; it would allow up to 64MB.) We've made this configurable now, defaulting to 32MB, but before you increase it note that some applications might just plainly allocate a maximum sized segment, like the php interpreter does when it calls mm_create with size=0. - remove AC_PROG_LIBTOOL from aclocal.m4, evacuate it by renaming it to acinclude.m4 and libtoolize, aclocal & autoconf. - produce position independant code (-fPIC) - clean up #neededforbuild * Mon Jun 10 2002 meissner@suse.de - dropped faulty powerpc case from ltconfig (for ppc64) * Wed Jun 6 2001 rolf@suse.de - fixed problem with autoconf - added ldconfig -n %%{_libdir} - bzip2 sources * Fri Oct 6 2000 rolf@suse.de - update to version 1.1.3 * Mon May 22 2000 rolf@suse.de - fixed bug in suse_update macro * Thu May 18 2000 rolf@suse.de - update mm-1.1.1 * Fri Apr 14 2000 ro@suse.de - next try to fix install section * Fri Apr 14 2000 rolf@suse.de - fixed bug in install section of Makefile.in * Sat Apr 8 2000 bk@suse.de - added suse update config macro * Thu Apr 6 2000 rolf@suse.de - include mm-config as well * Thu Mar 23 2000 rolf@suse.de - version 1.0.12