From 5f89dfd392ea87ce69cf27b19b0a4a73a4b4d31b Mon Sep 17 00:00:00 2001 From: Steven Seungcheol Lee Date: Tue, 26 Nov 2024 14:38:34 +0900 Subject: [PATCH] rpm: use defined prefix from meson meson use default prefix with /usr/local so rpm default macro defined installation directoy occur error RPM build errors: File not found: /root/rpmbuild/BUILDROOT/libnvme-1.11-0.x86_64/usr/lib64/libnvme* To fix this use defined prefix from meson Signed-off-by: Steven Seungcheol Lee --- libnvme.spec.in | 2 ++ meson.build | 1 + 2 files changed, 3 insertions(+) diff --git a/libnvme.spec.in b/libnvme.spec.in index ea263ce0c..82cea0f11 100644 --- a/libnvme.spec.in +++ b/libnvme.spec.in @@ -21,6 +21,8 @@ Provides: libnvme.so.1 This package provides header files to include and libraries to link with for Linux-native nvme device maangement. +%define _prefix @PREFIX@ + %prep %autosetup -c diff --git a/meson.build b/meson.build index c39903dc6..09fa570b5 100644 --- a/meson.build +++ b/meson.build @@ -264,6 +264,7 @@ substs = configuration_data() substs.set('NAME', meson.project_name()) substs.set('VERSION', meson.project_version()) substs.set('LICENSE', meson.project_license()[0]) +substs.set('PREFIX', prefixdir) configure_file( input: 'libnvme.spec.in', output: 'libnvme.spec',