lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (2065B)


      1 #
      2 # Copyright (C) 2016 OpenWrt.org
      3 #
      4 # This is free software, licensed under the GNU General Public License v2.
      5 # See /LICENSE for more information.
      6 #
      7 
      8 include $(TOPDIR)/rules.mk
      9 
     10 PKG_NAME:=dhcp-forwarder
     11 PKG_VERSION:=0.11
     12 PKG_RELEASE:=1
     13 
     14 PKG_SOURCE_URL:=@SAVANNAH/dhcp-fwd/
     15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
     16 PKG_MD5SUM:=9d1ea7939fef93ae7d7caef43397a908
     17 
     18 PKG_LICENSE:=GPL-2.0
     19 PKG_LICENSE_FILES:=COPYING
     20 
     21 PKG_MAINTAINER:=Scott K Logan <logans@cottsay.net>
     22 
     23 PKG_BUILD_PARALLEL:=1
     24 PKG_INSTALL:=1
     25 
     26 include $(INCLUDE_DIR)/package.mk
     27 
     28 define Package/dhcp-forwarder
     29   SECTION:=net
     30   CATEGORY:=Network
     31   SUBMENU:=IP Addresses and Names
     32   TITLE:=DHCP relay agent
     33   URL:=http://www.nongnu.org/dhcp-fwd/
     34   USERID:=dhcp-fwd=375:dhcp-fwd=375
     35 endef
     36 
     37 define Package/dhcp-forwarder/description
     38   This program forwards DHCP messages between subnets with different sublayer
     39   broadcast domains. It is similarly to the DHCP relay agent dhcrelay of ISC's
     40   DHCP, but has the following features which are important for me:
     41 
     42   - Runs as non-root in a chroot-jail
     43   - Uses "normal" AF_INET sockets; this allows to uses packetfilters to filter
     44     incoming messages.
     45   - The DHCP agent IDs can be defined freely
     46   - Has a small memory footprint when using dietlibc
     47 
     48   It tries to be RFC 2131/2132 and 3046 compliant. Probably it works with BOOTP
     49   (RFC 951) also, but since the handling of the giaddr field is described
     50   misleading (see RFC 1542), there may occur problems.
     51 endef
     52 
     53 define Package/dhcp-forwarder/conffiles
     54 /etc/dhcp-fwd.conf
     55 endef
     56 
     57 CONFIGURE_ARGS += \
     58 	--disable-dietlibc \
     59 
     60 define Build/Compile
     61 	$(MAKE) -C $(PKG_BUILD_DIR) \
     62 	  DESTDIR="$(PKG_INSTALL_DIR)" \
     63 	  cfg_filename="/etc/dhcp-fwd.conf" \
     64 	  all install
     65 endef
     66 
     67 define Package/dhcp-forwarder/install
     68 	$(INSTALL_DIR) $(1)/usr/bin $(1)/etc $(1)/etc/init.d
     69 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd $(1)/usr/bin/
     70 	$(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/dhcp-fwd.conf $(1)/etc/
     71 	$(INSTALL_BIN) ./files/dhcp-fwd.init $(1)/etc/init.d/dhcp-fwd
     72 endef
     73 
     74 $(eval $(call BuildPackage,dhcp-forwarder))