File implay.spec of Package implay
#
# spec file for package implay
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2022 Sergey Kondakov <virtuousfox@gmail.com>
#
# 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 https://bugs.opensuse.org/
#
Name: implay
Version: 1.4.0
Release: 0
Summary: Media player built on top of mpv and ImGui
# see about third party libs
License: GPL-2.0-only
Group: Productivity/Multimedia/Video/Players
URL: https://github.com/tsl0922/ImPlay
Source0: %{name}-%{version}.tar.xz
# PATCH-FEATURE-OPENSUSE implay-use_system_libraries.patch
Patch0: implay-use_system_libraries.patch
BuildRequires: chrpath
BuildRequires: cmake
%if 0%{?suse_version} > 1500
BuildRequires: gcc-c++
%else
BuildRequires: gcc11-c++
%endif
BuildRequires: imgui-devel
BuildRequires: pkgconfig
###BuildRequires: cmake(glfw3) >= 3.1
BuildRequires: pkgconfig(fmt)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(nfd)
BuildRequires: pkgconfig(nlohmann_json)
BuildRequires: pkgconfig(mpv)
%description
ImPlay is a work-in-progress cross-platform desktop media player, built on top of mpv and ImGui.
ImPlay aims to be mpv compatible, which means almost all mpv features from the manual are (or will be) available.
%prep
%autosetup -p1
%build
export CXX=g++
test -x "$(type -p g++-11)" && export CXX=g++-11
%cmake \
-DUSE_PATCHED_GLFW=ON \
-DBUILD_SHARED_LIBS=OFF
%cmake_build
%install
install -D -m755 build/ImPlay %{buildroot}%{_bindir}/ImPlay
mkdir -pv %{buildroot}%{_datadir}/applications
tee %{buildroot}/%{_datadir}/applications/%{name}.desktop << "EOF"
[Desktop Entry]
Type=Application
Name=Graphical interface for mpv media player
GenericName=GUI-enabled Multimedia player
Comment=Play movies and songs with a GUI
Icon=mpv
TryExec=ImPlay
Exec=ImPlay
Terminal=false
Categories=AudioVideo;Audio;Video;Player;TV;
MimeType=application/ogg;application/x-ogg;application/mxf;application/sdp;application/smil;application/x-smil;application/streamingmedia;application/x-streamingmedia;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;audio/aac;audio/x-aac;audio/vnd.dolby.heaac.1;audio/vnd.dolby.heaac.2;audio/aiff;audio/x-aiff;audio/m4a;audio/x-m4a;application/x-extension-m4a;audio/mp1;audio/x-mp1;audio/mp2;audio/x-mp2;audio/mp3;audio/x-mp3;audio/mpeg;audio/mpeg2;audio/mpeg3;audio/mpegurl;audio/x-mpegurl;audio/mpg;audio/x-mpg;audio/rn-mpeg;audio/musepack;audio/x-musepack;audio/ogg;audio/scpls;audio/x-scpls;audio/vnd.rn-realaudio;audio/wav;audio/x-pn-wav;audio/x-pn-windows-pcm;audio/x-realaudio;audio/x-pn-realaudio;audio/x-ms-wma;audio/x-pls;audio/x-wav;video/mpeg;video/x-mpeg2;video/x-mpeg3;video/mp4v-es;video/x-m4v;video/mp4;application/x-extension-mp4;video/divx;video/vnd.divx;video/msvideo;video/x-msvideo;video/ogg;video/quicktime;video/vnd.rn-realvideo;video/x-ms-afs;video/x-ms-asf;audio/x-ms-asf;application/vnd.ms-asf;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvxvideo;video/x-avi;video/avi;video/x-flic;video/fli;video/x-flc;video/flv;video/x-flv;video/x-theora;video/x-theora+ogg;video/x-matroska;video/mkv;audio/x-matroska;application/x-matroska;video/webm;audio/webm;audio/vorbis;audio/x-vorbis;audio/x-vorbis+ogg;video/x-ogm;video/x-ogm+ogg;application/x-ogm;application/x-ogm-audio;application/x-ogm-video;application/x-shorten;audio/x-shorten;audio/x-ape;audio/x-wavpack;audio/x-tta;audio/AMR;audio/ac3;audio/eac3;audio/amr-wb;video/mp2t;audio/flac;audio/mp4;application/x-mpegurl;video/vnd.mpegurl;application/vnd.apple.mpegurl;audio/x-pn-au;video/3gp;video/3gpp;video/3gpp2;audio/3gpp;audio/3gpp2;video/dv;audio/dv;audio/opus;audio/vnd.dts;audio/vnd.dts.hd;audio/x-adpcm;application/x-cue;audio/m3u;
X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb
EOF
%files
%{_bindir}/ImPlay
%{_datadir}/applications/%{name}.desktop
%changelog