File libsigsegv.spec of Package libsigsegv

#
# spec file for package sigsegv
#
# Copyright (c) 2013 SUSE LINUX Products 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/

Name:               libsigsegv
%define somajor	    2
%define lname	    libsigsegv%somajor
BuildRequires:      autoconf
BuildRequires:      automake
BuildRequires:      gcc
BuildRequires:      glibc-devel
BuildRequires:      libtool
BuildRequires:      make
BuildRequires:      pkgconfig
Version:            2.10
Release:            0
Summary:            Library for Handling Page Faults in User Mode
URL:                http://libsigsegv.sourceforge.net/
Source:             ftp://ftp.gnu.org/pub/gnu/libsigsegv/libsigsegv-%{version}.tar.gz
# PATCH-FIX-OPENSUSE -- make it build in qemu
Patch0:             fix-build-in-qemu.patch
Group:              System/Libraries
License:            GPL-2.0+
BuildRoot:          %{_tmppath}/build-%{name}-%{version}

%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.

%package -n %lname
Summary:            Library for Handling Page Faults in User Mode
Group:              System/Libraries

%description -n %lname
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.

%package devel
Summary:            Library for Handling Page Faults in User Mode
Group:              Development/Libraries/C and C++
Requires:           %lname = %{version}-%{release}

%description devel
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.

%package doc
Summary:            Library for Handling Page Faults in User Mode
Group:              Development/Libraries/C and C++
Group:              Documentation/Other

%description doc
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.

%prep
%setup -q
%if 0%{?qemu_user_space_build:1}
# qemu does not support stack overflows well ;)
%patch0 -p1 -b .qemu
%endif

%build
%configure \
    --enable-shared \
    --enable-static
make %{?_smp_mflags}

%install
%makeinstall
%__rm "%{buildroot}%{_libdir}/libsigsegv.la"

%check
%ifnarch armv7l armv7hl
%__make check
%endif

%post   -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig

%files doc
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog* NEWS PORTING README

%files -n %lname
%defattr(-,root,root)
%{_libdir}/libsigsegv.so.%{somajor}
%{_libdir}/libsigsegv.so.%{somajor}.*

%files devel
%defattr(-,root,root)
%{_includedir}/sigsegv.h
%{_libdir}/libsigsegv.so
%{_libdir}/libsigsegv.a
openSUSE Build Service is sponsored by