[packages/whisper.cpp] - new
qboosh
qboosh at pld-linux.org
Tue Aug 26 17:23:14 CEST 2025
commit 45fc34b95ff9d10928d701d5c5ad57941d130cb5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Aug 26 17:25:46 2025 +0200
- new
whisper.cpp.spec | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 148 insertions(+)
---
diff --git a/whisper.cpp.spec b/whisper.cpp.spec
new file mode 100644
index 0000000..d62c170
--- /dev/null
+++ b/whisper.cpp.spec
@@ -0,0 +1,148 @@
+# TODO:
+# - system GGML once released
+# - CUDA
+# - Vulkan (hangs on ENOMEM on x86)
+#
+# Conditional build:
+%bcond_with system_ggml # system GGML library
+%bcond_with curl # model downloading via cURL (nop, only in cmake)
+%bcond_without ffmpeg # ffmpeg support
+%bcond_without sdl # SDL (2.x) support
+%bcond_with vulkan # Vulkan support in GGML
+%bcond_with sse42 # SSE 4.2 instructions on ix86
+%bcond_with avx # AVX instructions on ix86
+%bcond_with avx2 # AVX2 instructions on ix86
+#
+Summary: Port of OpenAI's Whisper model in C/C++
+Summary(pl.UTF-8): Port modelu OpenAI Whisper w C/C++
+Name: whisper.cpp
+Version: 1.7.6
+Release: 1
+License: MIT
+Group: Libraries
+#Source0Download: https://github.com/ggml-org/whisper.cpp/releases
+Source0: https://github.com/ggml-org/whisper.cpp/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: fe917e4abd5961e2b4827abc21074093
+URL: https://github.com/ggml-org/whisper.cpp
+%{?with_sdl:BuildRequires: SDL2-devel >= 2.0}
+%{?with_vulkan:BuildRequires: Vulkan-Loader-devel}
+BuildRequires: cblas-devel
+BuildRequires: cmake >= 3.19
+%{?with_curl:BuildRequires: curl-devel}
+# libavcodec libavformat libavutil libswresample
+%{?with_ffmpeg:BuildRequires: ffmpeg-devel}
+BuildRequires: gcc >= 6:4.7
+BuildRequires: libgomp-devel
+BuildRequires: libstdc++-devel >= 6:7
+BuildRequires: pkgconfig
+%{?with_vulkan:BuildRequires: shaderc}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+High-performance inference of OpenAI's Whisper
+(<https://github.com/openai/whisper>) automatic speech recognition
+(ASR) model.
+
+%description -l pl.UTF-8
+Wydajna pochodna modelu automatycznego rozpoznawania mowy (ASR)
+OpenAI Whisper (<https://github.com/openai/whisper>).
+
+%package tools
+Summary: Tools for Whisper ASR model
+Summary(pl.UTF-8): Narzędzia do modelu automatycznego rozpoznawania mowy Whisper
+Group: Applications/Sound
+Requires: %{name} = %{version}-%{release}
+
+%description tools
+Tools for Whisper ASR model.
+
+%description tools -l pl.UTF-8
+Narzędzia do modelu automatycznego rozpoznawania mowy Whisper.
+
+%package devel
+Summary: Header files for whisper.cpp library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki whisper.cpp
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for whisper.cpp library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki whisper.cpp.
+
+%prep
+%setup -q
+
+%build
+# TODO:
+# WHISPER_OPENVINO?
+# GGML_CUDA on bcond
+# GGML_KOMPUTE (https://github.com/KomputeProject/kompute)
+# GGML_RPC?
+# GGML_SYCL (oneAPI SYCL, oneDNN)
+# BMI2 code requires x86_64 (thus GGML_CPU_ALL_VARIANTS is not applicable to ix86)
+%cmake -B build \
+%ifarch %{x8664} x32
+ -DGGML_CPU_ALL_VARIANTS=ON \
+%else
+%ifarch %{ix86}
+ -DGGML_SSE42=%{__ON_OFF sse42} \
+ -DGGML_AVX=%{__ON_OFF avx} \
+ -DGGML_AVX2=%{__ON_OFF avx2} \
+ -DGGML_BMI2=OFF \
+%endif
+%endif
+ -DGGML_NATIVE=OFF \
+ -DGGML_OPENMP=ON \
+ %{?with_vulkan:-DGGML_VULKAN=ON} \
+ %{?with_curl:-DWHISPER_CURL=ON} \
+ %{?with_ffmpeg:-DWHISPER_FFMPEG=ON} \
+ %{?with_sdl:-DWHISPER_SDL2=ON} \
+ %{?with_system_ggml:-DWHISPER_USE_SYSTEM_GGML=ON}
+
+%{__make} -C build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS LICENSE README.md README_sycl.md
+%attr(755,root,root) %{_libdir}/libwhisper.so.*.*.*
+%ghost %{_libdir}/libwhisper.so.1
+%if %{without system_ggml}
+%attr(755,root,root) %{_libdir}/libggml.so
+%attr(755,root,root) %{_libdir}/libggml-base.so
+%attr(755,root,root) %{_libdir}/libggml-cpu.so
+%endif
+
+%files tools
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/vad-speech-segments
+%attr(755,root,root) %{_bindir}/whisper-bench
+%attr(755,root,root) %{_bindir}/whisper-cli
+%attr(755,root,root) %{_bindir}/whisper-command
+%attr(755,root,root) %{_bindir}/whisper-server
+%attr(755,root,root) %{_bindir}/whisper-stream
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/libwhisper.so
+%{_includedir}/whisper.h
+%{_libdir}/cmake/whisper
+%{_pkgconfigdir}/whisper.pc
+%if %{without system_ggml}
+%{_includedir}/ggml*.h
+%{_includedir}/gguf.h
+%{_libdir}/cmake/ggml
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/whisper.cpp.git/commitdiff/45fc34b95ff9d10928d701d5c5ad57941d130cb5
More information about the pld-cvs-commit
mailing list