Summary: Library for handling page faults in user mode Name: libsigsegv Version: 2.6 Release: 1 License: GPLv2+ URL: http://libsigsegv.sourceforge.net/ Source0: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz Source1: sigsegv.h Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %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 # 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.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 # 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 * 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