From 45012a8bdbe4d78cadc02703135aabf7c8c4115f Mon Sep 17 00:00:00 2001 From: olli Date: Thu, 28 Feb 2008 12:27:19 +0000 Subject: [PATCH] [Packages] net/srelay: Fix compilation git-svn-id: svn://svn.openwrt.org/openwrt/packages@10533 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/srelay/Makefile | 22 +++++++-------- net/srelay/files/srelay.init | 0 net/srelay/patches/001-cross_compile.patch | 7 ++--- .../002-linux_2.6.19_rtnetlink_changes.patch | 7 ++--- net/srelay/patches/003-openlog.patch | 11 ++++---- net/srelay/patches/004-bindtodevice.patch | 31 ++++++++++++---------- 6 files changed, 40 insertions(+), 38 deletions(-) mode change 100755 => 100644 net/srelay/files/srelay.init diff --git a/net/srelay/Makefile b/net/srelay/Makefile index 75583ce35..b57a0e65e 100644 --- a/net/srelay/Makefile +++ b/net/srelay/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2008 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/socks-relay PKG_MD5SUM:=4a9f3298b38d8588f0ffde31b946a47f -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +# PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk @@ -32,23 +32,19 @@ define Package/srelay/conffiles /etc/srelay.conf endef -define Build/Configure - $(call Build/Configure/Default, \ - --disable-thread \ - ) -endef +CONFIGURE_ARGS += \ + --disable-thread \ -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) -endef +CONFIGURE_VARS += \ + CPPFLAGS="-DLINUX" \ define Package/srelay/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/srelay $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) files/srelay.conf $(1)/etc/ + $(INSTALL_DATA) files/$(PKG_NAME).conf $(1)/etc/ $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) files/srelay.init $(1)/etc/init.d/srelay + $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) endef $(eval $(call BuildPackage,srelay)) diff --git a/net/srelay/files/srelay.init b/net/srelay/files/srelay.init old mode 100755 new mode 100644 diff --git a/net/srelay/patches/001-cross_compile.patch b/net/srelay/patches/001-cross_compile.patch index 8f5941e5a..a20215e31 100644 --- a/net/srelay/patches/001-cross_compile.patch +++ b/net/srelay/patches/001-cross_compile.patch @@ -1,6 +1,7 @@ -diff -urN srelay-0.4.6/configure srelay-0.4.6.new/configure ---- srelay-0.4.6/configure 2003-04-14 07:36:15.000000000 +0200 -+++ srelay-0.4.6.new/configure 2006-03-28 15:11:42.000000000 +0200 +Index: srelay-0.4.6/configure +=================================================================== +--- srelay-0.4.6.orig/configure 2008-02-28 13:21:29.000000000 +0100 ++++ srelay-0.4.6/configure 2008-02-28 13:21:30.000000000 +0100 @@ -1394,8 +1394,8 @@ ;; diff --git a/net/srelay/patches/002-linux_2.6.19_rtnetlink_changes.patch b/net/srelay/patches/002-linux_2.6.19_rtnetlink_changes.patch index 96c783c1d..6c995444c 100644 --- a/net/srelay/patches/002-linux_2.6.19_rtnetlink_changes.patch +++ b/net/srelay/patches/002-linux_2.6.19_rtnetlink_changes.patch @@ -1,6 +1,7 @@ -diff -ruN srelay-0.4.6-old/get-bind.c srelay-0.4.6-new/get-bind.c ---- srelay-0.4.6-old/get-bind.c 2003-04-10 04:53:17.000000000 +0200 -+++ srelay-0.4.6-new/get-bind.c 2006-12-18 12:53:06.000000000 +0100 +Index: srelay-0.4.6/get-bind.c +=================================================================== +--- srelay-0.4.6.orig/get-bind.c 2008-02-28 13:21:29.000000000 +0100 ++++ srelay-0.4.6/get-bind.c 2008-02-28 13:21:30.000000000 +0100 @@ -50,6 +50,18 @@ #include #include diff --git a/net/srelay/patches/003-openlog.patch b/net/srelay/patches/003-openlog.patch index 9f3f8740c..dea36035b 100644 --- a/net/srelay/patches/003-openlog.patch +++ b/net/srelay/patches/003-openlog.patch @@ -1,7 +1,8 @@ -diff -Naurp srelay-0.4.6.orig/main.c srelay-0.4.6/main.c ---- srelay-0.4.6.orig/main.c 2006-12-13 22:58:39.000000000 +0100 -+++ srelay-0.4.6/main.c 2006-12-13 23:02:59.000000000 +0100 -@@ -33,6 +33,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DA +Index: srelay-0.4.6/main.c +=================================================================== +--- srelay-0.4.6.orig/main.c 2008-02-28 13:21:29.000000000 +0100 ++++ srelay-0.4.6/main.c 2008-02-28 13:21:30.000000000 +0100 +@@ -33,6 +33,7 @@ */ #include @@ -9,7 +10,7 @@ diff -Naurp srelay-0.4.6.orig/main.c srelay-0.4.6/main.c #include "srelay.h" /* prototypes */ -@@ -125,6 +126,8 @@ int main(int ac, char **av) +@@ -125,6 +126,8 @@ uid = getuid(); diff --git a/net/srelay/patches/004-bindtodevice.patch b/net/srelay/patches/004-bindtodevice.patch index 9daa48e25..540782953 100644 --- a/net/srelay/patches/004-bindtodevice.patch +++ b/net/srelay/patches/004-bindtodevice.patch @@ -1,7 +1,8 @@ -diff -u srelay-0.4.6.orig/main.c srelay-0.4.6/main.c ---- srelay-0.4.6.orig/main.c 2003-03-26 20:45:12.000000000 +0000 -+++ srelay-0.4.6/main.c 2007-08-09 13:53:30.000000000 +0100 -@@ -43,6 +43,7 @@ +Index: srelay-0.4.6/main.c +=================================================================== +--- srelay-0.4.6.orig/main.c 2008-02-28 13:21:30.000000000 +0100 ++++ srelay-0.4.6/main.c 2008-02-28 13:21:30.000000000 +0100 +@@ -44,6 +44,7 @@ char *ident = "srelay"; char *pidfile = PIDFILE; char *pwdfile = PWDFILE; @@ -9,7 +10,7 @@ diff -u srelay-0.4.6.orig/main.c srelay-0.4.6/main.c pid_t master_pid; #if USE_THREAD -@@ -74,6 +75,9 @@ +@@ -75,6 +76,9 @@ fprintf(stderr, "options:\n" "\t-c file\tconfig file\n" "\t-i i/f\tlisten interface IP[:PORT]\n" @@ -19,16 +20,16 @@ diff -u srelay-0.4.6.orig/main.c srelay-0.4.6/main.c "\t-m num\tmax child/thread\n" "\t-o min\tidle timeout minutes\n" "\t-p file\tpid file\n" -@@ -125,7 +129,7 @@ +@@ -128,7 +132,7 @@ - uid = getuid(); + openlog("srelay", LOG_PID, LOG_DAEMON); - while((ch = getopt(ac, av, "a:c:i:m:o:p:u:frstbvh?")) != -1) + while((ch = getopt(ac, av, "a:c:i:J:m:o:p:u:frstbvh?")) != -1) switch (ch) { case 'a': if (optarg != NULL) { -@@ -180,6 +184,14 @@ +@@ -183,6 +187,14 @@ } break; @@ -43,9 +44,10 @@ diff -u srelay-0.4.6.orig/main.c srelay-0.4.6/main.c case 'o': if (optarg != NULL) { idle_timeout = atol(optarg); -diff -u srelay-0.4.6.orig/socks.c srelay-0.4.6/socks.c ---- srelay-0.4.6.orig/socks.c 2003-04-13 22:13:25.000000000 +0100 -+++ srelay-0.4.6/socks.c 2007-08-09 14:44:24.000000000 +0100 +Index: srelay-0.4.6/socks.c +=================================================================== +--- srelay-0.4.6.orig/socks.c 2008-02-28 13:21:29.000000000 +0100 ++++ srelay-0.4.6/socks.c 2008-02-28 13:21:30.000000000 +0100 @@ -990,6 +990,24 @@ return(-1); } @@ -116,9 +118,10 @@ diff -u srelay-0.4.6.orig/socks.c srelay-0.4.6/socks.c if (connect(cs, res->ai_addr, res->ai_addrlen) < 0) { /* connect fail */ save_errno = errno; -diff -u srelay-0.4.6.orig/srelay.h srelay-0.4.6/srelay.h ---- srelay-0.4.6.orig/srelay.h 2003-04-14 06:36:15.000000000 +0100 -+++ srelay-0.4.6/srelay.h 2007-08-09 13:46:06.000000000 +0100 +Index: srelay-0.4.6/srelay.h +=================================================================== +--- srelay-0.4.6.orig/srelay.h 2008-02-28 13:21:29.000000000 +0100 ++++ srelay-0.4.6/srelay.h 2008-02-28 13:21:30.000000000 +0100 @@ -266,6 +266,7 @@ extern char *ident; extern char *pidfile; -- 2.11.0