Add nufw
[openwrt/svn-archive/archive.git] / net / rarpd / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=rarpd
12 PKG_VERSION:=1.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.dementia.org/pub/net-tools
17 PKG_MD5SUM:=04e2ca849e758d0b88c8281775ec3b58
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/rarpd
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+libnet0
28 TITLE:=Reverse ARP Daemon
29 URL:=ftp://ftp.dementia.org/pub/net-tools/
30 endef
31
32 define Package/rarpd/description
33 Rarpd is a daemon which responds to RARP requests.
34 RARP is used by some machines at boot time to discover their
35 IP address. They provide their Ethernet address and rarpd
36 responds with their IP address if it finds it in the ethers
37 database.
38 endef
39
40 define Build/Configure
41 $(call Build/Configure/Default, \
42 --with-libnet="$(STAGING_DIR)/usr/lib/libnet-1.0.x" \
43 --with-pcap="$(STAGING_DIR)/usr" \
44 , \
45 CFLAGS="$$$$CFLAGS -DNEW_LIBNET_INTERFACE" \
46 )
47 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 DESTDIR="$(PKG_INSTALL_DIR)" \
52 all install
53 endef
54
55 define Package/rarpd/install
56 $(INSTALL_DIR) $(1)/usr/sbin
57 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rarpd $(1)/usr/sbin/
58 $(INSTALL_DIR) $(1)/etc/default
59 install -m644 ./files/rarpd.default $(1)/etc/default/rarpd
60 $(INSTALL_DIR) $(1)/etc/init.d
61 install -m755 ./files/rarpd.init $(1)/etc/init.d/rarpd
62 endef
63
64 $(eval $(call BuildPackage,rarpd))