开发者

setting installation path for python rpm

Can I set the installation path (relative or absolute) for a p开发者_如何学运维ython rpm's content?

Would I set this in the spec file?

Specifically I am trying to do this for Fedora.


Yes, if you can build a new RPM, you can set it in the spec file. How to do this depends on the package, but basically you get the package to install itself into the desired path inside the buildroot.

Probably the most common way to do that would be by passing PREFIX and DESTDIR to make in the %install target, e.g.:

%install
rm -rf %{buildroot}
make -e install PREFIX=/home/user DESTDIR=%{buildroot}

If you want to do it without building a new RPM, you can install it using rpm --relocate, e.g.
rpm --relocate /=/home/user -ivh <foo.rpm>.

See the rpm man page for details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