File pth.spec of Package pth

#
# spec file for package pth (Version 2.0.7)
#
# Copyright (c) 2010 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/
#

# norootforbuild


Name:           pth
Url:            http://www.gnu.org/software/pth/
License:        LGPLv2.1+
Group:          Development/Libraries/C and C++
Version:        2.0.7
Release:        117
AutoReqProv:    on
Source:         %{name}-%{version}.tar.bz2
Source2:        baselibs.conf
Patch:          %{name}-%{version}.diff
Patch1:         pth_sched.patch
Summary:        GNU Portable Threads
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Pth is a very portable POSIX/ANSI-C based library for Unix platforms
which provides non-preemptive priority-based scheduling for multiple
threads of execution ("multithreading") inside server applications. All
threads run in the same address space of the server application, but
each thread has it's own individual program-counter, run-time stack,
signal mask and errno variable.



Authors:
--------
    Ralf S. Engelschall <rse@engelschall.com>

%package -n libpth20
License:        LGPLv2.1+
Summary:        GNU Portable Threads
Group:          Development/Libraries/C and C++
Provides:       pth
Obsoletes:      pth
%define library_name libpth20
%define debug_package_requires %{library_name} = %{version}-%{release}

%description -n libpth20
Pth is a very portable POSIX/ANSI-C based library for Unix platforms
which provides non-preemptive priority-based scheduling for multiple
threads of execution ("multithreading") inside server applications. All
threads run in the same address space of the server application, but
each thread has it's own individual program-counter, run-time stack,
signal mask and errno variable.



Authors:
--------
    Ralf S. Engelschall <rse@engelschall.com>

%package -n libpth-devel
License:        LGPLv2.1+
Summary:        GNU Portable Threads
Group:          Development/Libraries/C and C++
Requires:       %{library_name} = %{version}
# pth-devel was last used in openSUSE 11.1
Provides:       pth-devel = %{version}
Obsoletes:      pth-devel < %{version}

%description -n libpth-devel
Pth is a very portable POSIX/ANSI-C based library for Unix platforms
which provides non-preemptive priority-based scheduling for multiple
threads of execution ("multithreading") inside server applications. All
threads run in the same address space of the server application, but
each thread has it's own individual program-counter, run-time stack,
signal mask and errno variable.



Authors:
--------
    Ralf S. Engelschall <rse@engelschall.com>

%prep
%setup -q
%patch
%patch1 -p1

%build
autoconf
%configure --disable-static --with-pic \
            --enable-optimize=yes \
            --enable-pthread=no \
            --with-gnu-ld
# not supporting -jN at this time (pth_p.h is not created fast enough)
%{__make}

%check
make test

%install
make DESTDIR=$RPM_BUILD_ROOT install
#empty dependency_libs
%{__rm} -f %{buildroot}%{_libdir}/libpth.la

%post   -n %{library_name} -p /sbin/ldconfig

%postun -n %{library_name} -p /sbin/ldconfig

%files -n libpth20
%defattr(-,root,root)
%doc ANNOUNCE AUTHORS COPYING HACKING HISTORY INSTALL NEWS PORTING README SUPPORT TESTS THANKS USERS
%doc %{_mandir}/man1/*
%{_libdir}/libpth*.so.*

%files -n libpth-devel
%defattr(-,root,root)
%{_bindir}/pth-config
%{_includedir}/pth.h
%{_datadir}/aclocal/pth.m4
%{_libdir}/libpth*.so
%doc %{_mandir}/man3/*

%changelog
openSUSE Build Service is sponsored by