You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
2.8 KiB

  1. #
  2. # Copyright (C) 2012-2017 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=aria2
  9. PKG_VERSION:=1.32.0
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_VERSION)/
  13. PKG_HASH:=546e9194a9135d665fce572cb93c88f30fb5601d113bfa19951107ced682dc50
  14. PKG_INSTALL:=1
  15. PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>, \
  16. Hsing-Wang Liao <kuoruan@gmail.com>
  17. PKG_LICENSE:=GPLv2
  18. PKG_LICENSE_FILES:=COPYING
  19. PKG_CONFIG_DEPENDS := \
  20. CONFIG_ARIA2_NOSSL \
  21. CONFIG_ARIA2_OPENSSL \
  22. CONFIG_ARIA2_GNUTLS \
  23. CONFIG_ARIA2_NOCRYPTO \
  24. CONFIG_ARIA2_NETTLE \
  25. CONFIG_ARIA2_LIBGCRYPT \
  26. CONFIG_ARIA2_LIBXML2 \
  27. CONFIG_ARIA2_EXPAT \
  28. CONFIG_ARIA2_GMP \
  29. CONFIG_ARIA2_BITTORRENT \
  30. CONFIG_ARIA2_METALINK \
  31. CONFIG_ARIA2_SFTP \
  32. CONFIG_ARIA2_ASYNC_DNS \
  33. CONFIG_ARIA2_COOKIE \
  34. CONFIG_ARIA2_WEBSOCKET
  35. include $(INCLUDE_DIR)/package.mk
  36. define Package/aria2/config
  37. source "$(SOURCE)/Config.in"
  38. endef
  39. define Package/aria2
  40. SECTION:=net
  41. CATEGORY:=Network
  42. SUBMENU:=File Transfer
  43. TITLE:=lightweight download utility
  44. URL:=https://aria2.github.io/
  45. DEPENDS:=+zlib +libstdcpp +ARIA2_OPENSSL:libopenssl +ARIA2_GNUTLS:libgnutls \
  46. +ARIA2_NETTLE:libnettle +ARIA2_LIBGCRYPT:libgcrypt +ARIA2_GMP:libgmp \
  47. +ARIA2_LIBXML2:libxml2 +ARIA2_EXPAT:libexpat +ARIA2_SFTP:libssh2 \
  48. +ARIA2_ASYNC_DNS:libcares +ARIA2_COOKIE:libsqlite3
  49. USERID:=aria2=6800:aria2=6800
  50. endef
  51. define Package/aria2/description
  52. aria2 is a lightweight multi-protocol & multi-source command-line download
  53. utility
  54. endef
  55. CONFIGURE_ARGS += \
  56. --disable-nls \
  57. $(if $(CONFIG_ARIA2_NOSSL),--disable,--enable)-ssl \
  58. $(if $(CONFIG_ARIA2_BITTORRENT),--enable,--disable)-bittorrent \
  59. $(if $(CONFIG_ARIA2_METALINK),--enable,--disable)-metalink \
  60. $(if $(CONFIG_ARIA2_WEBSOCKET),--enable,--disable)-websocket \
  61. $(if $(CONFIG_ARIA2_OPENSSL),--with,--without)-openssl \
  62. $(if $(CONFIG_ARIA2_GNUTLS),--with,--without)-gnutls \
  63. $(if $(CONFIG_ARIA2_NETTLE),--with,--without)-libnettle \
  64. $(if $(CONFIG_ARIA2_LIBGCRYPT),--with,--without)-libgcrypt \
  65. $(if $(CONFIG_ARIA2_GMP),--with,--without)-libgmp \
  66. $(if $(CONFIG_ARIA2_LIBXML2),--with,--without)-libxml2 \
  67. $(if $(CONFIG_ARIA2_EXPAT),--with,--without)-libexpat \
  68. $(if $(CONFIG_ARIA2_SFTP),--with,--without)-libssh2 \
  69. $(if $(CONFIG_ARIA2_ASYNC_DNS),--with,--without)-libcares \
  70. $(if $(CONFIG_ARIA2_COOKIE),--with,--without)-sqlite3 \
  71. --without-libuv \
  72. --with-libz
  73. define Package/aria2/install
  74. $(INSTALL_DIR) $(1)/usr/bin
  75. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aria2c $(1)/usr/bin
  76. $(INSTALL_DIR) $(1)/etc/init.d
  77. $(INSTALL_BIN) ./files/aria2.init $(1)/etc/init.d/aria2
  78. $(INSTALL_DIR) $(1)/etc/config
  79. $(INSTALL_CONF) ./files/aria2.conf $(1)/etc/config/aria2
  80. endef
  81. $(eval $(call BuildPackage,aria2))