File playuver.spec of Package playuver

#
# spec file for package playuver
#
# Copyright (c) 2018 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 soname  PlaYUVerLib
%define sover   0
Name:           playuver
Version:        0.18.3
Release:        0
Summary:        YUV video player
License:        GPL-2.0
Group:          Productivity/Multimedia/Video/Players
URL:            http://sourceforge.net/projects/playuver/
Source0:        https://github.com/pixlra/playuver/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  opencv-qt5-devel > 3.1.0
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core) >= 5.2.0
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(libavdevice)
BuildRequires:  pkgconfig(libavformat)
BuildRequires:  pkgconfig(libavutil)
BuildRequires:  pkgconfig(libpostproc)
BuildRequires:  pkgconfig(libswscale)

%description
YUV video player with support wide range of raw video formats.

Features:
    * Support for libavformat and libavcodec;
    * Support for wide range of raw video formats;
    * Support up to 16 bits per pixel
    * Support for OpenCV image/video processing library
    * Advanced frame zoom with easy to use pan function
    * Synchronized zoom across several videos
    * Useful information in status bar
    * Constant growing libs for stream and frame processing
    * Advanced API for frame/video processing algorithms
    * Frame level quality measurement API based on the PlaYUVerFrame class
    * Command-line tool for quality and frame processing algorithms

%package -n     lib%{soname}%{sover}
Summary:        C++ library for %{name}
Group:          System/Libraries
Provides:       lib%{name}%{sover} = %{version}

%description -n lib%{soname}%{sover}
YUV video player.

This package contains the shared library.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       lib%{name}%{sover} = %{version}

%description    devel
YUV video player.

This package contains the header files and libraries needed to develop
application that use %{name}.

%prep
%setup -q

# Build static libraries of modules
sed -i '/ADD_LIBRARY/s/PlaYUVerModules/& STATIC/' modules/CMakeLists.txt

# Remove shebang line from the .desktop file
find -name \*.desktop -exec sed -i '/xdg-open$/d' {} \;

%build
# https://github.com/opencv/opencv/issues/10105 (CMAKE_BUILD_TYPE=Release)
%cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DUSE_SSE=OFF \
    -DUSE_STATIC=OFF \
    -DUSE_FFMPEG=ON \
    -DUSE_QTDBUS=ON \
    -DUSE_OPENCV=ON

make %{?_smp_mflags}

%install
%cmake_install

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

%files
%doc LICENSE README.md
%{_bindir}/playuver*
%{_datadir}/applications/playuver.desktop
%{_datadir}/mime/packages/playuver.xml
%{_datadir}/pixmaps/playuver.png

%files -n lib%{soname}%{sover}
%{_libdir}/libPlaYUVerLib.so.*

%files devel
%{_includedir}/PlaYUVer*.h
%{_libdir}/libPlaYUVerLib.so
%{_datadir}/playuver/

%changelog
openSUSE Build Service is sponsored by