| 1 | # |
| 2 | # Copyright (C) 2010-2012 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:=6rd |
| 11 | PKG_VERSION:=2 |
| 12 | PKG_RELEASE:=1 |
| 13 | |
| 14 | include $(INCLUDE_DIR)/package.mk |
| 15 | |
| 16 | define Package/6rd |
| 17 | SECTION:=ipv6 |
| 18 | CATEGORY:=IPv6 |
| 19 | DEPENDS:=+kmod-ipv6 +kmod-sit |
| 20 | TITLE:=6rd configuration support |
| 21 | MAINTAINER:=Stéphan Kochen <stephan@kochen.nl> |
| 22 | PKGARCH:=all |
| 23 | endef |
| 24 | |
| 25 | define Package/6rd/description |
| 26 | Provides support for 6rd tunnels in /etc/config/network. |
| 27 | Refer to http://wiki.openwrt.org/doc/uci/network for |
| 28 | configuration details. |
| 29 | endef |
| 30 | |
| 31 | define Build/Prepare |
| 32 | mkdir -p $(PKG_BUILD_DIR) |
| 33 | $(CP) ./src/* $(PKG_BUILD_DIR)/ |
| 34 | endef |
| 35 | |
| 36 | define Build/Configure |
| 37 | endef |
| 38 | |
| 39 | define Build/Compile |
| 40 | $(MAKE) -C $(PKG_BUILD_DIR) \ |
| 41 | CC="$(TARGET_CC)" \ |
| 42 | CFLAGS="$(TARGET_CFLAGS) -Wall" \ |
| 43 | LDFLAGS="$(TARGET_LDFLAGS)" |
| 44 | endef |
| 45 | |
| 46 | define Package/6rd/install |
| 47 | $(INSTALL_DIR) $(1)/usr/sbin |
| 48 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/6rdcalc $(1)/usr/sbin/ |
| 49 | $(INSTALL_DIR) $(1)/lib/netifd/proto |
| 50 | $(INSTALL_BIN) ./files/6rd.sh $(1)/lib/netifd/proto/6rd.sh |
| 51 | endef |
| 52 | |
| 53 | $(eval $(call BuildPackage,6rd)) |
| 54 | |