1. 下载源码:
# apt-get source dwm
得到一个文件夹和三个文件:
dwm-4.3/
dwm_4.3-1.diff.gz
dwm_4.3-1.dsc
dwm_4.3.orig.tar.gz
2. 进入目录dwm-4.3,查一下依赖包:
# egrep '^Build-Depends:' debian/control
Build-Depends: debhelper (>= 5.0.49), dpatch, libx11-dev, sharutils
debhelper已经装了,安装其依赖包:
# apt-get install dpatch libx11-dev sharutils
3. 清除上次编译:
# debian/rules clean
4. 根据需要对源码作改动。
5. 退出源码目录,把改动记录在diff.gz、dsc、orig.tar.gz 三个文件中:
# dpkg-source -b dwm-4.3
dpkg-source: building dwm using existing dwm_4.3.orig.tar.gz
dpkg-source: building dwm in dwm_4.3-1.diff.gz
dpkg-source: building dwm in dwm_4.3-1.dsc
6. 再进入目录dwm-4.3:
# debian/rules build
7. 配置并编译:
# CFLAGS="xxxxxx" ./configure --xxxxxx (dwm省略这一步)
# make
8. 作出二进制包:
# debian/rules binary
9.退出当前目录,发现deb包已经产生:
dwm_4.3-1_i386.deb
10. 安装:
# dpkg -i dwm_4.3-1_i386.deb
阅读(1601) | 评论(0) | 转发(0) |