summaryrefslogtreecommitdiff
path: root/package/ipvsadm/patches
diff options
context:
space:
mode:
Diffstat (limited to 'package/ipvsadm/patches')
-rw-r--r--package/ipvsadm/patches/patch-Makefile49
-rw-r--r--package/ipvsadm/patches/patch-Makefile.orig43
-rw-r--r--package/ipvsadm/patches/patch-libipvs_Makefile20
-rw-r--r--package/ipvsadm/patches/patch-libipvs_Makefile.orig20
4 files changed, 132 insertions, 0 deletions
diff --git a/package/ipvsadm/patches/patch-Makefile b/package/ipvsadm/patches/patch-Makefile
new file mode 100644
index 000000000..f99758a0c
--- /dev/null
+++ b/package/ipvsadm/patches/patch-Makefile
@@ -0,0 +1,49 @@
+--- ipvsadm-1.26.orig/Makefile 2011-02-08 01:24:23.000000000 +0100
++++ ipvsadm-1.26/Makefile 2012-07-20 14:46:15.000000000 +0200
+@@ -35,20 +35,20 @@ ARCH = $(shell uname -m)
+ RPMSOURCEDIR = $(shell rpm --eval '%_sourcedir')
+ RPMSPECDIR = $(shell rpm --eval '%_specdir')
+
+-CC = gcc
++CC ?= gcc
+ INCLUDE =
+-SBIN = $(BUILD_ROOT)/sbin
++SBIN = $(DESTDIR)/sbin
+ MANDIR = usr/man
+-MAN = $(BUILD_ROOT)/$(MANDIR)/man8
+-INIT = $(BUILD_ROOT)/etc/rc.d/init.d
++MAN = $(DESTDIR)/$(MANDIR)/man8
++INIT = $(DESTDIR)/etc/rc.d/init.d
+ MKDIR = mkdir
+ INSTALL = install
+ STATIC_LIBS = libipvs/libipvs.a
+
+ ifeq "${ARCH}" "sparc64"
+- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
++ CFLAGS ?= -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
+ else
+- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g
++ CFLAGS ?= -Wall -Wunused -Wstrict-prototypes -g
+ endif
+
+
+@@ -81,7 +81,7 @@ endif
+ OBJS = ipvsadm.o config_stream.o dynamic_array.o
+ LIBS = $(POPT_LIB)
+ ifneq (0,$(HAVE_NL))
+-LIBS += -lnl
++LIBS += -lnl-3
+ endif
+ DEFINES = -DVERSION=\"$(VERSION)\" -DSCHEDULERS=\"$(SCHEDULERS)\" \
+ -DPE_LIST=\"$(PE_LIST)\" $(POPT_DEFINE)
+@@ -96,8 +96,8 @@ all: libs ipvsadm
+ libs:
+ make -C libipvs
+
+-ipvsadm: $(OBJS) $(STATIC_LIBS)
+- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
++ipvsadm: $(OBJS)
++ $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -lpopt -lipvs -L./libipvs
+
+ install: all
+ if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
diff --git a/package/ipvsadm/patches/patch-Makefile.orig b/package/ipvsadm/patches/patch-Makefile.orig
new file mode 100644
index 000000000..95c55e00a
--- /dev/null
+++ b/package/ipvsadm/patches/patch-Makefile.orig
@@ -0,0 +1,43 @@
+--- ipvsadm-1.26.orig/Makefile 2011-02-08 01:24:23.000000000 +0100
++++ ipvsadm-1.26/Makefile 2012-07-20 14:42:03.000000000 +0200
+@@ -35,7 +35,7 @@ ARCH = $(shell uname -m)
+ RPMSOURCEDIR = $(shell rpm --eval '%_sourcedir')
+ RPMSPECDIR = $(shell rpm --eval '%_specdir')
+
+-CC = gcc
++CC ?= gcc
+ INCLUDE =
+ SBIN = $(BUILD_ROOT)/sbin
+ MANDIR = usr/man
+@@ -46,9 +46,9 @@ INSTALL = install
+ STATIC_LIBS = libipvs/libipvs.a
+
+ ifeq "${ARCH}" "sparc64"
+- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
++ CFLAGS ?= -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
+ else
+- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g
++ CFLAGS ?= -Wall -Wunused -Wstrict-prototypes -g
+ endif
+
+
+@@ -81,7 +81,7 @@ endif
+ OBJS = ipvsadm.o config_stream.o dynamic_array.o
+ LIBS = $(POPT_LIB)
+ ifneq (0,$(HAVE_NL))
+-LIBS += -lnl
++LIBS += -lnl-3
+ endif
+ DEFINES = -DVERSION=\"$(VERSION)\" -DSCHEDULERS=\"$(SCHEDULERS)\" \
+ -DPE_LIST=\"$(PE_LIST)\" $(POPT_DEFINE)
+@@ -96,8 +96,8 @@ all: libs ipvsadm
+ libs:
+ make -C libipvs
+
+-ipvsadm: $(OBJS) $(STATIC_LIBS)
+- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
++ipvsadm: $(OBJS)
++ $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -lpopt -lipvs -L./libipvs
+
+ install: all
+ if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
diff --git a/package/ipvsadm/patches/patch-libipvs_Makefile b/package/ipvsadm/patches/patch-libipvs_Makefile
new file mode 100644
index 000000000..d2e9f6b45
--- /dev/null
+++ b/package/ipvsadm/patches/patch-libipvs_Makefile
@@ -0,0 +1,20 @@
+--- ipvsadm-1.26.orig/libipvs/Makefile 2008-09-21 12:02:03.000000000 +0200
++++ ipvsadm-1.26/libipvs/Makefile 2012-07-20 13:53:25.000000000 +0200
+@@ -1,7 +1,7 @@
+ # Makefile for libipvs
+
+-CC = gcc
+-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
++CC ?= gcc
++CFLAGS ?= -Wall -Wunused -Wstrict-prototypes -g -fPIC
+ ifneq (0,$(HAVE_NL))
+ CFLAGS += -DLIBIPVS_USE_NL
+ endif
+@@ -19,6 +19,7 @@ all: $(STATIC_LIB) $(SHARED_LIB)
+
+ $(STATIC_LIB): libipvs.o ip_vs_nl_policy.o
+ ar rv $@ $^
++ ranlib $@
+
+ $(SHARED_LIB): libipvs.o ip_vs_nl_policy.o
+ $(CC) -shared -Wl,-soname,$@ -o $@ $^
diff --git a/package/ipvsadm/patches/patch-libipvs_Makefile.orig b/package/ipvsadm/patches/patch-libipvs_Makefile.orig
new file mode 100644
index 000000000..e40aa2c2a
--- /dev/null
+++ b/package/ipvsadm/patches/patch-libipvs_Makefile.orig
@@ -0,0 +1,20 @@
+--- ipvsadm-1.26.orig/libipvs/Makefile 2008-09-21 12:02:03.000000000 +0200
++++ ipvsadm-1.26/libipvs/Makefile 2012-07-20 13:53:07.000000000 +0200
+@@ -1,7 +1,7 @@
+ # Makefile for libipvs
+
+-CC = gcc
+-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
++CC ?= gcc
++CFLAGS ?= -Wall -Wunused -Wstrict-prototypes -g -fPIC
+ ifneq (0,$(HAVE_NL))
+ CFLAGS += -DLIBIPVS_USE_NL
+ endif
+@@ -19,6 +19,7 @@ all: $(STATIC_LIB) $(SHARED_LIB)
+
+ $(STATIC_LIB): libipvs.o ip_vs_nl_policy.o
+ ar rv $@ $^
++ ranlib $^
+
+ $(SHARED_LIB): libipvs.o ip_vs_nl_policy.o
+ $(CC) -shared -Wl,-soname,$@ -o $@ $^