]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
Improve packaging based on Debian mentoring feedback
authorMathieu Baudier <redacted>
Sun, 23 Feb 2025 14:13:50 +0000 (15:13 +0100)
committerMathieu Baudier <redacted>
Sun, 23 Feb 2025 15:13:20 +0000 (16:13 +0100)
debian/changelog
debian/cmake/debian-whisper.cpp.cmake
debian/control
debian/copyright
debian/libwhisper1.lintian-overrides [new file with mode: 0644]
debian/rules
debian/source/lintian-overrides
debian/watch [new file with mode: 0644]
debian/whisper-cpp-dev.install

index a5165fe95d0f04f2804aacc82c2d03b2de2d4439..8fc9b9d2664a59711e61ef5d265cf3050aca79e7 100644 (file)
@@ -1,5 +1,5 @@
-whisper-cpp (1.7.4+95-1) unstable; urgency=medium
+whisper-cpp (1.7.4+95-2) unstable; urgency=medium
 
-  * Update upstream
+  * Improve packaging based on mentoring feedback
 
- -- Mathieu Baudier <mbaudier@argeo.org>  Wed, 05 Feb 2025 15:05:40 +0000
+ -- Mathieu Baudier <mbaudier@argeo.org>  Sun, 23 Feb 2025 11:39:50 +0000
index e66fc203d84d18877df6883cd5c9d2d9f21ac232..e9b7025d94875e5cb53a09f230f96e3aa33c4a7c 100644 (file)
@@ -21,7 +21,9 @@ set_target_properties(ggml PROPERTIES IMPORTED_LOCATION ${GGML_LOCATION})
 target_link_libraries(ggml INTERFACE ${GGML_BASE_LOCATION})
 
 # libwhisper actually link against a CPU backend
-find_library(GGML_CPU_LOCATION ggml-cpu)
+#find_library(GGML_CPU_LOCATION ggml-cpu)
+# FIXME better way to find CPU backend
+set(GGML_CPU_LOCATION /usr/libexec/${CMAKE_LIBRARY_ARCHITECTURE}/ggml/libggml-cpu-sandybridge.so)
 message (STATUS "Found GGML CPU library: ${GGML_CPU_LOCATION}")
 link_libraries(${GGML_CPU_LOCATION})
 
index 8dd0a71b144bab7146fbe49456f04a877f973e7e..3e6ca94ed4bc9cb0c72e06678841a8adadce58ae 100644 (file)
@@ -2,64 +2,75 @@ Source: whisper-cpp
 Section: science
 Priority: optional
 Maintainer: Mathieu Baudier <mbaudier@argeo.org>
-Build-Depends: debhelper-compat (= 13), pkg-config, cmake-data, cmake, cpio, file, git,
-       libsdl2-dev, 
-       ggml-dev, libggml-cpu, libllama-dev
-Standards-Version: 4.5.1
+Build-Depends: debhelper-compat (= 13), pkgconf,
+       cmake-data, cmake,
+       libsdl2-dev,
+       ggml-dev, libggml-cpu,
+       libllama0-dev,
+Standards-Version: 4.7.0
+Vcs-Git: https://git.djapps.eu/pkg/ggml/sources/whisper.cpp
+Vcs-Browser: https://git.djapps.eu/?p=pkg/ggml/sources/whisper.cpp;a=summary
 Homepage: https://github.com/ggerganov/whisper.cpp
 Rules-Requires-Root: binary-targets
 
 Package: libwhisper1
-Priority: optional
+Section: libs
 Architecture: any
 Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
 Depends: ${misc:Depends}, ${shlibs:Depends},
- libggml, libggml-cpu
+ libggml0, libggml-cpu
 Description: Inference of Whisper in pure C/C++ (shared library)
- Whisper.cpp inference of Whisper in pure C/C++ (shared library).
+ The shared library provides the core of whisper.cpp
+ speech-to-text capabilities using a Whisper model.
 
 Package: whisper-cpp-cli
 Architecture: any
-Priority: optional
 Depends: ${misc:Depends}, ${shlibs:Depends},
  libwhisper1
 Description: Inference of Whisper in pure C/C++ (CLI)
- Whisper.cpp inference of Whisper in pure C/C++ (CLI).
+ A versatile tool giving command line access to most
+ whisper-cpp capabilities.
 
 Package: whisper-cpp-stream
 Architecture: any
-Priority: optional
 Depends: ${misc:Depends}, ${shlibs:Depends},
  libwhisper1,
  libsdl2-2.0-0
 Description: Inference of Whisper in pure C/C++ (stream)
- Whisper.cpp inference of Whisper in pure C/C++ (stream).
+ Real-time speech-to-text of SDL sound input.
+ The SDL sound input (typically a microphone) is
+ transcribed as text to the standard output.
 
 Package: whisper-cpp-talk-llama
 Architecture: any
-Priority: optional
 Depends: ${misc:Depends}, ${shlibs:Depends},
- libwhisper1, libllama,
+ libwhisper1, libllama0,
  espeak-ng,
  libswresample4, libavcodec59, libavformat59,
  libsdl2-2.0-0
 Description: Inference of Whisper in pure C/C++ (talk-llama)
