File process-cpp.spec of Package process-cpp

#
# spec file for package process-cpp
#
# 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 sover 3

Name:           process-cpp
Version:	3.0.1
Release:	1
License:	LGPL-3.0	
Summary:	A simple convenience library for handling processes in C++11
Url:		https://launchpad.net/process-cpp
Group:		System/Libraries
Source:		https://launchpad.net/ubuntu/+archive/primary/+files/%{name}_%{version}.orig.tar.gz
Patch:		process-cpp-no-gtest.patch
BuildRequires:	cmake
BuildRequires:	gcc-c++
BuildRequires:	boost-devel >= 1.58
%if %{defined suse_version} && 0%{?suse_version} > 1330
BuildRequires:	libboost_iostreams-devel >= 1.58
BuildRequires:	libboost_system-devel >= 1.58
%endif
BuildRequires:	pkgconfig
BuildRequires:	pkgconfig(properties-cpp)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A simple convenience library for handling processes in C++11.

%if %{defined suse_version}
%debug_package
%endif

%package -n libprocess-cpp%{sover}
Summary:	 C++11 library for handling processes - runtime library
Group:		System/Libraries

%description -n libprocess-cpp%{sover}
A simple convenience library for handling processes in C++11.

This package provides shared libraries for process-cpp.

%package devel
Summary:	Development headers for process-cpp
Group:		Development/Libraries/C and C++
Requires:	libprocess-cpp%{sover} = %{version}
Requires:	pkgconfig(properties-cpp)

%description devel
A simple convenience library for handling processes in C++11.

This package provides development headers for process-cpp.

%prep
%setup -q
%patch -p1

%build
%cmake
make %{?_smp_mflags}

%install
%if %{defined cmake_install}
%cmake_install
%else
%make_install
%endif


%post -n libprocess-cpp%{sover} -p /sbin/ldconfig

%postun -n libprocess-cpp%{sover} -p /sbin/ldconfig

%files -n libprocess-cpp%{sover}
%defattr(-,root,root)
%doc README.md COPYING
%{_libdir}/libprocess-cpp.so.%{sover}*

%files devel
%defattr(-,root,root)
%{_includedir}/core
%{_libdir}/libprocess-cpp.so
%{_libdir}/pkgconfig/process-cpp.pc
%changelog
* Tue Feb 17 2015 i@marguerite.su
- initial version 2.0.0+14.10.20140718