summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/ipvsadm/Makefile34
-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
5 files changed, 166 insertions, 0 deletions
diff --git a/package/ipvsadm/Makefile b/package/ipvsadm/Makefile
new file mode 100644
index 000000000..09004b2e3
--- /dev/null
+++ b/package/ipvsadm/Makefile
@@ -0,0 +1,34 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= ipvsadm
+PKG_VERSION:= 1.26
+PKG_RELEASE:= 1
+PKG_MD5SUM:= eac3ba3f62cd4dea2da353aeddd353a8
+PKG_DESCR:= IPVS admin utility
+PKG_SECTION:= net
+PKG_DEPENDS:= libpopt kmod-ip-vs
+PKG_BUILDDEP:= popt
+PKG_URL:= http://www.linuxvirtualserver.org/
+PKG_SITES:= http://www.linuxvirtualserver.org/software/kernel-2.6/
+PKG_NOPARALLEL:= 1
+
+include $(TOPDIR)/mk/package.mk
+
+TARGET_CFLAGS+= -I$(STAGING_DIR)/usr/include/libnl3 -fPIC -DHAVE_NL=0
+CONFIG_STYLE:= manual
+XAKE_FLAGS+= HAVE_NL=0
+
+$(eval $(call PKG_template,IPVSADM,ipvsadm,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+ipvsadm-install:
+ $(INSTALL_DIR) $(IDIR_IPVSADM)/usr/sbin
+ $(INSTALL_DIR) $(IDIR_IPVSADM)/usr/lib
+ $(CP) $(WRKBUILD)/libipvs/libipvs.so \
+ $(IDIR_IPVSADM)/usr/lib
+ $(INSTALL_BIN) $(WRKINST)/sbin/ipvsadm \
+ $(IDIR_IPVSADM)/usr/sbin
+
+include ${TOPDIR}/mk/pkg-bottom.mk
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 $@ $^