]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
meson: bump to 0.61, use install_symlink()
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 24 Oct 2024 12:34:45 +0000 (13:34 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 24 Oct 2024 23:10:12 +0000 (18:10 -0500)
Bump the meson requirement to 0.61 which allows us to remove our clunky
shell script in favour of the native install_symlink().

In terms of OS support - according to repology, all distributions which
have 0.60 (Fedora 36 + winget) also have 0.61 in their repositories.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/209
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Makefile.am
meson.build
scripts/kmod-symlink.sh [deleted file]

index 3f4e132b932baab21d1f9533096c96c7967dec6f..1a48756b77d99b176a2fc70573e939034502234a 100644 (file)
@@ -24,8 +24,7 @@ EXTRA_DIST += \
        testsuite/meson.build \
        scripts/build-scdoc.sh \
        scripts/sanitizer-env.sh \
-       scripts/test-gtkdoc.sh \
-       scripts/kmod-symlink.sh
+       scripts/test-gtkdoc.sh
 
 AM_CPPFLAGS = \
        -include $(top_builddir)/config.h \
index 179783389700d35a8dfbc4871b38064db563df98..1b862c969f031c31908502c992ff9df9f1d20ea9 100644 (file)
@@ -3,7 +3,7 @@ project(
   'c',
   version : '33',
   license : ['LGPLv2.1', 'GPL-2.0-or-later'],
-  meson_version : '>=0.60.0',
+  meson_version : '>=0.61.0',
   default_options : [
     'c_std=gnu11',
     'b_pie=true',
@@ -471,11 +471,9 @@ _tools = [
   'rmmod',
 ]
 
-kmod_symlink = find_program('scripts/kmod-symlink.sh')
 foreach tool : _tools
   if get_option('tools')
-    symlink = bindir / tool
-    meson.add_install_script(kmod_symlink, symlink)
+    install_symlink(tool, pointing_to: 'kmod', install_dir: bindir)
   endif
 endforeach
 
diff --git a/scripts/kmod-symlink.sh b/scripts/kmod-symlink.sh
deleted file mode 100755 (executable)
index f825eef..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-
-# Dummy wrapper script, since that's the meson way. Aka, there is no access to
-# DESTDIR from within meson nor any other way to check/fetch it.
-#
-# For context read through https://github.com/mesonbuild/meson/issues/9
-
-DESTDIR=${DESTDIR:-/}
-
-ln -sf kmod "$DESTDIR/$1"