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