File live555.spec of Package live555

#
# spec file for package live555
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 Dominique Leuenberger, Amsterdam, The Netherlands
#
# 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:           live555
Version:        2015.01.27
Release:        1.2
Summary:        LIVE555 Streaming Media
License:        LGPL-2.1
Group:          System/Libraries
Url:            http://www.live555.com/liveMedia/
Source:         http://www.live555.com/liveMedia/public/live.%{version}.tar.gz
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0:         %{name}-fpic.patch
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This code forms a set of C++ libraries for multimedia streaming,
using open standard protocols (RTP/RTCP, RTSP, SIP). These libraries
can be used to build streaming applications

%package devel
Summary:        LIVE555 Streaming Media
Group:          Development/Languages/C and C++
# Actually, live555 is a devel package only. Headers, code and a static lib is all there is.
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}

%description devel
This code forms a set of C++ libraries for multimedia streaming,
using open standard protocols (RTP/RTCP, RTSP, SIP). These libraries
can be used to build streaming applications

%prep
%setup -q -n live
%patch0 -p1

%build
export CFLAGS="%{optflags}"
export CPPFLAGS="%{optflags}"
./genMakefiles linux
make %{?_smp_mflags}

%install
install -d -m 755 %{buildroot}%{_libdir}/live
install -d -m 755 %{buildroot}%{_includedir}
find . -type f -name "*.a" -exec install -m 644 {} %{buildroot}%{_libdir}/live \;
for fld in liveMedia groupsock BasicUsageEnvironment UsageEnvironment; do
  install -d -m 755 %{buildroot}%{_includedir}/$fld
  cp -rL $fld/include/* %{buildroot}%{_includedir}/$fld
done

# creates support file for pkg-config
mkdir %{buildroot}/%{_libdir}/pkgconfig
tee %{buildroot}/%{_libdir}/pkgconfig/live555.pc << "EOF"
prefix=%{_prefix}
exec_prefix=${prefix}
libdir=${exec_prefix}/%{_lib}
includedir=${prefix}/include

Name: live555
Description: Multimedia streaming libraries
Version: %{version}
Libs: -L${libdir}/live -lliveMedia -lUsageEnvironment -lgroupsock -lBasicUsageEnvironment
Cflags: -I${includedir}/liveMedia -I${includedir}/UsageEnvironment -I${includedir}/groupsock -I${includedir}/BasicUsageEnvironment
EOF

%files devel
%defattr(-,root,root)
%{_libdir}/live/
%{_includedir}/liveMedia/
%{_includedir}/groupsock/
%{_includedir}/BasicUsageEnvironment/
%{_includedir}/UsageEnvironment/
%{_libdir}/pkgconfig/live555.pc

%changelog
openSUSE Build Service is sponsored by