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:=627ec199784c60e5250651f82511fff2
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 +librt
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_DIR) $(1)/usr/lib/ahcp
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcp-config.sh $(1)/usr/lib/ahcp/
57 $(INSTALL_DIR) $(1)/usr/sbin
58 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcpd $(1)/usr/sbin/
59 $(INSTALL_DIR) $(1)/etc/config
60 $(INSTALL_DATA) ./files/ahcpd.config $(1)/etc/config/ahcpd
61 $(INSTALL_DIR) $(1)/etc/init.d
62 $(INSTALL_BIN) ./files/ahcpd.init $(1)/etc/init.d/ahcpd
65 $(eval $(call BuildPackage,ahcpd))