summaryrefslogtreecommitdiff
path: root/package/rarpd
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/rarpd
Initial import
Diffstat (limited to 'package/rarpd')
-rw-r--r--package/rarpd/Config.in14
-rw-r--r--package/rarpd/Makefile36
-rw-r--r--package/rarpd/files/rarpd.init25
-rw-r--r--package/rarpd/ipkg/rarpd.control5
-rw-r--r--package/rarpd/ipkg/rarpd.postinst4
5 files changed, 84 insertions, 0 deletions
diff --git a/package/rarpd/Config.in b/package/rarpd/Config.in
new file mode 100644
index 000000000..9f5c7ac65
--- /dev/null
+++ b/package/rarpd/Config.in
@@ -0,0 +1,14 @@
+config ADK_PACKAGE_RARPD
+ prompt "rarpd............................. Reverse ARP Daemon"
+ tristate
+ default n
+ select ADK_PACKAGE_LIBNET
+ help
+ Rarpd is a daemon which responds to RARP requests.
+ RARP is used by some machines at boot time to discover their
+ IP address. They provide their Ethernet address and rarpd
+ responds with their IP address if it finds it in the ethers
+ database.
+
+ ftp://ftp.dementia.org/pub/net-tools/
+
diff --git a/package/rarpd/Makefile b/package/rarpd/Makefile
new file mode 100644
index 000000000..c32eb13fa
--- /dev/null
+++ b/package/rarpd/Makefile
@@ -0,0 +1,36 @@
+# $Id$
+#-
+# 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:= rarpd
+PKG_VERSION:= 1.1
+PKG_RELEASE:= 10
+PKG_MD5SUM:= 04e2ca849e758d0b88c8281775ec3b58
+MASTER_SITES:= ftp://ftp.dementia.org/pub/net-tools/
+
+# Hack Alert!
+# The configure script for rarpd, when used with the --with-libnet option
+# doesn't correctly detect and set -DNEW_LIBNET_INTERFACE.
+EXTRA_CFLAGS= -DNEW_LIBNET_INTERFACE
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,RARPD,rarpd,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+CONFIGURE_STYLE:= gnu
+CONFIGURE_ARGS+= --with-libnet="${STAGING_DIR}/usr" \
+ --with-pcap="${STAGING_DIR}/usr"
+TCFLAGS+= ${EXTRA_CFLAGS}
+BUILD_STYLE:= auto
+INSTALL_STYLE:= auto
+
+post-install:
+ ${INSTALL_DIR} ${IDIR_RARPD}/usr/sbin
+ ${INSTALL_DIR} ${IDIR_RARPD}/etc/init.d
+ ${INSTALL_BIN} ${WRKINST}/sbin/rarpd ${IDIR_RARPD}/usr/sbin/
+ ${INSTALL_BIN} ./files/rarpd.init ${IDIR_RARPD}/etc/init.d/rarpd
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/rarpd/files/rarpd.init b/package/rarpd/files/rarpd.init
new file mode 100644
index 000000000..09a346432
--- /dev/null
+++ b/package/rarpd/files/rarpd.init
@@ -0,0 +1,25 @@
+#!/bin/sh
+#FWINIT 60
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${rarpd:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ rarpd $rarpd_flags
+ ;;
+stop)
+ killall rarpd
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "usage: $0 {start | stop | restart}"
+ exit 1
+esac
+exit $?
diff --git a/package/rarpd/ipkg/rarpd.control b/package/rarpd/ipkg/rarpd.control
new file mode 100644
index 000000000..221e869af
--- /dev/null
+++ b/package/rarpd/ipkg/rarpd.control
@@ -0,0 +1,5 @@
+Package: rarpd
+Priority: optional
+Section: net
+Depends: libnet
+Description: Reverse ARP Daemon
diff --git a/package/rarpd/ipkg/rarpd.postinst b/package/rarpd/ipkg/rarpd.postinst
new file mode 100644
index 000000000..ed21e9d6f
--- /dev/null
+++ b/package/rarpd/ipkg/rarpd.postinst
@@ -0,0 +1,4 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf rarpd rarpd NO
+add_rcconf rarpd_flags rarpd_flags "-i eth0.0"