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.

170 lines
4.0 KiB

  1. #
  2. # Copyright (C) 2009-2015 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:=toxcore
  9. PKG_VERSION:=0.0.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/irungentoo/toxcore.git
  13. PKG_SOURCE_VERSION:=6d883f488ff59b2394982b62895d50b1d1d55bf4
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  20. PKG_LICENSE:=GPL
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/toxcore/Default
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. SUBMENU:=Networking
  26. TITLE:=Tox
  27. URL:=https://tox.im
  28. endef
  29. define Package/toxcore/description/Default
  30. Tox, a FOSS initiative, aims to be an easy to use, all-in-one
  31. communication platform that ensures their users full privacy and
  32. secure message delivery.
  33. endef
  34. define Package/libtoxcore
  35. $(call Package/toxcore/Default)
  36. DEPENDS:=+libsodium +librt +libpthread
  37. TITLE+= core library
  38. endef
  39. define Package/libtoxcore/description
  40. $(call Package/toxcore/description/Default)
  41. core library
  42. endef
  43. define Package/libtoxav
  44. $(call Package/toxcore/Default)
  45. DEPENDS:=+libtoxcore +libopus +libvpx
  46. TITLE+= A/V library
  47. endef
  48. define Package/libtoxav/description
  49. $(call Package/toxcore/description/Default)
  50. A/V library providing audio/video codec bindings
  51. endef
  52. define Package/libtoxdns
  53. $(call Package/toxcore/Default)
  54. DEPENDS:=+libtoxcore
  55. TITLE+= dns library
  56. endef
  57. define Package/libtoxdns/description
  58. $(call Package/toxcore/description/Default)
  59. DNS library
  60. endef
  61. define Package/libtoxencryptsave
  62. $(call Package/toxcore/Default)
  63. DEPENDS:=+libtoxcore
  64. TITLE+= encryptsave library
  65. endef
  66. define Package/libtoxencryptsave/description
  67. $(call Package/toxcore/description/Default)
  68. encryptsave library
  69. endef
  70. define Package/ntox
  71. SECTION:=net
  72. CATEGORY:=Network
  73. SUBMENU:=Instant Messaging
  74. DEPENDS:=+libtoxcore +libncurses
  75. TITLE:=ntox Tox command-line client
  76. endef
  77. define Package/ntox/description
  78. $(call Package/toxcore/description/Default)
  79. nTox is an ncurses-based command-line client for Tox.
  80. endef
  81. define Package/tox-bootstrapd
  82. SECTION:=net
  83. CATEGORY:=Network
  84. SUBMENU:=Instant Messaging
  85. DEPENDS:=+libtoxcore +libconfig
  86. TITLE:=Tox DHT bootstrap
  87. endef
  88. define Package/tox-dht-bootstrap/description
  89. $(call Package/toxcore/description/Default)
  90. This package provide the Tox DHT bootstrap service.
  91. endef
  92. CONFIGURE_ARGS+= \
  93. --enable-daemon \
  94. --enable-ntox \
  95. --enable-av \
  96. --disable-testing \
  97. --disable-tests
  98. define Package/libtoxav/install
  99. $(INSTALL_DIR) $(1)/usr/lib
  100. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtoxav.*so* $(1)/usr/lib
  101. endef
  102. define Package/libtoxcore/install
  103. $(INSTALL_DIR) $(1)/usr/lib
  104. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtoxcore.*so* $(1)/usr/lib
  105. endef
  106. define Package/libtoxdns/install
  107. $(INSTALL_DIR) $(1)/usr/lib
  108. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtoxdns.*so* $(1)/usr/lib
  109. endef
  110. define Package/libtoxencryptsave/install
  111. $(INSTALL_DIR) $(1)/usr/lib
  112. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtoxencryptsave.*so* $(1)/usr/lib
  113. endef
  114. define Package/tox-bootstrapd/install
  115. $(INSTALL_DIR) $(1)/usr/bin
  116. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tox-bootstrapd $(1)/usr/bin
  117. endef
  118. define Package/ntox/install
  119. $(INSTALL_DIR) $(1)/usr/bin
  120. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nTox $(1)/usr/bin
  121. endef
  122. define Build/InstallDev
  123. $(INSTALL_DIR) $(1)/usr/include/tox
  124. $(CP) $(PKG_INSTALL_DIR)/usr/include/tox/*.h $(1)/usr/include/tox
  125. $(INSTALL_DIR) $(1)/usr/lib
  126. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtox* $(1)/usr/lib/
  127. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  128. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtoxcore.pc $(1)/usr/lib/pkgconfig/
  129. endef
  130. $(eval $(call BuildPackage,libtoxav))
  131. $(eval $(call BuildPackage,libtoxcore))
  132. $(eval $(call BuildPackage,libtoxdns))
  133. $(eval $(call BuildPackage,libtoxencryptsave))
  134. $(eval $(call BuildPackage,ntox))
  135. $(eval $(call BuildPackage,tox-bootstrapd))