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.

103 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:=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:=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. define Package/aria2/config
  39. source "$(SOURCE)/Config.in"
  40. endef
  41. define Package/aria2
  42. SECTION:=net
  43. CATEGORY:=Network
  44. SUBMENU:=File Transfer
  45. TITLE:=lightweight download utility
  46. URL:=https://aria2.github.io/
  47. DEPENDS:=+zlib +libstdcpp +ARIA2_OPENSSL:libopenssl +ARIA2_GNUTLS:libgnutls \
  48. +ARIA2_NETTLE:libnettle +ARIA2_LIBGCRYPT:libgcrypt +ARIA2_GMP:libgmp \
  49. +ARIA2_LIBXML2:libxml2 +ARIA2_EXPAT:libexpat +ARIA2_SFTP:libssh2 \
  50. +ARIA2_ASYNC_DNS:libcares +ARIA2_COOKIE:libsqlite3
  51. USERID:=aria2=6800:aria2=6800
  52. endef
  53. define Package/aria2/description
  54. aria2 is a lightweight multi-protocol & multi-source command-line download
  55. utility
  56. endef
  57. CONFIGURE_ARGS += \
  58. --disable-nls \
  59. $(if $(CONFIG_ARIA2_NOSSL),--disable,--enable)-ssl \
  60. $(if $(CONFIG_ARIA2_BITTORRENT),--enable,--disable)-bittorrent \
  61. $(if $(CONFIG_ARIA2_METALINK),--enable,--disable)-metalink \
  62. $(if $(CONFIG_ARIA2_WEBSOCKET),--enable,--disable)-websocket \
  63. $(if $(CONFIG_ARIA2_OPENSSL),--with,--without)-openssl \
  64. $(if $(CONFIG_ARIA2_GNUTLS),--with,--without)-gnutls \
  65. $(if $(CONFIG_ARIA2_NETTLE),--with,--without)-libnettle \
  66. $(if $(CONFIG_ARIA2_LIBGCRYPT),--with,--without)-libgcrypt \
  67. $(if $(CONFIG_ARIA2_GMP),--with,--without)-libgmp \
  68. $(if $(CONFIG_ARIA2_LIBXML2),--with,--without)-libxml2 \
  69. $(if $(CONFIG_ARIA2_EXPAT),--with,--without)-libexpat \
  70. $(if $(CONFIG_ARIA2_SFTP),--with,--without)-libssh2 \
  71. $(if $(CONFIG_ARIA2_ASYNC_DNS),--with,--without)-libcares \
  72. $(if $(CONFIG_ARIA2_COOKIE),--with,--without)-sqlite3 \
  73. --without-libuv \
  74. --with-libz
  75. TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
  76. TARGET_LDFLAGS += -Wl,--gc-sections -flto
  77. define Package/aria2/conffiles
  78. /etc/config/aria2
  79. endef
  80. define Package/aria2/install
  81. $(INSTALL_DIR) $(1)/usr/bin
  82. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aria2c $(1)/usr/bin
  83. $(INSTALL_DIR) $(1)/etc/init.d
  84. $(INSTALL_BIN) ./files/aria2.init $(1)/etc/init.d/aria2
  85. $(INSTALL_DIR) $(1)/etc/config
  86. $(INSTALL_CONF) ./files/aria2.conf $(1)/etc/config/aria2
  87. endef
  88. $(eval $(call BuildPackage,aria2))