如何在rpmbuild规范文件中为gmake设置destdir

发布于 2025-02-04 05:05:12 字数 482 浏览 4 评论 0原文

我正在尝试构建一个规格文件,以支持QT自定义的RPM。因为QT的配置脚本无法识别%configure scriptlet中包含的某些选项 ./ configure -prefix =%{_ qtdir} -confirm-license -opensourse -opensource -System -Sqlite -opengl桌面其中_qtdir是/opt/custom custom/sensor。

我的问题是,通过尝试直接安装到/opt/opt/custom/传感器而不是在buildroot目录下,%安装步骤失败。我尝试设置destdir和前缀没有运气,例如,

%install
make install prefix=%{_buildrootdir}/%{sensor}.Qt-%{version}-1.el7_9.x86_64%{_qtdir}

如何获得使安装尊重安装目录,而不是对配置脚本提供的内容?

I'm trying to build a SPEC file to support a customized RPM for Qt. Because Qt's configure script doesn't recognize some of the options automatically included in the %configure scriptlet I have to call it explicitly in the SPEC file with
./configure --prefix=%{_qtdir} -confirm-license -opensource -system-sqlite -opengl desktop where _qtdir is /opt/custom/SENSOR.

My problem is that the %install step fails by trying to install directly to /opt/custom/SENSOR instead of under the BUILDROOT directory. I've tried setting DESTDIR and prefix with no luck, e.g.

%install
make install prefix=%{_buildrootdir}/%{sensor}.Qt-%{version}-1.el7_9.x86_64%{_qtdir}

How do I get make install to respect an installation directory other than what was given to the configure script?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月苍老的讽刺 2025-02-11 05:05:12

它应该像

make install DESTDIR=%{_buildrootdir}

发行版一样工作,可能有一些宏来为您提供帮助,例如在Fedora上

%build
%configure
%make_build

%install
%make_install

It is supposed to work like

make install DESTDIR=%{_buildrootdir}

Distributions may have some macros defined to help you there, e.g. on Fedora

%build
%configure
%make_build

%install
%make_install
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文