Fix installation of configuration files
[openwrt/svn-archive/archive.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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ahcpd
12 PKG_VERSION:=0.4
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/
17 PKG_MD5SUM:=25a4e415ff9b18964acfb5a322e290bb
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/ahcpd
22 SECTION:=ipv6
23 CATEGORY:=IPv6
24 TITLE:=Ad-Hoc Configuration Protocol daemon
25 URL:=http://www.pps.jussieu.fr/~jch/software/ahcp/
26 DEPENDS:=+kmod-ipv6 +ip
27 endef
28
29 define Package/ahcpd/description
30 Ahcpd is a daemon for configuring an IPv6 network using the Ad-Hoc
31 Configuration Protocol (AHCP). AHCP is designed for wireless mesh
32 networks, where IPv6 autoconfiguration and DHCPv6 do not work, but may
33 also be used on wired networks.
34 endef
35
36 define Build/Configure
37 ( cd $(PKG_BUILD_DIR); \
38 $(SED) 's,/usr/local/bin/,/usr/lib/ahcp/,g' ahcpd.c ; \
39 $(SED) 's,/usr/local/lib/ahcp/,/usr/lib/ahcp/,g' ahcp-config.sh ; \
40 )
41 endef
42
43 define Build/Compile
44 $(MAKE) -C $(PKG_BUILD_DIR) \
45 CC="$(TARGET_CC)" \
46 CFLAGS="$(TARGET_CFLAGS)" \
47 all
48 endef
49
50 define Package/ahcpd/conffiles
51 /etc/config/ahcpd
52 endef
53
54 define Package/ahcpd/install
55 $(INSTALL_DIR) $(1)/usr/bin
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcp-generate{,-address} $(1)/usr/bin/
57 $(INSTALL_DIR) $(1)/usr/lib/ahcp
58 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcp{,-dummy}-config.sh $(1)/usr/lib/ahcp/
59 $(INSTALL_DIR) $(1)/usr/sbin
60 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ahcpd $(1)/usr/sbin/
61 $(INSTALL_DIR) $(1)/etc/config
62 $(INSTALL_DATA) ./files/ahcpd.config $(1)/etc/config/ahcpd
63 $(INSTALL_DIR) $(1)/etc/init.d
64 $(INSTALL_BIN) ./files/ahcpd.init $(1)/etc/init.d/ahcpd
65 endef
66
67 $(eval $(call BuildPackage,ahcpd))