File usrsctp.spec of Package usrsctp

#
# spec file for usrsctp
#
# Copyright (c) 2014 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/
#

%define soname 1
%define _lto_cflags %{nil}

Name:           usrsctp
Version:        0.9.3.0
Release:        0
License:        BSD-3-Clause
Summary:        Userland SCTP implementation
Url:            https://github.com/sctplab/usrsctp/
Group:          Productivity/Networking/Other
Source:         https://github.com/sctplab/usrsctp/archive/%{version}.tar.gz
Source1:        COPYRIGHT
# for run bootstrap
BuildRequires:  automake
BuildRequires:  libtool
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is the reference implementation for userland SCTP.

%package -n lib%{name}%{soname}
Summary:        Usrsctp Library
Group:          Development/Libraries/Other

%description -n lib%{name}%{soname}
The libraries for usersctp.

%package devel
Summary:        Usersctp Development Kit 
Group:          Development/Libraries/Other
Requires:       lib%{name}%{soname} = %{version}

%description devel
The development files for usersctp.

%prep
%setup -q
cp %{SOURCE1} .

%build
./bootstrap
%configure --prefix=%{_prefix} --disable-debug --disable-warnings-as-errors
make %{?_smp_mflags}

%install
%make_install
# kill .la files
%{__rm} -f %{buildroot}%{_libdir}/lib*.la

%post -n lib%{name}%{soname} -p /sbin/ldconfig

%postun -n lib%{name}%{soname} -p /sbin/ldconfig

%files -n lib%{name}%{soname}
%defattr(-,root,root)
%doc COPYRIGHT
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%doc COPYRIGHT
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/*.a

%changelog

openSUSE Build Service is sponsored by