add: vgmstream (#6490)

Close #6443.
This commit is contained in:
madomado
2025-09-28 23:00:14 +08:00
committed by GitHub
parent 85574cbeb6
commit a698db2645
3 changed files with 65 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
project pkg {
rpm {
spec = "vgmstream.spec"
}
}
+5
View File
@@ -0,0 +1,5 @@
rpm.global("commit", gh_commit("vgmstream/vgmstream"));
if rpm.changed() {
rpm.global("commit_date", date());
rpm.release();
}
+55
View File
@@ -0,0 +1,55 @@
%global commit 9db666eb0c2275334ac68a2537a6a689aee792f2
%global shortcommit %{sub %{commit} 1 7}
%global commit_date 20250924
Name: vgmstream
Version: 0~%{commit_date}git.%shortcommit
Release: 1%?dist
Summary: A library for playback of various streamed audio formats used in video games
License: ISC
URL: https://vgmstream.org
Packager: madonuko <mado@fyralabs.com>
Source0: https://github.com/vgmstream/vgmstream/archive/%commit.tar.gz
# https://github.com/vgmstream/vgmstream/blob/master/make-build-cmake.sh
BuildRequires: gcc gcc-c++ cmake git-core
BuildRequires: pkgconfig(libmpg123) pkgconfig(vorbis) pkgconfig(speex)
BuildRequires: pkgconfig(libavformat) pkgconfig(libavcodec) pkgconfig(libavutil) pkgconfig(libswresample)
BuildRequires: yasm pkgconfig(opus) pkgconfig(ao) pkgconfig(audacious)
%description
%summary.
%package devel
%pkg_devel_files
%license COPYING
%_libdir/cmake/vgmstream
%package -n audacious-plugins-vgmstream
Summary: Audacious input plugin for vgmstream
Supplements: (vgmstream and audacious)
%description -n audacious-plugins-vgmstream
Audacious input plugin for vgmstream.
For more information, see the main vgmstream package.
%files -n audacious-plugins-vgmstream
%license COPYING
%_libdir/audacious/Input/vgmstream.so
%prep
%autosetup -n %name-%commit
sed 's/VERSION=""/VERSION="%shortcommit"/g' -i version-make.sh
%build
# https://github.com/vgmstream/vgmstream/issues/1780
%cmake -DCMAKE_BUILD_TYPE=Release -DUSE_G719=0 %["%_arch" == "x86_64" ? "" : "-DUSE_CELT=0"]
%cmake_build
%install
%cmake_install
%files
%doc README.md SECURITY.md doc/*.md
%license COPYING
%_bindir/vgmstream-cli
%_bindir/vgmstream123