Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #
  2. # Copyright (C) 2006-2014 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:=opentracker
  9. PKG_VERSION:=20151211
  10. PKG_RELEASE:=2
  11. PKG_REV:=ba25d2b2a84a31eac2956b71cb12b4b0748b35f5
  12. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  13. PKG_LICENSE:=Beerware
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  15. PKG_SOURCE_URL:=git://erdgeist.org/opentracker
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_SOURCE_VERSION:=$(PKG_REV)
  18. PKG_SOURCE_PROTO:=git
  19. PKG_BUILD_DEPENDS:=libowfat
  20. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/opentracker/Default
  23. SUBMENU:=BitTorrent
  24. SECTION:=net
  25. CATEGORY:=Network
  26. TITLE:=opentracker
  27. URL:=http://erdgeist.org/arts/software/opentracker/
  28. DEPENDS:=+zlib +libpthread
  29. endef
  30. define Package/opentracker
  31. $(call Package/opentracker/Default)
  32. VARIANT:=ipv4
  33. endef
  34. define Package/opentracker6
  35. $(call Package/opentracker/Default)
  36. TITLE+= (IPv6 build)
  37. VARIANT:=ipv6
  38. endef
  39. define Package/opentracker-default/description
  40. opentracker - An open and free bittorrent tracker
  41. opentracker is an open and free bittorrent tracker project.
  42. It aims for minimal resource usage and is intended to run at your wlan router.
  43. Currently it is deployed as an open and free tracker instance.
  44. Read our free and open tracker blog and announce your torrents there
  45. (but do not hesitate to setup your own free trackers!).
  46. endef
  47. define Package/opentracker/description
  48. $(call Package/opentracker-default/description)
  49. This package contains the IPv4-build of opentracker.
  50. endef
  51. define Package/opentracker6/description
  52. $(call Package/opentracker-default/description)
  53. This package contains the IPv6-build of opentracker.
  54. endef
  55. MAKE_FLAGS += PREFIX="$(STAGING_DIR)/usr"
  56. ifeq ($(BUILD_VARIANT),ipv6)
  57. MAKE_FLAGS += FEATURES="-DWANT_V6"
  58. endif
  59. define Package/opentracker/conffiles
  60. /etc/opentracker.conf
  61. endef
  62. define Package/opentracker6/conffiles
  63. /etc/opentracker6.conf
  64. endef
  65. define Package/opentracker/install
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(INSTALL_BIN) $(PKG_BUILD_DIR)/opentracker $(1)/usr/bin
  68. $(INSTALL_DIR) $(1)/etc
  69. $(INSTALL_CONF) $(PKG_BUILD_DIR)/opentracker.conf.sample $(1)/etc/opentracker.conf
  70. $(INSTALL_DIR) $(1)/etc/init.d
  71. $(INSTALL_BIN) ./files/opentracker.init $(1)/etc/init.d/opentracker
  72. endef
  73. define Package/opentracker6/install
  74. $(INSTALL_DIR) $(1)/usr/bin
  75. $(INSTALL_BIN) $(PKG_BUILD_DIR)/opentracker $(1)/usr/bin/opentracker6
  76. $(INSTALL_DIR) $(1)/etc
  77. $(INSTALL_CONF) $(PKG_BUILD_DIR)/opentracker.conf.sample $(1)/etc/opentracker6.conf
  78. $(INSTALL_DIR) $(1)/etc/init.d
  79. $(INSTALL_BIN) ./files/opentracker6.init $(1)/etc/init.d/opentracker6
  80. endef
  81. $(eval $(call BuildPackage,opentracker))
  82. $(eval $(call BuildPackage,opentracker6))