1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#!/usr/bin/make -f
#export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Generate pseudo-build-number using the date of the upstream version
include /usr/share/dpkg/pkg-info.mk
GGML_BUILD_NUMBER = $(basename $(subst 0.0~git,,$(DEB_VERSION_UPSTREAM)))
# GGML_NATIVE:ON corresponds to -march=native
CMAKE_OPTS = -DGGML_NATIVE=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DGGML_BUILD_NUMBER=$(GGML_BUILD_NUMBER) \
-DGGML_BUILD_TESTS=OFF \
-DGGML_BUILD_EXAMPLES=OFF \
-DGGML_INSTALL_TESTS=OFF \
-DGGML_BACKEND_DL=ON \
-DGGML_BACKEND_DIR=/usr/lib/${DEB_HOST_MULTIARCH}/ggml/backends0
## CUDA ##
CMAKE_OPTS += -DGGML_CPU=OFF \
-DGGML_CUDA=ON
%:
dh $@ --buildsystem=cmake
override_dh_auto_configure:
dh_auto_configure -- $(CMAKE_OPTS)
override_dh_auto_install:
# We don't want dh's single-binary mode to install everything directly
# to the package, as we only want a single file
dh_auto_install --destdir=debian/tmp
# No tests for now, needs GPU
override_dh_auto_test:
:
# dwz doesn't fully support DWARF-5 yet, see #1016936
# The HIP build produces DWARF-5 stuff
override_dh_dwz:
:
override_dh_makeshlibs:
# Libraries are private
dh_makeshlibs --no-scripts
|