LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1079|回复: 2

[pkgbuild]aria2-more-split

[复制链接]
发表于 2007-8-15 18:24:54 | 显示全部楼层 |阅读模式
http://aur.archlinux.org/packages.php?do_Details&ID=12542
安装后,就可以 aria2c -s 12 http://url 等了

PKGBUILD

  1. # Contributor: nixzpkg <nixzpkg at yahoo dot com>

  2. pkgname=aria2-more-split
  3. pkgver=0.11.2
  4. pkgrel=2
  5. pkgdesc="aria2 is a download utility with resuming and segmented downloading.
  6. Supports HTTP/HTTPS/FTP/BitTorrent/Metalink."
  7. arch=(i686 x86_64)
  8. url="http://aria2.sourceforge.net/"
  9. license="gpl"
  10. depends=('gnutls' 'gcc' 'libxml2>=2.6.29')
  11. makedepends=('c-ares')
  12. conflicts=('aria2')
  13. provides=('aria2')
  14. source=(http://downloads.sourceforge.net/sourceforge/aria2/aria2-$pkgver.tar.bz2
  15. \
  16.     patch-aria2.diff)
  17. md5sums=('4b58849f0bf7f2abab1675ce2e8958ec' \
  18.    '3cc5d86217472244df4379f4c43fb51f')

  19. build() {
  20.   cd $startdir/src/aria2-$pkgver
  21.   patch -p1 -i $startdir/patch-aria2.diff || return 1
  22.   ./configure --prefix=/usr
  23.   make || return 1
  24.   make DESTDIR=$startdir/pkg install
  25. }
复制代码

patch-aria2.diff

  1. --- a/src/main.cc-ori        2007-08-14 23:11:51.000000000 +0000
  2. +++ b/src/main.cc        2007-08-14 23:15:50.000000000 +0000
  3. @@ -134,7 +134,7 @@
  4.    cout << _(" -D, --daemon                 Run as daemon.") << endl;
  5. #endif // HAVE_DAEMON
  6.    cout << _(" -s, --split=N                Download a file using N connections. N must be\n"
  7. -            "                              between 1 and 5. This option affects all URLs.\n"
  8. +            "                              between 1 and 100. This option affects all URLs.\n"
  9.             "                              Thus, aria2 connects to each URL with\n"
  10.             "                              N connections.\n"
  11.             "                              Default: 1") << endl;
  12. --- a/src/OptionHandlerFactory.cc-ori        2007-08-14 23:17:46.000000000 +0000
  13. +++ b/src/OptionHandlerFactory.cc        2007-08-14 23:19:13.000000000 +0000
  14. @@ -77,7 +77,7 @@
  15.    handlers.push_back(new DefaultOptionHandler(PREF_DIR));
  16.    handlers.push_back(new DefaultOptionHandler(PREF_OUT));
  17.    handlers.push_back(new LogOptionHandler(PREF_LOG));
  18. -  handlers.push_back(new NumberOptionHandler(PREF_SPLIT, 1, 5));
  19. +  handlers.push_back(new NumberOptionHandler(PREF_SPLIT, 1, 100));
  20.    handlers.push_back(new NumberOptionHandler(PREF_TIMEOUT, 1, 600));
  21.    handlers.push_back(new NumberOptionHandler(PREF_MAX_TRIES, 0));
  22.    handlers.push_back(new BooleanOptionHandler(PREF_FTP_PASV));
  23. --- a/doc/aria2c.1-ori        2007-08-14 23:19:39.000000000 +0000
  24. +++ b/doc/aria2c.1        2007-08-14 23:20:17.000000000 +0000
  25. @@ -59,7 +59,7 @@
  26. must be between
  27. \fI1\fR
  28. and
  29. -\fI5\fR. This option affects all URLs. Thus, aria2 connects to each URL with
  30. +\fI100\fR. This option affects all URLs. Thus, aria2 connects to each URL with
  31. \fIN\fR
  32. connections. Default:
  33. \fI1\fR
复制代码
发表于 2007-8-15 19:07:59 | 显示全部楼层
你写的阿。。标题前面加个[pkgbuild]

这个是多线程下载的东西吧。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-15 20:04:49 | 显示全部楼层
呵呵,比较全能的下载工具,原来是限定最多分成5块同时下载,虽然多数情况下都够用了,改多了后,在想用时有得用

转过来,希望对用的着能参看一下
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表