- Whisper.cpp inference of Whisper in pure C/C++ (talk-llama).
+ A tool allowing one to "talk" with a large language model,
+ using llama.cpp.
+ The SDL input (typically from a microphone) is translated
+ into text by whisper.cpp and sent to llama.cpp for processing.
 
 Package: libwhisper1-dev
-Priority: optional
+Section: libdevel
 Architecture: any
 Multi-Arch: same
 Depends: ${misc:Depends},
  ggml-dev, libwhisper1 (= ${binary:Version})
 Description: Inference of Whisper in pure C/C++ (development files)
- Whisper.cpp inference of Whisper in pure C/C++ (development files).
+ Development files for using whisper.cpp as a shared library
+ in applications.
 
 Package: whisper-cpp-dev
+Section: libdevel
 Architecture: any
-Priority: optional
 Depends: ${misc:Depends},
  libwhisper1-dev (= ${binary:Version})
 Description: Inference of Whisper in pure C/C++ (common static library)
- Whisper.cpp inference of Whisper in pure C/C++ (common static library).
+ Development files and static libraries of the used to build the tools.
+ These components speeds up the development but are likely to have less
+ stable APIs.
index 7754d047d0f3557f08dbfe395418244c578fc6f6..cef6e23dd87cc6f76f6535bf86032fac39b6620b 100644 (file)
@@ -5,7 +5,7 @@ Source: https://github.com/ggerganov/whisper.cpp
 
 Files: *
 Copyright: Copyright (c) 2023-2025 The whisper.cpp authors
-License: MIT 
+License: Expat 
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
diff --git a/debian/libwhisper1.lintian-overrides b/debian/libwhisper1.lintian-overrides
new file mode 100644 (file)
index 0000000..e52c6ed
--- /dev/null
@@ -0,0 +1,3 @@
+# According to https://wiki.debian.org/UsingSymbolsFiles
+# "For C++ libraries it is often better not to ship symbols files."
+libwhisper1: no-symbols-control-file usr/lib/x86_64-linux-gnu/libwhisper.so.*
index 0bed3d32d0cada62b460637f7ae3e62d14e50693..5790272d79e7feabf56c45ac73ff1559c2cf6f0c 100755 (executable)
@@ -11,6 +11,12 @@ install_lib=debian/tmp/usr/lib
 install_lib_multiarch=debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
 install_libexec_multiarch=debian/tmp/usr/libexec/$(DEB_HOST_MULTIARCH)
 
+# parallelism
+DEB_BUILD_OPTIONS ?= parallel=8
+
+# hardening
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
 %:
 # Use build/ for output, so that it is in the .gitignore of upstream
        dh $@ --buildsystem=cmake --builddirectory=$(build_multiarch)
index 55bd626eadb367085cfbe8dabdc87617f0646d4d..e37abc56f798c31a4d57a96e0372422edc9d0827 100644 (file)
@@ -1,3 +1,15 @@
+# some of the "examples" are actually source code form this packaging perspective
+whisper-cpp source: package-does-not-install-examples [bindings/go/examples/]
+whisper-cpp source: package-does-not-install-examples [examples/]
+
+# unused source code
 whisper-cpp source: source-is-missing [bindings/javascript/libwhisper.worker.js]
 whisper-cpp source: source-is-missing [bindings/javascript/whisper.js]
 whisper-cpp source: source-is-missing [examples/wchess/wchess.wasm/jquery-3.7.1.min.js]
+whisper-cpp source: source-contains-prebuilt-java-object [bindings/java/gradle/wrapper/gradle-wrapper.jar]
+whisper-cpp source: source-contains-prebuilt-java-object [examples/whisper.android.java/gradle/wrapper/gradle-wrapper.jar]
+whisper-cpp source: source-contains-prebuilt-java-object [examples/whisper.android/gradle/wrapper/gradle-wrapper.jar]
+whisper-cpp source: source-contains-prebuilt-javascript-object [bindings/javascript/libwhisper.worker.js]
+whisper-cpp source: source-contains-prebuilt-javascript-object [bindings/javascript/whisper.js]
+whisper-cpp source: source-contains-prebuilt-javascript-object [examples/wchess/wchess.wasm/chessboardjs-1.0.0/js/chessboard-1.0.0.min.js]
+whisper-cpp source: source-contains-prebuilt-javascript-object [examples/wchess/wchess.wasm/jquery-3.7.1.min.js]
diff --git a/debian/watch b/debian/watch
new file mode 100644 (file)
index 0000000..8b2d317
--- /dev/null
@@ -0,0 +1,3 @@
+version=4
+opts="mode=git" \
+https://git.djapps.eu/pkg/ggml/sources/whisper.cpp refs/tags/upstream/([\d\.]+)
index 02af7f8a415453aa76dcf07937bec71c63110056..e6d7c6c821ced3208b1bf651ffb04fbe5c1bfbc0 100644 (file)
@@ -1,2 +1,3 @@
-/usr/include/whisper.cpp/common
-/usr/lib/*/whisper.cpp/*
+/usr/include/whisper.cpp/common/*.h
+/usr/lib/*/whisper.cpp/common/libcommon.a
+/usr/lib/*/whisper.cpp/common/libcommon-sdl.a