File libpipeline.spec of Package libpipeline

#
# spec file for package libpipeline
#
# Copyright (c) 2015 SUSE LINUX 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 lname   libpipeline1
Name:           libpipeline
Version:        1.4.1
Release:        0
Summary:        A pipeline manipulation library
License:        GPL-3.0+
Group:          System/Libraries
Url:            http://www.nongnu.org/libpipeline/
Source0:        http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.gz
Source1:        http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.gz.sig
Source2:        %{name}.keyring
BuildRequires:  pkg-config

%description
libpipeline is a C library for setting up and running pipelines of
processes, without needing to involve shell command-line parsing which
is often error-prone and insecure. This alleviates programmers of the
need to laboriously construct pipelines using lower-level primitives
such as fork(2) and execve(2).

%package -n %{lname}
Summary:        A pipeline manipulation library
Group:          System/Libraries

%description -n %{lname}
libpipeline is a C library for setting up and running pipelines of
processes, without needing to involve shell command-line parsing which
is often error-prone and insecure. This alleviates programmers of the
need to laboriously construct pipelines using lower-level primitives
such as fork(2) and execve(2).

%package devel
Summary:        A pipeline manipulation library
Group:          Development/Libraries/C and C++
Requires:       %{lname} = %{version}
Provides:       pkgconfig(%{name}) = %{version}

%description devel
libpipeline is a C library for setting up and running pipelines of
processes, without needing to involve shell command-line parsing which
is often error-prone and insecure. This alleviates programmers of the
need to laboriously construct pipelines using lower-level primitives
such as fork(2) and execve(2).

%prep
%setup -q

%build
export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)"
%configure \
  --enable-shared \
  --enable-threads=posix \
  --disable-rpath	\
  --enable-socketpair-pipe \
  --with-pic=yes \
  --with-gnu-ld
make %{?_smp_mflags} V=1

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
rm -vf %{buildroot}%{_libdir}/libpipeline.la

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

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

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

%files devel
%defattr(-,root,root,0755)
%doc ChangeLog README COPYING
%{_libdir}/libpipeline.so
%{_libdir}/pkgconfig/libpipeline.pc
%{_includedir}/pipeline.h
%{_mandir}/man3/*.3*

%changelog
openSUSE Build Service is sponsored by