| [c8b93bd] | 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| [475ad56] | 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| [c8b93bd] | 9 | PKG_NAME:= rarpd
|
|---|
| 10 | PKG_VERSION:= 1.1
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= 04e2ca849e758d0b88c8281775ec3b58
|
|---|
| 13 | PKG_INIT:= 60
|
|---|
| [475ad56] | 14 |
|
|---|
| [c8b93bd] | 15 | PKG_SOURCE_URL:= ftp://ftp.dementia.org/pub/net-tools
|
|---|
| 16 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| [475ad56] | 17 |
|
|---|
| 18 | # Hack Alert!
|
|---|
| 19 | # The configure script for rarpd, when used with the --with-libnet option
|
|---|
| 20 | # doesn't correctly detect and set -DNEW_LIBNET_INTERFACE.
|
|---|
| 21 | EXTRA_CFLAGS = -DNEW_LIBNET_INTERFACE
|
|---|
| 22 |
|
|---|
| [c8b93bd] | 23 | include $(TOPDIR)/mk/package.mk
|
|---|
| [475ad56] | 24 |
|
|---|
| 25 | $(eval $(call PKG_template,RARPD,rarpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 26 |
|
|---|
| [d419478] | 27 | $(WRKBUILD)/.configured:
|
|---|
| 28 | (cd $(WRKBUILD); \
|
|---|
| [475ad56] | 29 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 30 | CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
|
|---|
| 31 | CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|---|
| 32 | LDFLAGS="-I$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/lib" \
|
|---|
| 33 | ./configure \
|
|---|
| 34 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 35 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 36 | --build=$(GNU_HOST_NAME) \
|
|---|
| 37 | --program-prefix="" \
|
|---|
| 38 | --program-suffix="" \
|
|---|
| 39 | --prefix=/usr \
|
|---|
| 40 | --exec-prefix=/usr \
|
|---|
| 41 | --bindir=/usr/bin \
|
|---|
| 42 | --datadir=/usr/share \
|
|---|
| 43 | --includedir=/usr/include \
|
|---|
| 44 | --infodir=/usr/share/info \
|
|---|
| 45 | --libdir=/usr/lib \
|
|---|
| 46 | --libexecdir=/usr/lib \
|
|---|
| 47 | --localstatedir=/var \
|
|---|
| 48 | --mandir=/usr/share/man \
|
|---|
| 49 | --sbindir=/usr/sbin \
|
|---|
| 50 | --sysconfdir=/etc \
|
|---|
| [c57fbc9] | 51 | --enable-largefile \
|
|---|
| 52 | --disable-nls \
|
|---|
| [475ad56] | 53 | --with-libnet="$(STAGING_DIR)/usr" \
|
|---|
| 54 | --with-pcap="$(STAGING_DIR)/usr" \
|
|---|
| 55 | );
|
|---|
| 56 | touch $@
|
|---|
| 57 |
|
|---|
| [d419478] | 58 | $(WRKBUILD)/.built:
|
|---|
| 59 | rm -rf $(WRKINST)
|
|---|
| 60 | mkdir -p $(WRKINST)
|
|---|
| 61 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| [475ad56] | 62 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| [d419478] | 63 | DESTDIR="$(WRKINST)" \
|
|---|
| [475ad56] | 64 | all install
|
|---|
| 65 | touch $@
|
|---|
| 66 |
|
|---|
| 67 | $(IPKG_RARPD):
|
|---|
| 68 | install -d -m0755 $(IDIR_RARPD)/usr/sbin
|
|---|
| [d419478] | 69 | $(CP) $(WRKINST)/usr/sbin/rarpd $(IDIR_RARPD)/usr/sbin/
|
|---|
| [475ad56] | 70 | install -d -m0755 $(IDIR_RARPD)/etc/default
|
|---|
| 71 | install -m644 ./files/rarpd.default $(IDIR_RARPD)/etc/default/rarpd
|
|---|
| 72 | install -d -m0755 $(IDIR_RARPD)/etc/init.d
|
|---|
| [c8b93bd] | 73 | install -m755 ./files/rarpd.init $(IDIR_RARPD)/etc/init.d/S$(PKG_INIT)rarpd
|
|---|
| [475ad56] | 74 | $(RSTRIP) $(IDIR_RARPD)
|
|---|
| 75 | $(IPKG_BUILD) $(IDIR_RARPD) $(PACKAGE_DIR)
|
|---|