2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
14 PKG_MD5SUM
:=04e2ca849e758d0b88c8281775ec3b58
16 PKG_SOURCE_URL
:=ftp
://ftp.dementia.org
/pub
/net-tools
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
24 # The configure script for rarpd, when used with the --with-libnet option
25 # doesn't correctly detect and set -DNEW_LIBNET_INTERFACE.
26 EXTRA_CFLAGS
= -DNEW_LIBNET_INTERFACE
28 include $(INCLUDE_DIR
)/package.mk
34 TITLE
:=Reverse ARP Daemon
35 DESCRIPTION
:=Rarpd is a daemon which responds to RARP requests.
\\\
36 RARP is used by some machines at boot time to discover their
\\\
37 IP address. They provide their Ethernet address and rarpd
\\\
38 responds with their IP address if it finds it in the ethers
\\\
40 URL
:=ftp
://ftp.dementia.org
/pub
/net-tools
/
43 define Build
/Configure
44 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
45 $(TARGET_CONFIGURE_OPTS
) \
46 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
47 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
48 LDFLAGS
="-I$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/lib" \
50 --target
=$(GNU_TARGET_NAME
) \
51 --host
=$(GNU_TARGET_NAME
) \
52 --build
=$(GNU_HOST_NAME
) \
58 --datadir=/usr
/share \
59 --includedir=/usr
/include \
60 --infodir=/usr
/share
/info \
62 --libexecdir
=/usr
/lib \
63 --localstatedir
=/var \
64 --mandir=/usr
/share
/man \
67 $(DISABLE_LARGEFILE
) \
69 --with-libnet
="$(STAGING_DIR)/usr" \
70 --with-pcap
="$(STAGING_DIR)/usr" \
75 rm -rf
$(PKG_INSTALL_DIR
)
76 mkdir
-p
$(PKG_INSTALL_DIR
)
77 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
78 $(TARGET_CONFIGURE_OPTS
) \
79 DESTDIR
="$(PKG_INSTALL_DIR)" \
83 define Package
/rarpd
/install
84 install -d
-m0755
$(1)/usr
/sbin
85 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/rarpd
$(1)/usr
/sbin
/
86 install -d
-m0755
$(1)/etc
/default
87 install -m644 .
/files
/rarpd.default
$(1)/etc
/default
/rarpd
88 install -d
-m0755
$(1)/etc
/init.d
89 install -m755 .
/files
/rarpd.init
$(1)/etc
/init.d
/rarpd
90 ln
-sf rarpd
$(1)/etc
/init.d
/S50rarpd
93 $(eval
$(call BuildPackage
,rarpd
))