opentracker: add IPv6 build variant
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
e61b36871d
commit
46d8fac925
|
@ -19,10 +19,11 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_BUILD_DEPENDS:=libowfat
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/opentracker
|
||||
define Package/opentracker/Default
|
||||
SUBMENU:=BitTorrent
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
|
@ -31,7 +32,19 @@ define Package/opentracker
|
|||
DEPENDS:=+zlib +libpthread
|
||||
endef
|
||||
|
||||
define Package/opentracker/description
|
||||
define Package/opentracker
|
||||
$(call Package/opentracker/Default)
|
||||
VARIANT:=ipv4
|
||||
endef
|
||||
|
||||
define Package/opentracker6
|
||||
$(call Package/opentracker/Default)
|
||||
TITLE+= (IPv6 build)
|
||||
VARIANT:=ipv6
|
||||
endef
|
||||
|
||||
|
||||
define Package/opentracker-default/description
|
||||
opentracker - An open and free bittorrent tracker
|
||||
|
||||
opentracker is an open and free bittorrent tracker project.
|
||||
|
@ -41,8 +54,27 @@ define Package/opentracker/description
|
|||
(but do not hesitate to setup your own free trackers!).
|
||||
endef
|
||||
|
||||
define Package/opentracker/description
|
||||
$(call Package/opentracker-default/description)
|
||||
|
||||
This package contains the IPv4-build of opentracker.
|
||||
|
||||
endef
|
||||
|
||||
define Package/opentracker6/description
|
||||
$(call Package/opentracker-default/description)
|
||||
|
||||
This package contains the IPv6-build of opentracker.
|
||||
|
||||
endef
|
||||
|
||||
|
||||
MAKE_FLAGS += PREFIX="$(STAGING_DIR)/usr"
|
||||
|
||||
ifeq ($(BUILD_VARIANT),ipv6)
|
||||
MAKE_FLAGS += FEATURES="-DWANT_V6"
|
||||
endif
|
||||
|
||||
define Package/opentracker/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/opentracker $(1)/usr/bin
|
||||
|
@ -52,4 +84,14 @@ define Package/opentracker/install
|
|||
$(INSTALL_BIN) ./files/opentracker.init $(1)/etc/init.d/opentracker
|
||||
endef
|
||||
|
||||
define Package/opentracker6/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/opentracker $(1)/usr/bin/opentracker6
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/opentracker.conf.sample $(1)/etc/opentracker6.conf
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/opentracker6.init $(1)/etc/init.d/opentracker6
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,opentracker))
|
||||
$(eval $(call BuildPackage,opentracker6))
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=10
|
||||
STOP=15
|
||||
|
||||
NAME="opentracker6"
|
||||
PROG="/usr/bin/opentracker6"
|
||||
OPTIONS="-f /etc/opentracker6.conf"
|
||||
USE_PROCD=1
|
||||
|
||||
start_service()
|
||||
{
|
||||
procd_open_instance
|
||||
procd_set_param command $PROG $OPTIONS
|
||||
procd_close_instance
|
||||
}
|
Loading…
Reference in New Issue