三、其它
這裏的內容,有待實踐。
安裝的時候想修改默認路徑,則可以
$rpm -ivh --prefix=/opt/usr xxx.rpm
修改多個路徑
$rpm xxx.rpm --relocate=/usr=/opt/usr --relocate=/etc=/usr/etc
雜亂
可以通過命令rpm –showrc查看實現代碼。另外直接通過 rpm –eval "%{macro}"來查看具體對應路徑。
比如我們要查看%{_bindir}的路徑,就可以使用命令rpm –eval "%{ _bindir}"來查看。
另外,所有的宏都可以在/usr/lib/rpm/macros裏找到。
參考資料:
- http://bbs.chinaunix.net/thread-449396-1-1.html
- http://fedoraproject.org/wiki/Packaging/RPMMacros#RPM_directory_macros
- http://www-900.ibm.com/developerWorks/cn/linux/management/package/rpm/part1/index.shtml
- http://www-900.ibm.com/developerWorks/cn/linux/management/package/rpm/part2/index.shtml
- http://www-900.ibm.com/developerWorks/cn/linux/management/package/rpm/part3/index.shtml
- http://www.rpm.org/RPM-HOWTO/build.html#SCRIPTS
- http://www.linuxfans.org/nuke/modules.php?name=Forums&file=printview&t=86980&start=0
- http://oa.jmu.edu.cn/netoa/libq/pubdisc.nsf/66175841be38919248256e35005f4497/ba6fbec275186d5d4825709100163428?OpenDocument
終於寫完,好多!_。
本想將其中涉及內容製做成附件,可是這樣又無法在所有文檔中下載,所以直接將涉及的文件內容都集成到文檔中了,如果照着做的話,所需要的文件都有。
下載的話,路徑爲: rpm_test.tar.gz
另外,如果鏈接還好使的話,我在sourceforge上面上傳了這個完整的例子,可以參考。
網址爲:https://sourceforge.net/projects/quietheart/files/temp/test/ 其中的rpm_test.tar.gz