最近下载用的比较多的2个工具,一个是axel,另一个就是wget. wget不用说,功能强大的一塌糊涂。axel支持多线程,所以用的时候也不少。
前一阵通过axel下载ubuntu8.10时发现一个问题(准确的说是ubuntu8.10发布当天): axel v1.x对大文件支持不好,时常发生 pthread error。。。下载终止,
详见https://bugs.launchpad.net/ubuntu/+source/axel/+bug/253907
google之后才发现 axel 2.0 lfs版本开始才支持 大文件 large files (LFS),作者可够懒的,2.0才对大文件下载提供支持 。
我决定比他勤快点,google 之后发现网上并无axel 2.2的deb包,于是开始了我的这篇axel打包deb过程全记录。算是学习deb打包吧。
1, sudo apt-get install build-essential fakeroot dh-make //安装必要软件
2、运行dh_make命令
dh_make -e [email protected] -f ../axel-2.2.tar.bz2
细节如下,首先解压axel-2.2.tar.bz2 ,将解压后目录axel-2.2和axel-2.2.tar.bz2拷贝至同一目录project下并进入axel-2.2目录
daniel@daniel-desktop:~/project$ ls
axel-2.2 axel-2.2.tar.bz2
daniel@daniel-desktop:~/project$ cd axel-2.2/
daniel@daniel-desktop:~/project/axel-2.2$ dh_make -e [email protected] -f ../axel-2.2.tar.bz2
Type of package: single binary, multiple binary, library, kernel module or cdbs?
[s/m/l/k/b]
当然选择s
细节如下:Maintainer name : daniel
Email-Address : [email protected]
Date : Sat, 08 Nov 2008 22:16:57 +0800
Package Name : axel
Version : 2.2
License : blank
Using dpatch : no
Type of Package : Single
Hit <enter> to confirm:
3,按照提示编写control,changelog,copyright 文件
Done. Please edit the files in the debian/ subdirectory
gedit debian/control
daniel@daniel-desktop:~/project/axel-2.2$ gedit debian/changelog
daniel@daniel-desktop:~/project/axel-2.2$ gedit debian/copyright
4,开始编译
./configure; make; make install
dpkg-buildpackage -rfakeroot
使用dpkg-buildpackage 打包一直失败,提示路径错误之类,放弃 :(
5,后来使用checkinstall 打包,成功。。
checkinstall 结果。。。。
=============================== 安装成功 =================================
Copying documentation directory...
./
./README
./CHANGES
./COPYING
./CREDITS
grep: /var/tmp/tmp.CrczjD7575/newfile: 没有该文件或目录
把文件拷贝到临时目录……OK
Stripping ELF binaries and libraries...OK
压缩 man 手册页……OK
创建文件列表……OK
创建 Debian 包……OK
安装 Debian 包……OK
删除临时文件……OK
生成备份包……OK
删除临时目录……OK
**********************************************************************
Done. The new package has been installed and saved to
/home/daniel/project/axel-2.2/axel_2.2-1_i386.deb
You can remove it from your system anytime using:
dpkg -r axel
下载地址:https://blog.wanjie.info/wp-content/uploads/2008/11/axel_22-1_i386.deb
测试记录 :
axel -n 2 https://blog.wanjie.info/wp-content/uploads/2008/11/axel_22-1_i386.deb
Initializing download: https://blog.wanjie.info/wp-content/uploads/2008/11/axel_22-1_i386.deb
File size: 36606 bytes
Opening output file axel_22-1_i386.deb
Starting download
[ 0%] .......... .......... .......... .....
Connection 0 finished
Downloaded 35.7 kilobytes in 0 seconds. (355.40 KB/s)
2008.11.21更新纪录
bug01 :axel: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not found (required by axel)
Obiously there is a query for glibc 2.4, but in debian etch and sid only 2.3.6 is available.
老版本的debian 或ubuntu库的问题。
参考文献 Howto make debian standard debs from scratch
1 |
<a title="debian maint-guide" href="http://www.debian.org/doc/manuals/maint-guide/maint-guide.zh_CN.txt" target="_blank">Debian新维护人员手册</a> |
文章评论