2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/
16 PKG_MD5SUM:=0e5fe1199161eeef214c43eca7eec9a1
18 include $(INCLUDE_DIR)/package.mk
23 TITLE:=Ad-Hoc Configuration Protocol daemon
24 URL:=http://www.pps.jussieu.fr/~jch/software/ahcp/
25 DEPENDS:=+kmod-ipv6 +ip
28 define Package/ahcpd/description
29 Ahcpd is a daemon for configuring an IPv6 network using the Ad-Hoc
30 Configuration Protocol (AHCP). AHCP is designed for wireless mesh
31 networks, where IPv6 autoconfiguration and DHCPv6 do not work, but may
32 also be used on wired networks.
35 define Build/Configure
36 ( cd $(PKG_BUILD_DIR); \
37 $(SED) 's,/usr/local/bin/,/usr/lib/ahcp/,g' ahcpd.c ; \
38 $(SED) 's,/usr/local/lib/ahcp/,/usr/lib/ahcp/,g' ahcp-config.sh ; \
43 $(MAKE) -C $(PKG_BUILD_DIR) \
45 CFLAGS="$(TARGET_CFLAGS)" \
49 define Package/ahcpd/conffiles
53 define Package/ahcpd/install
54 $(INSTALL_DIR) $(1)/usr/bin
55 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcp-generate{,-address} $(1)/usr/bin/
56 $(INSTALL_DIR) $(1)/usr/lib/ahcp
57 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcp{,-dummy}-config.sh $(1)/usr/lib/ahcp/
58 $(INSTALL_DIR) $(1)/usr/sbin
59 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcpd $(1)/usr/sbin/
60 $(INSTALL_DIR) $(1)/etc/config
61 $(INSTALL_DATA) ./files/ahcpd.config $(1)/etc/config/ahcpd
62 $(INSTALL_DIR) $(1)/etc/init.d
63 $(INSTALL_BIN) ./files/ahcpd.init $(1)/etc/init.d/ahcpd
66 $(eval $(call BuildPackage,ahcpd))