[PATCH] ahcpd: fix ticket 3550
[packages.git] / ipv6 / ahcpd / Makefile
1
2 # Copyright (C) 2007 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:=ahcpd
11 PKG_VERSION:=0.5
12 PKG_RELEASE:=2
13
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
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/ahcpd
21   SECTION:=ipv6
22   CATEGORY:=IPv6
23   TITLE:=Ad-Hoc Configuration Protocol daemon
24   URL:=http://www.pps.jussieu.fr/~jch/software/ahcp/
25   DEPENDS:=+kmod-ipv6 +ip
26 endef
27
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.
33 endef
34
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 ; \
39         )
40 endef
41
42 define Build/Compile
43         $(MAKE) -C $(PKG_BUILD_DIR) \
44                 CC="$(TARGET_CC)" \
45                 CFLAGS="$(TARGET_CFLAGS)" \
46                 all
47 endef
48
49 define Package/ahcpd/conffiles
50 /etc/config/ahcpd
51 endef
52
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
64 endef
65
66 $(eval $(call BuildPackage,ahcpd))