Ticket #7023: opentracker.patch.2.svn

File opentracker.patch.2.svn, 3.7 KB (added by onny@…, 6 years ago)

New makefile for opentracker

Line 
1Index: libowfat/Makefile
2===================================================================
3--- libowfat/Makefile   (Revision 0)
4+++ libowfat/Makefile   (Revision 0)
5@@ -0,0 +1,46 @@
6+#
7+# Copyright (C) 2006-2008 OpenWrt.org
8+#
9+# This is free software, licensed under the GNU General Public License v2.
10+# See /LICENSE for more information.
11+#
12+
13+include $(TOPDIR)/rules.mk
14+
15+PKG_NAME:=libowfat
16+PKG_VERSION:=0.28
17+PKG_RELEASE:=1
18+
19+PKG_SOURCE_URL:=http://dl.fefe.de
20+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
21+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22+PKG_MD5SUM:=6bbee9a86506419657d87123b7a6f2c1
23+
24+
25+#PKG_CAT:=bzcat
26+
27+include $(INCLUDE_DIR)/package.mk
28+
29+
30+define Package/libowfat
31+ SECTION:=libs
32+ CATEGORY:=Libraries
33+ TITLE:=libowfat
34+ URL:=http://www.fefe.de/libowfat/
35+endef
36+
37+define Package/libowfat/install
38+       $(INSTALL_DIR) $(1)/usr/lib
39+#      $(INSTALL_DIR) $(1)/usr/include ?
40+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/*.o $(1)/usr/lib/
41+#      $(INSTALL_DATA) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/ ?
42+       
43+endef
44+
45+define Package/libowfat/InstallDev
46+       $(INSTALL_DIR) $(1)/usr/include
47+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/
48+       $(INSTALL_BIN) $PKG_BUILD_DIR)/*.o $(1)/usr/lib/
49+endef
50+
51+$(eval $(call BuildPackage,libowfat))
52Index: opentracker/files/opentracker.init
53===================================================================
54--- opentracker/files/opentracker.init  (Revision 0)
55+++ opentracker/files/opentracker.init  (Revision 0)
56@@ -0,0 +1,16 @@
57+TART=10
58+STOP=15
59+
60+OPENTRACKER_BIN=/usr/bin/opentracker
61+
62+
63+start() {
64+
65+       echo "Starting opentracker"
66+       $OPENTRACKER_BIN &             
67+}
68+stop() {
69+       echo "Shutting down opentracker"
70+       killall opentracker
71+}     
72+
73Index: opentracker/patches/100-opentracker.patch
74===================================================================
75--- opentracker/patches/100-opentracker.patch   (Revision 0)
76+++ opentracker/patches/100-opentracker.patch   (Revision 0)
77@@ -0,0 +1,22 @@
78+--- opentracker-20120608/Makefile      2010-03-15 23:36:08.000000000 +0100
79++++ opentracker-20120608/Makefile      2010-03-15 23:37:10.000000000 +0100
80+@@ -14,8 +14,8 @@
81+
82+ # Debug flavour
83+ PREFIX?=..
84+-LIBOWFAT_HEADERS=$(PREFIX)/libowfat
85+-LIBOWFAT_LIBRARY=$(PREFIX)/libowfat
86++LIBOWFAT_HEADERS=$(PREFIX)/libowfat-0.28
87++LIBOWFAT_LIBRARY=$(PREFIX)/libowfat-0.28
88+
89+ BINDIR?=$(PREFIX)/bin
90+
91+@@ -64,7 +64,7 @@
92+
93+ $(BINARY): $(OBJECTS) $(HEADERS)
94+       $(CC) -o $@ $(OBJECTS) $(LDFLAGS)
95+-      strip $@
96++      $(STRIP) $@
97+ $(BINARY).debug: $(OBJECTS_debug) $(HEADERS)
98+       $(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS)
99+ proxy: $(OBJECTS_proxy) $(HEADERS)
100Index: opentracker/Makefile
101===================================================================
102--- opentracker/Makefile        (Revision 0)
103+++ opentracker/Makefile        (Revision 0)
104@@ -0,0 +1,43 @@
105+#
106+# Copyright (C) 2006-2008 OpenWrt.org
107+#
108+# This is free software, licensed under the GNU General Public License v2.
109+# See /LICENSE for more information.
110+#
111+
112+include $(TOPDIR)/rules.mk
113+
114+PKG_NAME:=opentracker
115+PKG_VERSION:=20120608
116+PKG_RELEASE:=2
117+
118+PKG_SOURCE_URL:=http://onny.project-insanity.org/files
119+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
120+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
121+PKG_MD5SUM:=d386b06dc1c80a33a16a828f581ae774
122+
123+
124+
125+include $(INCLUDE_DIR)/package.mk
126+
127+
128+define Package/opentracker
129+ SECTION:=app
130+ CATEGORY:=Application
131+ TITLE:=opentracker
132+ URL:=http://erdgeist.org/arts/software/opentracker/
133+ DEPENDS:=+libowfat +zlib +libpthread
134+endef
135+
136+define Package/opentracker/description
137+ Opentracker - Bittorrent tracker
138+endef
139+
140+define Package/opentracker/install
141+       $(INSTALL_DIR) $(1)/usr/bin
142+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/opentracker $(1)/usr/bin
143+       $(INSTALL_DIR) $(1)/etc/init.d
144+       $(INSTALL_BIN) ./files/opentracker.init $(1)/etc/init.d/opentracker     
145+endef
146+
147+$(eval $(call BuildPackage,opentracker))