summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGianluca Boiano2024-12-12 00:04:05 +0100
committerGianluca Boiano2024-12-12 00:04:05 +0100
commit1b840df68deba9a4009f64df5a60d75a062ba396 (patch)
tree57a915e27a49e4ae8221bae730dd97633bf9f686
downloadaur-1b840df68deba9a4009f64df5a60d75a062ba396.tar.gz
whisper.cpp: 1.7.2
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD52
2 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f1ba1eef7824
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = whisper.cpp-openvino
+ pkgdesc = Port of OpenAI's Whisper model in C/C++ (with OpenVINO run-time)
+ pkgver = 1.7.2
+ pkgrel = 1
+ url = https://github.com/ggerganov/whisper.cpp
+ arch = armv7h
+ arch = aarch64
+ arch = x86_64
+ license = MIT
+ makedepends = ccache
+ makedepends = cmake
+ makedepends = git
+ depends = glibc
+ depends = gcc-libs
+ depends = openmp
+ depends = openvino
+ depends = pugixml
+ provides = whisper.cpp
+ conflicts = whisper.cpp
+ source = whisper.cpp-1.7.2.tar.gz::https://github.com/ggerganov/whisper.cpp/archive/v1.7.2.tar.gz
+ sha256sums = d48e1b5b6ee18b931e98ac791eba838f83eb3b81bb8917db37fe9a79fa5e3ccb
+
+pkgname = whisper.cpp-openvino
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b2ba7c629c68
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: robertfoster
+
+_pkgbase=whisper.cpp
+pkgname="${_pkgbase}-openvino"
+pkgver=1.7.2
+pkgrel=1
+pkgdesc="Port of OpenAI's Whisper model in C/C++ (with OpenVINO run-time)"
+arch=('armv7h' 'aarch64' 'x86_64')
+url="https://github.com/ggerganov/whisper.cpp"
+license=("MIT")
+depends=('glibc' 'gcc-libs' 'openmp' 'openvino' 'pugixml')
+conflicts=("${_pkgbase}")
+provides=("${_pkgbase}")
+makedepends=(
+ 'ccache'
+ 'cmake'
+ 'git'
+)
+
+source=("${_pkgbase}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
+
+build() {
+ cd "${srcdir}/${_pkgbase}-${pkgver}"
+
+ cmake \
+ -B build \
+ -S . \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DWHISPER_OPENVINO=1
+
+ cmake --build build
+}
+
+package() {
+ cd "${srcdir}/${_pkgbase}-${pkgver}"
+ DESTDIR="${pkgdir}" cmake --install build
+
+ for i in build/bin/*; do
+ install -Dm755 "${i}" \
+ "${pkgdir}/usr/bin/${_pkgbase}-${i//build\/bin\//}"
+ done
+ mv "${pkgdir}/usr/bin/${_pkgbase}-main" \
+ "${pkgdir}/usr/bin/${_pkgbase}"
+ rm "${pkgdir}/usr/include/"ggml*
+ rm "${pkgdir}/usr/lib/libggml.so"
+
+ install -Dm644 LICENSE \
+ -t "${pkgdir}/usr/share/licenses/${_pkgbase}"
+}
+
+sha256sums=('d48e1b5b6ee18b931e98ac791eba838f83eb3b81bb8917db37fe9a79fa5e3ccb')