gpt4 book ai didi

linux - rpmbuild 正在/usr/local 中构建我的目标目录,而不是我指定的位置

转载 作者:太空宇宙 更新时间:2023-11-04 09:24:21 25 4
gpt4 key购买 nike

我的 rpmbuild 应该发生在 /include 中, /lib , 和 /share ,我已经在规范文件中指定了这一点。但是在 BUILDROOT 目录中时,它是在 /usr/local/include 中创建的, /usr/local/lib , /usr/local/share反而。然后抛出一个错误(很明显),因为我正在寻找以前位置的文件。

为什么会这样?我没有在任何地方指定/usr/local,那为什么它会占用这个位置?

这是我的 .spec文件:-

%define        __spec_install_post %{nil}
%define debug_package %{nil}
%define __os_install_post %{_dbpath}/brp-compress


Summary: test
Name: TEST
Version: 1.0
Release: 1
License: MYORG
Group: Development/Tools
SOURCE0 : %{name}.tar.gz
%define pbs_prefix /opt/dir1/TEST

BuildRoot: %{_topdir}/%{name}

%description
%{summary}

%prep
%setup -q

%build
./configure --with-prefix=/opt/dir1/TEST --with-drms-dir=/opt/dir1

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}

%make_install

%clean
rm -rf %{buildroot}

%files
/opt/dir1/TEST/include/*
/opt/dir1/TEST/lib/*
/opt/dir1/TEST/share/*

我的 ~/.rpmmacros文件是:-

%_topdir   %(echo $HOME)/rpmbuild
%_tmppath %{_topdir}/tmp

我想构建我的 TEST-1.0-1x86_64//include , /lib/share不是/usr/local/.. .

最佳答案

--prefix 选项设置您的路径。不是 --with-prefix

关于linux - rpmbuild 正在/usr/local 中构建我的目标目录,而不是我指定的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38300819/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com