aria2的源码来自于
http://sourceforge.net/projects/aria2/files/stable/
我们这里以aria2-1.17.1版本为例下载的源码格式为aria2-1.17.1.tar.bz2
1
2
|
sudo apt-
get
update
sudo apt-
get
install autoconf automake libcppunit-dev autopoint openssl libtool sphinx-common sphinxsearch libgcrypt11-dev libxml2-dev pkg-config
|
1
|
md5sum /……/……/trunk/dl/aria2-
1.17
.
1
.tar.bz2 省略好代表openwrt的源码的路径补全,回车就能获取md5码,记住用用的
|
在/feeds/packages/net/aria2/路径下创建aria2c源码的makefile文件内容如下 (make文件及其他本文需要文件见文章最下方)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#
# Copyright (C)
2012
OpenWrt.org
#
# This
is
free software, licensed under the GNU General Public License v2.
# See /LICENSE
for
more information.
#
include
$(TOPDIR)/rules.mk
PKG_NAME:=aria2 名字
PKG_VERSION:=
1.17
.
1
PKG_RELEASE:=
1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=
PKG_MD5SUM:=86229ef8d289893934cb3af25c8fddf6
PKG_INSTALL:=
1
include
$(INCLUDE_DIR)/
package
.mk
define Package/aria2
SECTION:=net
CATEGORY:=Network
SUBMENU:=File Transfer
TITLE:=lightweight download utility
URL:=http:
//aria2.sourceforge.net/
DEPENDS:=+libopenssl +zlib +libxml2 +libstdcpp \
$(INTL_DEPENDS) $(ICONV_DEPENDS)
endef
define Package/aria2/description
aria2
is
a lightweight multi-protocol & multi-source command-line download
utility
endef
define Package/aria2/conffiles
/etc/config/aria2
endef
CONFIGURE_ARGS += \
--disable-nls \
--without-gnutls \
--without-libnettle \
--without-libgmp \
--without-libgcrypt \
--without-libexpat \
--without-libcares \
--without-sqlite3 \
--
with
-openssl \
--
with
-libxml2 \
--
with
-libz
CONFIGURE_VARS += \
ZLIB_CFLAGS=
"-I$(STAGING_DIR)/usr/include"
\
ZLIB_LIBS=
"-L$(STAGING_DIR)/usr/lib"
define Package/aria2/install
$(INSTALL_DIR) $(
1
)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aria2c $(
1
)/usr/bin
endef
$(eval $(call BuildPackage,aria2))
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
Source-Makefile: feeds/packages/net/aria2/Makefile
Package: aria2
Submenu: File Transfer
Version:
1.17
.
1
-
1
Depends: +libc +USE_EGLIBC:librt +USE_EGLIBC:libpthread +libopenssl +zlib +libxml2 +libstdcpp
Menu-Depends:
Provides:
Section: net
Category: Network
Title: lightweight download utility
Maintainer: OpenWrt Developers Team
Source: aria2-
1.17
.
1
.tar.bz2
Type: ipkg
Description: aria2
is
a lightweight multi-protocol & multi-source command-line download
utility
http:
//aria2.sourceforge.net/
OpenWrt Developers Team
@@
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
Package: luci-app-aria2
Submenu:
3
. Applications
Version:
0.11
+svk-
1
Depends: +libc +USE_EGLIBC:librt +USE_EGLIBC:libpthread +PACKAGE_luci-app-aria2:aria2
Menu-Depends:
Provides:
Build-Depends: lua/host
Section: luci
Category: LuCI
Title: aria2 configuration module
Maintainer: LuCI Development Team
Source:
Type: ipkg
Description: aria2 configuration module http:
//luci.subsignal.org/ LuCI Development Team
@@
|
1
2
|
./scripts/feeds install -a
make menuconfig
|
make menuconfig
就可以在luci>3. Applications 找到 luci-app-aria2了