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.

104 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2012-2018 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.35.0
  10. PKG_RELEASE:=4
  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:=1e2b7fd08d6af228856e51c07173cfcf987528f1ac97e04c5af4a47642617dfd
  14. PKG_INSTALL:=1
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>, \
  17. Hsing-Wang Liao <kuoruan@gmail.com>
  18. PKG_LICENSE:=GPLv2
  19. PKG_LICENSE_FILES:=COPYING
  20. PKG_CPE_ID:=cpe:/a:tatsuhiro_tsujikawa:aria2
  21. PKG_CONFIG_DEPENDS := \
  22. CONFIG_ARIA2_NOSSL \
  23. CONFIG_ARIA2_OPENSSL \
  24. CONFIG_ARIA2_GNUTLS \
  25. CONFIG_ARIA2_NOCRYPTO \
  26. CONFIG_ARIA2_NETTLE \
  27. CONFIG_ARIA2_LIBGCRYPT \
  28. CONFIG_ARIA2_LIBXML2 \
  29. CONFIG_ARIA2_EXPAT \
  30. CONFIG_ARIA2_GMP \
  31. CONFIG_ARIA2_BITTORRENT \
  32. CONFIG_ARIA2_METALINK \
  33. CONFIG_ARIA2_SFTP \
  34. CONFIG_ARIA2_ASYNC_DNS \
  35. CONFIG_ARIA2_COOKIE \
  36. CONFIG_ARIA2_WEBSOCKET
  37. include $(INCLUDE_DIR)/package.mk
  38. include $(INCLUDE_DIR)/nls.mk
  39. define Package/aria2/config
  40. source "$(SOURCE)/Config.in"
  41. endef
  42. define Package/aria2
  43. SECTION:=net
  44. CATEGORY:=Network
  45. SUBMENU:=File Transfer
  46. TITLE:=lightweight download utility
  47. URL:=https://aria2.github.io/
  48. DEPENDS:=+zlib +libstdcpp +ARIA2_OPENSSL:libopenssl +ARIA2_GNUTLS:libgnutls \
  49. +ARIA2_NETTLE:libnettle +ARIA2_LIBGCRYPT:libgcrypt +ARIA2_GMP:libgmp \
  50. +ARIA2_LIBXML2:libxml2 +ARIA2_EXPAT:libexpat +ARIA2_SFTP:libssh2 \
  51. +ARIA2_ASYNC_DNS:libcares +ARIA2_COOKIE:libsqlite3
  52. USERID:=aria2=6800:aria2=6800
  53. endef
  54. define Package/aria2/description
  55. aria2 is a lightweight multi-protocol & multi-source command-line download
  56. utility
  57. endef
  58. CONFIGURE_ARGS += \
  59. --disable-nls \
  60. $(if $(CONFIG_ARIA2_NOSSL),--disable,--enable)-ssl \
  61. $(if $(CONFIG_ARIA2_BITTORRENT),--enable,--disable)-bittorrent \
  62. $(if $(CONFIG_ARIA2_METALINK),--enable,--disable)-metalink \
  63. $(if $(CONFIG_ARIA2_WEBSOCKET),--enable,--disable)-websocket \
  64. $(if $(CONFIG_ARIA2_OPENSSL),--with,--without)-openssl \
  65. $(if $(CONFIG_ARIA2_GNUTLS),--with,--without)-gnutls \
  66. $(if $(CONFIG_ARIA2_NETTLE),--with,--without)-libnettle \
  67. $(if $(CONFIG_ARIA2_LIBGCRYPT),--with,--without)-libgcrypt \
  68. $(if $(CONFIG_ARIA2_GMP),--with,--without)-libgmp \
  69. $(if $(CONFIG_ARIA2_LIBXML2),--with,--without)-libxml2 \
  70. $(if $(CONFIG_ARIA2_EXPAT),--with,--without)-libexpat \
  71. $(if $(CONFIG_ARIA2_SFTP),--with,--without)-libssh2 \
  72. $(if $(CONFIG_ARIA2_ASYNC_DNS),--with,--without)-libcares \
  73. $(if $(CONFIG_ARIA2_COOKIE),--with,--without)-sqlite3 \
  74. --without-libuv \
  75. --with-libz
  76. TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
  77. TARGET_LDFLAGS += -Wl,--gc-sections -flto
  78. define Package/aria2/conffiles
  79. /etc/config/aria2
  80. endef
  81. define Package/aria2/install
  82. $(INSTALL_DIR) $(1)/usr/bin
  83. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aria2c $(1)/usr/bin
  84. $(INSTALL_DIR) $(1)/etc/init.d
  85. $(INSTALL_BIN) ./files/aria2.init $(1)/etc/init.d/aria2
  86. $(INSTALL_DIR) $(1)/etc/config
  87. $(INSTALL_CONF) ./files/aria2.conf $(1)/etc/config/aria2
  88. endef
  89. $(eval $(call BuildPackage,aria2))