Re: [OpenWrt-Devel] [PATCH] [packages] add opentracker package
Just a little typo in the description, see below. Daniel schrieb: support for opentracker was suggested in ticket #7023 it's much tighter than cbtt and got only 20% of cbtt's binary size Signed-off-by: Daniel Golle dan...@makrotopia.org --- net/opentracker/Makefile | 51 ++ net/opentracker/files/opentracker.init | 20 net/opentracker/patches/100-makefile.patch | 32 +++ 3 files changed, 103 insertions(+) create mode 100644 net/opentracker/Makefile create mode 100755 net/opentracker/files/opentracker.init create mode 100644 net/opentracker/patches/100-makefile.patch diff --git a/net/opentracker/Makefile b/net/opentracker/Makefile new file mode 100644 index 000..7c01105 --- /dev/null +++ b/net/opentracker/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2006-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=opentracker +PKG_VERSION:=20130804 +PKG_RELEASE:=1 +PKG_REV:=954f5029dfa17734dc408336ef710c192268e8a4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=git://erdgeist.org/opentracker +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_PROTO:=git +PKG_BUILD_DEPENDS:=libowfat + +include $(INCLUDE_DIR)/package.mk + +define Package/opentracker + SUBMENU:=BitTorrent + SECTION:=net + CATEGORY:=Network + TITLE:=opentracker + URL:=http://erdgeist.org/arts/software/opentracker/ + DEPENDS:=+zlib +libpthread +endef + +define Package/opentracker/description + opentracker - An open and free bittorrent tracker + + opentracker is a open and free bittorrent tracker project. ... is an open ... + It aims for minimal resource usage and is intended to run at your wlan router. Currently it is deployed as an open and free tracker instance. Read our free and open tracker blog and announce your torrents there (but do not hesitate to setup your own free trackers!). +endef + +MAKE_FLAGS += PREFIX=$(STAGING_DIR)/usr + +define Package/opentracker/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/opentracker $(1)/usr/bin + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/opentracker.conf.sample $(1)/etc/opentracker.conf + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/opentracker.init $(1)/etc/init.d/opentracker +endef + +$(eval $(call BuildPackage,opentracker)) diff --git a/net/opentracker/files/opentracker.init b/net/opentracker/files/opentracker.init new file mode 100755 index 000..c899548 --- /dev/null +++ b/net/opentracker/files/opentracker.init @@ -0,0 +1,20 @@ +#!/bin/sh /etc/rc.common + +START=10 +STOP=15 + +NAME=opentracker +PROG=/usr/bin/opentracker +OPTIONS=-f /etc/opentracker.conf +USE_PROCD=1 + +start_service() +{ + procd_open_instance + procd_set_param command $PROG $OPTIONS + procd_close_instance +} + +stop() { + service_stop $PROG +} diff --git a/net/opentracker/patches/100-makefile.patch b/net/opentracker/patches/100-makefile.patch new file mode 100644 index 000..f3f9038 --- /dev/null +++ b/net/opentracker/patches/100-makefile.patch @@ -0,0 +1,32 @@ +Index: opentracker-20130804/Makefile +=== +--- opentracker-20130804.orig/Makefile opentracker-20130804/Makefile +@@ -9,13 +9,13 @@ CC?=gcc + + # BSD flavour + # PREFIX?=/usr/local +-# LIBOWFAT_HEADERS=$(PREFIX)/include/libowfat +-# LIBOWFAT_LIBRARY=$(PREFIX)/lib ++LIBOWFAT_HEADERS=$(PREFIX)/include/libowfat ++LIBOWFAT_LIBRARY=$(PREFIX)/lib + + # Debug flavour +-PREFIX?=.. +-LIBOWFAT_HEADERS=$(PREFIX)/libowfat +-LIBOWFAT_LIBRARY=$(PREFIX)/libowfat ++# PREFIX?=.. ++# LIBOWFAT_HEADERS=$(PREFIX)/libowfat ++# LIBOWFAT_LIBRARY=$(PREFIX)/libowfat + + BINDIR?=$(PREFIX)/bin + +@@ -66,7 +66,7 @@ CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $ + + $(BINARY): $(OBJECTS) $(HEADERS) + $(CC) -o $@ $(OBJECTS) $(LDFLAGS) +-strip $@ ++$(STRIP) $@ + $(BINARY).debug: $(OBJECTS_debug) $(HEADERS) + $(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS) + proxy: $(OBJECTS_proxy) $(HEADERS) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [packages] add opentracker package
On 23/04/2014 10:44, Hartmut Knaack wrote: +stop() { +service_stop $PROG +} this bit is redundant ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [packages] add opentracker package
On Wed, Apr 23, 2014 at 10:59:46AM +0200, John Crispin wrote: On 23/04/2014 10:44, Hartmut Knaack wrote: +stop() { + service_stop $PROG +} this bit is redundant If it is, can you please update: http://wiki.openwrt.org/doc/devel/packages#packaging.a.service It would be fantastic to get docs from someone who _knows_ what's best, rather than someone like me trying to follow along well after the fact and playing catchup. There are so many different styles of init scripts in the packages repo that trying to guess which one is a good example is a rather hard task. Sincerely, Karl Palsson ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [packages] add opentracker package
On 23/04/2014 12:16, Karl Palsson wrote: On Wed, Apr 23, 2014 at 10:59:46AM +0200, John Crispin wrote: On 23/04/2014 10:44, Hartmut Knaack wrote: +stop() { + service_stop $PROG +} this bit is redundant If it is, can you please update: http://wiki.openwrt.org/doc/devel/packages#packaging.a.service It would be fantastic to get docs from someone who _knows_ what's best, rather than someone like me trying to follow along well after the fact and playing catchup. There are so many different styles of init scripts in the packages repo that trying to guess which one is a good example is a rather hard task. Sincerely, Karl Palsson netifd is a good example that covers almost all special cases of procd style init.d files. please have a look and update the wiki, it will be a good exercise if you want to learn more about the init.d files. John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [packages] add opentracker package
support for opentracker was suggested in ticket #7023 it's much tighter than cbtt and got only 20% of cbtt's binary size Signed-off-by: Daniel Golle dan...@makrotopia.org --- net/opentracker/Makefile | 51 ++ net/opentracker/files/opentracker.init | 20 net/opentracker/patches/100-makefile.patch | 32 +++ 3 files changed, 103 insertions(+) create mode 100644 net/opentracker/Makefile create mode 100755 net/opentracker/files/opentracker.init create mode 100644 net/opentracker/patches/100-makefile.patch diff --git a/net/opentracker/Makefile b/net/opentracker/Makefile new file mode 100644 index 000..7c01105 --- /dev/null +++ b/net/opentracker/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2006-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=opentracker +PKG_VERSION:=20130804 +PKG_RELEASE:=1 +PKG_REV:=954f5029dfa17734dc408336ef710c192268e8a4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=git://erdgeist.org/opentracker +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_PROTO:=git +PKG_BUILD_DEPENDS:=libowfat + +include $(INCLUDE_DIR)/package.mk + +define Package/opentracker + SUBMENU:=BitTorrent + SECTION:=net + CATEGORY:=Network + TITLE:=opentracker + URL:=http://erdgeist.org/arts/software/opentracker/ + DEPENDS:=+zlib +libpthread +endef + +define Package/opentracker/description + opentracker - An open and free bittorrent tracker + + opentracker is a open and free bittorrent tracker project. + It aims for minimal resource usage and is intended to run at your wlan router. Currently it is deployed as an open and free tracker instance. Read our free and open tracker blog and announce your torrents there (but do not hesitate to setup your own free trackers!). +endef + +MAKE_FLAGS += PREFIX=$(STAGING_DIR)/usr + +define Package/opentracker/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/opentracker $(1)/usr/bin + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/opentracker.conf.sample $(1)/etc/opentracker.conf + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/opentracker.init $(1)/etc/init.d/opentracker +endef + +$(eval $(call BuildPackage,opentracker)) diff --git a/net/opentracker/files/opentracker.init b/net/opentracker/files/opentracker.init new file mode 100755 index 000..c899548 --- /dev/null +++ b/net/opentracker/files/opentracker.init @@ -0,0 +1,20 @@ +#!/bin/sh /etc/rc.common + +START=10 +STOP=15 + +NAME=opentracker +PROG=/usr/bin/opentracker +OPTIONS=-f /etc/opentracker.conf +USE_PROCD=1 + +start_service() +{ + procd_open_instance + procd_set_param command $PROG $OPTIONS + procd_close_instance +} + +stop() { + service_stop $PROG +} diff --git a/net/opentracker/patches/100-makefile.patch b/net/opentracker/patches/100-makefile.patch new file mode 100644 index 000..f3f9038 --- /dev/null +++ b/net/opentracker/patches/100-makefile.patch @@ -0,0 +1,32 @@ +Index: opentracker-20130804/Makefile +=== +--- opentracker-20130804.orig/Makefile opentracker-20130804/Makefile +@@ -9,13 +9,13 @@ CC?=gcc + + # BSD flavour + # PREFIX?=/usr/local +-# LIBOWFAT_HEADERS=$(PREFIX)/include/libowfat +-# LIBOWFAT_LIBRARY=$(PREFIX)/lib ++LIBOWFAT_HEADERS=$(PREFIX)/include/libowfat ++LIBOWFAT_LIBRARY=$(PREFIX)/lib + + # Debug flavour +-PREFIX?=.. +-LIBOWFAT_HEADERS=$(PREFIX)/libowfat +-LIBOWFAT_LIBRARY=$(PREFIX)/libowfat ++# PREFIX?=.. ++# LIBOWFAT_HEADERS=$(PREFIX)/libowfat ++# LIBOWFAT_LIBRARY=$(PREFIX)/libowfat + + BINDIR?=$(PREFIX)/bin + +@@ -66,7 +66,7 @@ CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $ + + $(BINARY): $(OBJECTS) $(HEADERS) + $(CC) -o $@ $(OBJECTS) $(LDFLAGS) +- strip $@ ++ $(STRIP) $@ + $(BINARY).debug: $(OBJECTS_debug) $(HEADERS) + $(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS) + proxy: $(OBJECTS_proxy) $(HEADERS) -- 1.9.2 pgpd7alg4NHNS.pgp Description: PGP signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel