]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
Add a link in the Debian package to a portable CPU backend
authorMathieu Baudier <redacted>
Wed, 22 Jan 2025 09:47:41 +0000 (10:47 +0100)
committerMathieu Baudier <redacted>
Wed, 22 Jan 2025 09:59:40 +0000 (10:59 +0100)
debian/libggml-cpu.install
debian/rules

index 277c440917bcbe35891e6c507ac13271ded2d897..927fa70e7718c9a494449c8a6aeb0ce4eb1d699b 100644 (file)
@@ -1 +1,4 @@
 /usr/libexec/*/ggml/libggml-cpu*.so
+
+# portable CPU backend
+/usr/lib/*/libggml-cpu.so
index 395ac60cac6e43439b596930b0c5eb2a04f21583..e38fd4c38a4609d7be5e17f1970d45c35ce913a4 100755 (executable)
@@ -9,6 +9,7 @@ export LC_ALL
 include /usr/share/dpkg/architecture.mk
 
 build_multiarch=build/$(DEB_HOST_MULTIARCH)
+install_lib_multiarch=debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
 install_libexec_multiarch=debian/tmp/usr/libexec/$(DEB_HOST_MULTIARCH)
 
 # parallelism
@@ -63,3 +64,8 @@ override_dh_auto_install:
        #patchelf --set-soname $$(basename "$$file") $$file; \
                install -t $(install_libexec_multiarch)/ggml $$file; \
        done
+       
+       # whisper.cpp currently requires linking to a CPU backend
+       # we therefore provide a link in /usr/lib/*/
+       # TODO use alternative
+       ln -s --relative $(install_libexec_multiarch)/ggml/libggml-cpu-sandybridge.so $(install_lib_multiarch)/libggml-cpu.so