Browse Source

add opentracker package

support for opentracker was suggested in ticket #7023
it's much tighter than cbtt and got only 20% of cbtt binary size

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle 10 years ago
parent
commit
6fe800bddf

+ 55
- 0
net/opentracker/Makefile View File

@@ -0,0 +1,55 @@
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:=20130804
12
+PKG_RELEASE:=1
13
+PKG_REV:=954f5029dfa17734dc408336ef710c192268e8a4
14
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
15
+
16
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17
+PKG_SOURCE_URL:=git://erdgeist.org/opentracker
18
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19
+PKG_SOURCE_VERSION:=$(PKG_REV)
20
+PKG_SOURCE_PROTO:=git
21
+PKG_BUILD_DEPENDS:=libowfat
22
+
23
+include $(INCLUDE_DIR)/package.mk
24
+
25
+define Package/opentracker
26
+  SUBMENU:=BitTorrent
27
+  SECTION:=net
28
+  CATEGORY:=Network
29
+  TITLE:=opentracker
30
+  URL:=http://erdgeist.org/arts/software/opentracker/
31
+  DEPENDS:=+zlib +libpthread
32
+endef
33
+
34
+define Package/opentracker/description
35
+ opentracker - An open and free bittorrent tracker
36
+
37
+ opentracker is an open and free bittorrent tracker project.
38
+ It aims for minimal resource usage and is intended to run at your wlan router.
39
+ Currently it is deployed as an open and free tracker instance.
40
+ Read our free and open tracker blog and announce your torrents there
41
+ (but do not hesitate to setup your own free trackers!).
42
+endef
43
+
44
+MAKE_FLAGS += PREFIX="$(STAGING_DIR)/usr"
45
+
46
+define Package/opentracker/install
47
+	$(INSTALL_DIR) $(1)/usr/bin
48
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/opentracker $(1)/usr/bin
49
+	$(INSTALL_DIR) $(1)/etc
50
+	$(INSTALL_CONF) $(PKG_BUILD_DIR)/opentracker.conf.sample $(1)/etc/opentracker.conf
51
+	$(INSTALL_DIR) $(1)/etc/init.d
52
+	$(INSTALL_BIN) ./files/opentracker.init $(1)/etc/init.d/opentracker
53
+endef
54
+
55
+$(eval $(call BuildPackage,opentracker))

+ 16
- 0
net/opentracker/files/opentracker.init View File

@@ -0,0 +1,16 @@
1
+#!/bin/sh /etc/rc.common
2
+
3
+START=10
4
+STOP=15
5
+
6
+NAME="opentracker"
7
+PROG="/usr/bin/opentracker"
8
+OPTIONS="-f /etc/opentracker.conf"
9
+USE_PROCD=1
10
+
11
+start_service()
12
+{
13
+	procd_open_instance
14
+	procd_set_param command $PROG $OPTIONS
15
+	procd_close_instance
16
+}

+ 32
- 0
net/opentracker/patches/100-makefile.patch View File

@@ -0,0 +1,32 @@
1
+Index: opentracker-20130804/Makefile
2
+===================================================================
3
+--- opentracker-20130804.orig/Makefile
4
++++ opentracker-20130804/Makefile
5
+@@ -9,13 +9,13 @@ CC?=gcc
6
+ 
7
+ # BSD flavour
8
+ # PREFIX?=/usr/local
9
+-# LIBOWFAT_HEADERS=$(PREFIX)/include/libowfat
10
+-# LIBOWFAT_LIBRARY=$(PREFIX)/lib
11
++LIBOWFAT_HEADERS=$(PREFIX)/include/libowfat
12
++LIBOWFAT_LIBRARY=$(PREFIX)/lib
13
+ 
14
+ # Debug flavour
15
+-PREFIX?=..
16
+-LIBOWFAT_HEADERS=$(PREFIX)/libowfat
17
+-LIBOWFAT_LIBRARY=$(PREFIX)/libowfat
18
++# PREFIX?=..
19
++# LIBOWFAT_HEADERS=$(PREFIX)/libowfat
20
++# LIBOWFAT_LIBRARY=$(PREFIX)/libowfat
21
+ 
22
+ BINDIR?=$(PREFIX)/bin
23
+ 
24
+@@ -66,7 +66,7 @@ CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $
25
+ 
26
+ $(BINARY): $(OBJECTS) $(HEADERS)
27
+ 	$(CC) -o $@ $(OBJECTS) $(LDFLAGS)
28
+-	strip $@
29
++	$(STRIP) $@
30
+ $(BINARY).debug: $(OBJECTS_debug) $(HEADERS)
31
+ 	$(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS)
32
+ proxy: $(OBJECTS_proxy) $(HEADERS)