pkgbuild tips - 1
来源:互联网 发布:北京太极计算机做java 编辑:程序博客网 时间:2024/05/22 17:41
I have been thinking for some time that I should publish some tips for building packages using pkgbuild.If you have created more then one spec file using pkgbuild, then youwill know that many things are repeatable. The general process goeslike time -
At this point add an entry for the patch xfwm4-01-fixbadcode.diff into the spec file and try again.
If you need to add another patch, just remove the patched directory, and un-tar again.
Maybe you want to merge a fix into an existing patch. Just patch the directory in /tmp and then make the changes.
Using a shell like bash with command line editing, the process can be quite quick and easy.
Have Fun!!!
Note: this article is originally posted at
http://solaristhings.blogspot.com/2007/04/pkgbuild-tips-1.html
refer there for latest update
- Create an initial spec file from either a template or a spec file for a similar application.
- Try a build.
- You should expect that the above should fail. Check the log file (/tmp/
.log) for where it failed. Fix the problem. Generally a typo or the build needs a patch - Repeat 2-3 until the prep and build works. If it actually installs the packages, then go to 7
- Look in the RPM_BUILD_ROOT directory tree in /var/tmp
for what was installed, and adjust the %files section of the spec file to match the installation. - Go back and repeat from 2 (Note: you can short-cut this with pkgbuild)
- Publish the spec file(s), patches, ChangeLog etc and your done.
jdsbuild@prae> cd /tmp
jdsbuild@prae> gtar fxj ~/packages/SOURCES/xfwm4-4.4.1.tar.bz2
jdsbuild@prae> mv xfwm4-4.4.1 xfwm4-4.4.1-orig
jdsbuild@prae> gtar fxj ~/packages/SOURCES/xfwm4-4.4.1.tar.bz2
#
# Fix the files which need to be patched.
#
jdsbuild@prae> diff -ur xfwm4-4.4.1-orig xfwm4-4.4.1 > ~/spec-files-xfce/patches/xfwm4-01-fixbadcode.diff
At this point add an entry for the patch xfwm4-01-fixbadcode.diff into the spec file and try again.
If you need to add another patch, just remove the patched directory, and un-tar again.
Maybe you want to merge a fix into an existing patch. Just patch the directory in /tmp and then make the changes.
jdsbuild@prae> cd /tmp
jdsbuild@prae> gtar fxj ~/packages/SOURCES/xfwm4-4.4.1.tar.bz2
jdsbuild@prae> mv xfwm4-4.4.1 xfwm4-4.4.1-orig
jdsbuild@prae> gtar fxj ~/packages/SOURCES/xfwm4-4.4.1.tar.bz2
jdsbuild@prae> cd xfwm4-4.4.1
jdsbuild@prae> gpatch -p1 < ~/spec-files-xfce/patches/xfwm4-01-fixbadcode.diff jdsbuild@prae> cd /tmp
#
# Fix the files which need to be patched.
#
jdsbuild@prae> diff -ur xfwm4-4.4.1-orig xfwm4-4.4.1 > ~/spec-files-xfce/patches/xfwm4-01-fixbadcode.diff
Using a shell like bash with command line editing, the process can be quite quick and easy.
Have Fun!!!
Note: this article is originally posted at
http://solaristhings.blogspot.com/2007/04/pkgbuild-tips-1.html
refer there for latest update
- pkgbuild tips - 1
- 迅雷 Deb包,PKGBUILD下载[更新到0.6.1
- archlinux 更新 chrome 但是 PKGBUILD source 被墙
- C++ tips 1
- Perl Tips(1)
- My Linux Tips (1)
- Java语言tips 1
- MFC tips 1
- Python Tips (1)
- Java tips 1
- Tips for Cassandra - 1
- Android tips #1
- Daily tips(1)
- T-SQL Tips 1
- Javascript Tips - (1)
- TIPS week 1
- Hibernate Tips & Tricks 1
- python tips(1)
- 各种数据库分页+SQL Server比较
- C++中使用boost::serialization库――应用篇收藏
- 数据库分页
- Scheme的Lambda与Ruby的Block
- How small can you make Open Solaris - Part 1
- pkgbuild tips - 1
- Installing xVM on OpenSolaris
- JAVA对SQL SERVER 2000的备份和恢复-从C/S到B/S(2)
- JAVA对SQL SERVER 2000的备份和恢复-从C/S到B/S(3)
- JAVA对SQL SERVER 2000的备份和恢复-从C/S到B/S(4)
- [龙哥答疑]如何修复Linux损坏的文件系统?
- LINUX恢复root密码
- PHP开发Web服务
- 使用LINQ来简化编程的7个技巧