Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:X0F:HSF
mpv
mpv.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mpv.spec of Package mpv
# # spec file for package mpv # # Copyright (c) 2024 SUSE LLC # Copyright (c) 2015 Packman Team <packman@links2linux.de> # Copyright (c) 2012 Jiri Slaby <jslaby@suse.de> # Copyright (c) 2011-2012 Pascal Bleser <pascal.bleser@opensuse.org> # # 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/ # %bcond_with x264 %bcond_with x265 %define lname libmpv2 Name: mpv Version: 0.39.0+243~git20241027.423e8f271 Release: 0 Summary: Advanced general-purpose multimedia player License: GPL-2.0-or-later Group: Productivity/Multimedia/Video/Players URL: http://mpv.io Source: %{name}-%{version}.tar.xz Source2: %{name}.changes # PATCH-FIX-OPENSUSE do not require equal libav versions, obs rebuilds as needed Patch0: mpv-make-ffmpeg-version-check-non-fatal.patch Patch100: mpv_avoid-shader-cache-flushes.patch #Patch101: mpv_PR12593.patch #Patch103: mpv_PR12840.patch # might be needed when gpu-next/libplacebo fails again Patch107: mpv_PR12917.patch BuildRequires: bash BuildRequires: hicolor-icon-theme BuildRequires: linux-kernel-headers BuildRequires: meson >= 0.60.3 # Needed any lua to convert the bash-completion BuildRequires: lua # need to replace waf build with meson # BuildRequires: meson >= 0.60.3 BuildRequires: perl BuildRequires: pkgconfig BuildRequires: python3-docutils #BuildRequires: sndio-devel BuildRequires: update-desktop-files BuildRequires: v4l-utils-devel-tools BuildRequires: pkgconfig(alsa) >= 1.0.18 BuildRequires: pkgconfig(caca) >= 0.99.beta18 BuildRequires: pkgconfig(colord) BuildRequires: pkgconfig(dri) BuildRequires: pkgconfig(dvdnav) >= 4.2.0 BuildRequires: pkgconfig(dvdread) >= 4.1.0 BuildRequires: pkgconfig(egl) >= 1.4 #BuildRequires: pkgconfig(enca) BuildRequires: pkgconfig(ffnvcodec) >= 11.1.5.1 BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(jack) BuildRequires: pkgconfig(lcms2) >= 2.6 BuildRequires: pkgconfig(libarchive) >= 3.4.0 BuildRequires: pkgconfig(libass) >= 0.12.2 BuildRequires: pkgconfig(libavcodec) >= 60.31.102 BuildRequires: pkgconfig(libavdevice) >= 60.3.100 BuildRequires: pkgconfig(libavfilter) >= 9.12.100 BuildRequires: pkgconfig(libavformat) >= 60.16.100 BuildRequires: pkgconfig(libavif) >= 0.11.1 BuildRequires: pkgconfig(libavutil) >= 58.29.100 BuildRequires: pkgconfig(libbluray) >= 0.3.0 BuildRequires: pkgconfig(libcdio) BuildRequires: pkgconfig(libcdio_cdda) BuildRequires: pkgconfig(libcdio_paranoia) BuildRequires: pkgconfig(libdrm) >= 2.4.105 BuildRequires: pkgconfig(libiso9660) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libjxl) BuildRequires: pkgconfig(libjxl_threads) BuildRequires: pkgconfig(libpulse) >= 1.0 BuildRequires: pkgconfig(libsixel) >= 1.5 BuildRequires: pkgconfig(libswresample) >= 4.12.100 BuildRequires: pkgconfig(libswscale) >= 7.5.100 BuildRequires: pkgconfig(libudf) BuildRequires: pkgconfig(libv4l2) BuildRequires: pkgconfig(libva) >= 1.1.0 BuildRequires: pkgconfig(libva-x11) >= 1.1.0 BuildRequires: pkgconfig(openal) >= 1.13 BuildRequires: pkgconfig(python3) # SDL might be pointless on Linux BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(SDL2_mixer) # Obsolete and not in main OBS #BuildRequires: pkgconfig(rsound) BuildRequires: pkgconfig(rubberband) >= 3.0.0 BuildRequires: pkgconfig(uchardet) BuildRequires: pkgconfig(vapoursynth) >= 56 BuildRequires: pkgconfig(vapoursynth-script) >= 56 BuildRequires: pkgconfig(vdpau) >= 0.2 BuildRequires: pkgconfig(x11) >= 1.0.0 BuildRequires: pkgconfig(xext) >= 1.0.0 BuildRequires: pkgconfig(xkbcommon) >= 0.3.0 BuildRequires: pkgconfig(xpresent) >= 1.0.0 BuildRequires: pkgconfig(xrandr) >= 1.4.0 BuildRequires: pkgconfig(xscrnsaver) >= 1.0.0 BuildRequires: pkgconfig(xv) BuildRequires: pkgconfig(zimg) >= 2.9 BuildRequires: pkgconfig(zlib) %if %{with x264} BuildRequires: pkgconfig(x264) %endif %if %{with x265} BuildRequires: pkgconfig(x265) %endif Requires: hicolor-icon-theme Requires(post): hicolor-icon-theme Requires(post): update-desktop-files Requires(postun): hicolor-icon-theme Requires(postun): update-desktop-files # Used via LUA scripts Recommends: yt-dlp Conflicts: mpv-plugin-mpris < 0.4 # Obsoletion of mplayer2 that is dead for 2 years now Provides: mplayer2 = 20140101 Obsoletes: mplayer2 < 20140101 BuildRequires: pkgconfig(libpipewire-0.3) >= 0.3.48 BuildRequires: pkgconfig(libplacebo) >= 6.338.2 BuildRequires: pkgconfig(libva-wayland) >= 1.1.0 BuildRequires: pkgconfig(mujs) BuildRequires: pkgconfig(shaderc) BuildRequires: pkgconfig(vulkan) >= 1.3.238 BuildRequires: pkgconfig(wayland-client) >= 1.20.0 BuildRequires: pkgconfig(wayland-cursor) >= 1.20.0 BuildRequires: pkgconfig(wayland-egl) >= 9.0.0 BuildRequires: pkgconfig(wayland-protocols) >= 1.25 BuildRequires: pkgconfig(wayland-scanner) BuildRequires: pkgconfig(wayland-server) # just to make sure BuildRequires: pkgconfig(SPIRV-Tools) Requires: spirv-tools #BuildRequires: pkgconfig(crossc) # JIT for lua. %ifarch aarch64 %{ix86} x86_64 BuildRequires: pkgconfig(luajit) %else BuildRequires: pkgconfig(lua5.2) %endif %description mpv is a movie player based on MPlayer and mplayer2. It supports a wide variety of video file formats, audio and video codecs, and subtitle types. %package bash-completion Summary: Bash Completion for %{name} Group: Productivity/Multimedia/Video/Players Requires: %{name} = %{version} Requires: bash-completion Recommends: xrandr Supplements: (mpv and bash) BuildArch: noarch %description bash-completion Bash command line completion support for %{name}. %package zsh-completion Summary: ZSH Completion for %{name} Group: Productivity/Multimedia/Video/Players Requires: %{name} = %{version} Supplements: (mpv and zsh) BuildArch: noarch %description zsh-completion ZSH command line completion support for %{name}. %package devel Summary: A library to link together with mpv player Group: Development/Libraries/C and C++ Requires: %{lname} = %{version} %description devel mpv is a movie player based on MPlayer and mplayer2. It supports a wide variety of video file formats, audio and video codecs, and subtitle types. This package contains all the development files. %package -n %{lname} Summary: A library to link together with mpv player Group: System/Libraries %description -n %{lname} mpv is a movie player based on MPlayer and mplayer2. It supports a wide variety of video file formats, audio and video codecs, and subtitle types. This package contains a library that can other apps use to utilize the mpv features. %prep %autosetup -p1 # I hate UNKNOWN so lets put decent info there. MODIFIED="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE2}")" DATE="$(date -d "$MODIFIED" "+%%b %%e %%Y")" sed -i "s|UNKNOWN|$DATE|g;s|VERSION|\"%{version}\"|g" common/version.c # ah, typical Window$ developers… sed -i -e '/\/win32\//d' player/main.c %build # be aggressive ? export CFLAGS="%{optflags} -DNDEBUG -g -O3 -ftree-parallelize-loops=4 -ftree-vectorize -fpredictive-commoning -flto=%jobs -ffat-lto-objects -flto-odr-type-merging -fuse-linker-plugin" %ifarch x86_64 export CFLAGS="${CFLAGS} -march=x86-64-v2 -mtune=generic -mavx -maes -mpclmul" %else %ifarch %ix86 export CFLAGS="${CFLAGS} -march=x86-64-v2 -mtune=i586 -mavx -maes -mpclmul" %endif %endif export CCFLAGS="${CFLAGS}" export CXXFLAGS="${CFLAGS}" export LDFLAGS="${LDFLAGS} -Wl,--sort-common -Wl,-O1 -flto=%jobs -fuse-linker-plugin" # We don't want to rebuild all the time. myopts=" -Dbuild-date=false" %meson \ --auto-features=auto \ -Dcdda=enabled \ -Dlibmpv=true \ -Ddvbin=enabled \ -Ddvdnav=enabled \ -Dopenal=enabled \ -Dmanpage-build=enabled \ -Dandroid-media-ndk=disabled \ -Daudiounit=disabled \ -Dcocoa=disabled \ -Dcoreaudio=disabled \ -Dd3d-hwaccel=disabled \ -Dd3d11=disabled \ -Dd3d9-hwaccel=disabled \ -Ddirect3d=disabled \ -Degl-android=disabled \ -Degl-angle-lib=disabled \ -Degl-angle-win32=disabled \ -Degl-angle=disabled \ -Dgl-cocoa=disabled \ -Dgl-dxinterop-d3d9=disabled \ -Dgl-dxinterop=disabled \ -Dgl-win32=disabled \ -Dios-gl=disabled \ -Dmacos-cocoa-cb=disabled \ -Dmacos-media-player=disabled \ -Dmacos-touchbar=disabled \ -Dopensles=disabled \ -Doss-audio=disabled \ -Dsdl2=enabled \ -Dsdl2-audio=disabled \ -Dsdl2-gamepad=enabled \ -Dsdl2-video=disabled \ -Dsndio=disabled \ -Dspirv-cross=disabled \ -Dswift-build=disabled \ -Dvideotoolbox-gl=disabled \ -Dwasapi=disabled \ -Dwin32-threads=disabled \ -Dvulkan=enabled \ -Dvector=enabled \ ${myopts} \ %{?nil} %meson_build %install %meson_install mkdir -p %{buildroot}/%{_defaultdocdir}/%{name} mv %{buildroot}/%{_datadir}/doc/%{name}/* %{buildroot}/%{_defaultdocdir}/%{name}/ mkdir -p %{buildroot}%{_sysconfdir}/%{name}/scripts cp -R ./player/lua/*.lua %{buildroot}%{_sysconfdir}/%{name}/scripts/ mkdir -p %{buildroot}%{_datadir}/mpv cp ./TOOLS/* %{buildroot}%{_datadir}/mpv/ || true cp -r ./TOOLS/{__pycache__,lua} %{buildroot}%{_datadir}/mpv/ || true %check #meson_test %post -n %{lname} -p /sbin/ldconfig %postun -n %{lname} -p /sbin/ldconfig %files %license LICENSE.GPL Copyright %doc README.md RELEASE_NOTES %doc %{_defaultdocdir}/%{name}/* %dir %{_sysconfdir}/%{name}/ %{_sysconfdir}/%{name}/scripts/ %config %{_sysconfdir}/%{name}/encoding-profiles.conf %{_bindir}/%{name} %{_datadir}/mpv %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor %{_datadir}/metainfo/mpv.metainfo.xml %{_mandir}/man?/%{name}.?%{?ext_man} %files zsh-completion %{_datadir}/zsh/site-functions/_mpv %files bash-completion %{_datadir}/bash-completion/completions/mpv %files -n %{lname} %{_libdir}/*.so.* %files devel %{_includedir}/%{name}/ %{_libdir}/*.so %{_libdir}/pkgconfig/%{name}.pc %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor