aboutsummaryrefslogtreecommitdiffstats
path: root/package/vrrpd
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2005-12-14 23:01:47 +0000
committerNicolas Thill <nico@openwrt.org>2005-12-14 23:01:47 +0000
commitf6f539cc52897e7d4928d10bef13b6c13d1714f5 (patch)
tree5ff9996a432b1b669793c44e4ea7dd26c1b16445 /package/vrrpd
parent88b041a097196086a4dd3d781c7ad4b62de77d98 (diff)
downloadupstream-f6f539cc52897e7d4928d10bef13b6c13d1714f5.tar.gz
upstream-f6f539cc52897e7d4928d10bef13b6c13d1714f5.tar.bz2
upstream-f6f539cc52897e7d4928d10bef13b6c13d1714f5.zip
fix package name in template call, remove unneeded patch,
don't use PKG_INSTALL_DIR since upstream does not provide a make install target, add configurable init script, add Id tag and target optimization cflags.. git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2674 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/vrrpd')
-rw-r--r--[-rwxr-xr-x]package/vrrpd/Config.in15
-rw-r--r--[-rwxr-xr-x]package/vrrpd/Makefile22
-rw-r--r--package/vrrpd/files/vrrpd.default4
-rw-r--r--package/vrrpd/files/vrrpd.init21
-rw-r--r--package/vrrpd/ipkg/vrrpd.conffiles1
-rw-r--r--[-rwxr-xr-x]package/vrrpd/ipkg/vrrpd.control5
-rw-r--r--package/vrrpd/patches/01-honor-target_cc.patch11
7 files changed, 48 insertions, 31 deletions
diff --git a/package/vrrpd/Config.in b/package/vrrpd/Config.in
index 793d3ed7ec..767e2dd0ec 100755..100644
--- a/package/vrrpd/Config.in
+++ b/package/vrrpd/Config.in
@@ -3,10 +3,11 @@ config BR2_PACKAGE_VRRPD
tristate
default m if CONFIG_DEVEL
help
- VRRPd is an implementation of Virtual Router Redundancy
- Protocol as specified in rfc2338. VRRPd is interoperable with
- other RFC-based VRRP implementations, including Cisco and
- Juniper, and is included as a standard feature on ImageStream
- routers.
-
- http://www.sourceforge.net/projects/vrrpd
+ VRRPd is an implementation of Virtual Router Redundancy
+ Protocol as specified in rfc2338. VRRPd is interoperable with
+ other RFC-based VRRP implementations, including Cisco and
+ Juniper, and is included as a standard feature on ImageStream
+ routers.
+
+ http://www.sourceforge.net/projects/vrrpd
+
diff --git a/package/vrrpd/Makefile b/package/vrrpd/Makefile
index 82ee36b7b3..b4aa4e0d5b 100755..100644
--- a/package/vrrpd/Makefile
+++ b/package/vrrpd/Makefile
@@ -1,33 +1,35 @@
+# $Id$
+
include $(TOPDIR)/rules.mk
PKG_NAME:=vrrpd
PKG_VERSION:=1.0
PKG_RELEASE:=1
-
PKG_MD5SUM:=6d5066ea1a6ced817376ca0f54765447
-PKG_SOURCE_URL:=@SF/vrrpd
+PKG_SOURCE_URL:=@SF/vrrpd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_CAT:=zcat
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(TOPDIR)/package/rules.mk
-$(eval $(call PKG_template,VRRPD,VRRPD,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,VRRPD,vrrpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
touch $@
$(PKG_BUILD_DIR)/.built:
- mkdir -p $(PKG_INSTALL_DIR)/usr/sbin
- $(MAKE) CC=$(TARGET_CC) -C $(PKG_BUILD_DIR)
- install -m0755 $(PKG_BUILD_DIR)/vrrpd $(PKG_INSTALL_DIR)/usr/sbin/
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CC=$(TARGET_CC) \
+ DBG_OPT="" \
+ MAIN_OPT="$(TARGET_CFLAGS)" \
+ vrrpd
touch $@
$(IPKG_VRRPD):
- mkdir -p $(IDIR_VRRPD)
- cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_VRRPD)/
+ install -d -m0755 $(IDIR_VRRPD)/usr/sbin
+ install -m0755 $(PKG_BUILD_DIR)/vrrpd $(IDIR_VRRPD)/usr/sbin/
$(RSTRIP) $(IDIR_VRRPD)
$(IPKG_BUILD) $(IDIR_VRRPD) $(PACKAGE_DIR)
diff --git a/package/vrrpd/files/vrrpd.default b/package/vrrpd/files/vrrpd.default
new file mode 100644
index 0000000000..0dfee0cfb9
--- /dev/null
+++ b/package/vrrpd/files/vrrpd.default
@@ -0,0 +1,4 @@
+ID=1
+IF=vlan1
+IP=10.0.0.1
+OPTIONS="-i $IF -v $ID $IP"
diff --git a/package/vrrpd/files/vrrpd.init b/package/vrrpd/files/vrrpd.init
new file mode 100644
index 0000000000..5afc734381
--- /dev/null
+++ b/package/vrrpd/files/vrrpd.init
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+BIN=vrrpd
+DEFAULT=/etc/default/$BIN
+[ -f $DEFAULT ] && . $DEFAULT
+RUN_D=/var/run
+PID_F=$RUN_D/$BIN_${IF}_${ID}.pid
+
+case $1 in
+ start)
+ $BIN $OPTIONS
+ ;;
+ stop)
+ [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1
+ ;;
+ *)
+ echo "usage: $0 (start|stop)"
+ exit 1
+esac
+
+exit $?
diff --git a/package/vrrpd/ipkg/vrrpd.conffiles b/package/vrrpd/ipkg/vrrpd.conffiles
new file mode 100644
index 0000000000..9680ca3c05
--- /dev/null
+++ b/package/vrrpd/ipkg/vrrpd.conffiles
@@ -0,0 +1 @@
+/etc/default/vrrpd
diff --git a/package/vrrpd/ipkg/vrrpd.control b/package/vrrpd/ipkg/vrrpd.control
index 92cce305be..435dda18f5 100755..100644
--- a/package/vrrpd/ipkg/vrrpd.control
+++ b/package/vrrpd/ipkg/vrrpd.control
@@ -1,5 +1,4 @@
Package: vrrpd
-Section: net
-Architecture: mipsel
Priority: optional
-Description: VRRPd is an implementation of Virtual Router Redundancy Protocol as specified in rfc2338.
+Section: net
+Description: An implementation of the Virtual Router Redundancy Protocol
diff --git a/package/vrrpd/patches/01-honor-target_cc.patch b/package/vrrpd/patches/01-honor-target_cc.patch
deleted file mode 100644
index c7506070ad..0000000000
--- a/package/vrrpd/patches/01-honor-target_cc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -urN orig/vrrpd-1.0/Makefile vrrpd-1.0/Makefile
---- orig/vrrpd-1.0/Makefile 2002-09-09 16:51:13.000000000 +0200
-+++ vrrpd-1.0/Makefile 2005-12-12 23:31:30.000000000 +0100
-@@ -15,7 +15,6 @@
- COMMON_CFLAGS= $(MAIN_OPT) $(INCLUDEOPT) $(PROF_OPT) $(DBG_OPT) $(MACHINEOPT)
-
- # set to compile with GCC
--CC=gcc
- CFLAGS= $(COMMON_CFLAGS) -Wall
-
- vrrpd : $(VRRPD_OBJS)