Summary: Library for handling page faults in user mode Name: libsigsegv Version: 2.11 Release: 1 License: GPLv2+ URL: http://libsigsegv.sourceforge.net/ Source0: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz Source1: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig Source2: sigsegv.h Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %ifos aix5.1 BuildRequires: AIX-rpm >= 5.1.0.0 BuildRequires: AIX-rpm < 5.2.0.0 Requires: AIX-rpm >= 5.1.0.0 Requires: AIX-rpm < 5.2.0.0 %else BuildRequires: AIX-rpm >= 5.2.0.0 Requires: AIX-rpm >= 5.2.0.0 %endif %description This is a library for handling page faults in user mode. A page fault occurs when a program tries to access to a region of memory that is currently not available. Catching and handling a page fault is a useful technique for implementing: - pageable virtual memory - memory-mapped access to persistent databases - generational garbage collectors - stack overflow handlers - distributed shared memory The library is available as 32-bit and 64-bit. %package devel Summary: Development libraries and header files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel %{summary}. 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 "cc -q64" or "gcc -maix64". %prep %setup -q %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh # 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="cc -q64" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static make %{?_smp_mflags} cp src/.libs/%{name}.so.2 %{name}.so.0 cp src/sigsegv.h sigsegv-ppc64.h make distclean # now build the 32-bit version export CC="cc" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static make %{?_smp_mflags} cp src/sigsegv.h sigsegv-ppc32.h # force the shared library major number to be 0 mv src/.libs/%{name}.so.2 src/.libs/%{name}.so.0 # recreate the shared library the "AIX way" rm -f src/.libs/%{name}.a ${AR} -rv src/.libs/%{name}.a src/.libs/%{name}.so.0 # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q src/.libs/%{name}.a ./%{name}.so.0 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install cp sigsegv-ppc??.h ${RPM_BUILD_ROOT}%{_includedir}/ cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_includedir}/ chmod 644 $RPM_BUILD_ROOT%{_includedir}/*.h ( cd ${RPM_BUILD_ROOT} for dir in include lib do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{_prefix}/$dir/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc AUTHORS ChangeLog NEWS README %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/*.la /usr/include/* /usr/lib/*.la %changelog * Tue Feb 21 2017 Michael Perzl - 2.11-1 - updated to version 2.11 * Mon Apr 04 2011 Michael Perzl - 2.10-1 - updated to version 2.10 * Mon Dec 08 2010 Michael Perzl - 2.9-1 - updated to version 2.9 * Mon Dec 14 2009 Michael Perzl - 2.8-1 - updated to version 2.8 * Mon Aug 10 2009 Michael Perzl - 2.7-1 - updated to version 2.7 * Mon Oct 20 2008 Michael Perzl - 2.6-1 - updated to version 2.6 * Mon Jun 23 2008 Michael Perzl - 2.5-1 - first version for AIX V5.1 and higher