Linux rpmbuild正在/usr/local中构建我的目标目录,而不是我指定的位置
我的rpmbuild应该发生在Linux rpmbuild正在/usr/local中构建我的目标目录,而不是我指定的位置,linux,rpm,prefix,rpmbuild,Linux,Rpm,Prefix,Rpmbuild,我的rpmbuild应该发生在/include、/lib和/share中,我已经在规范文件中指定了这一点。但是在BUILDROOT目录中,它是在/usr/local/include,/usr/local/lib,/usr/local/share中创建的。然后抛出一个错误(很明显),因为我在前面的位置查找文件 为什么会发生这种情况?我没有指定/usr/local,那么它为什么要选择这个位置呢 这是我的.spec文件:- %define __spec_install_post %{ni
/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
我想构建这样的测试-1.0-1x86\u 64/具有/include
、/lib
和/share
而不是/usr/local/。
前缀--prefix
选项设置您的路径。非--前缀为选项设置路径。非——前缀为