revert autotools files touching: it has side effects (closes: #918)
[openwrt/svn-archive/archive.git] / ipv6 / dhcp6 / Makefile
1 #
2 # Copyright (C) 2006 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:=dhcp6
12 PKG_VERSION:=1.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=dhcpv6-linux-$(PKG_VERSION).zip
16 PKG_SOURCE_URL:=@SF/dhcpv6-linux
17 PKG_MD5SUM:=86193dfa62137db3ea459543db4f1102
18 PKG_CAT:=unzip
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/dhcp6/Default
25 SECTION:=ipv6
26 CATEGORY:=IPv6
27 DEPENDS:=+libncurses
28 TITLE:=IPv6 DHCP
29 URL:=http://sourceforge.net/projects/dhcpv6-linux
30 endef
31
32 define Package/dhcp6-client
33 $(call Package/dhcp6/Default)
34 TITLE+= client
35 endef
36
37 define Package/dhcp6-client/conffiles
38 /etc/dhcp6/solicit.conf
39 endef
40
41 define Package/dhcp6-server
42 $(call Package/dhcp6/Default)
43 TITLE+= server
44 endef
45
46 define Package/dhcp6-server/conffiles
47 /etc/dhcpd6/dhcpd6.conf
48 /etc/dhcpd6/leases6.conf
49 /etc/dhcpd6/partial_leases6.conf
50 endef
51
52 define Build/Prepare
53 $(call Build/Prepare/Default)
54 # prevent package from rebuilding
55 find $(PKG_BUILD_DIR) | xargs touch
56 endef
57
58 define Build/Compile
59 $(MAKE) -C $(PKG_BUILD_DIR)/client \
60 CC="$(TARGET_CC)" \
61 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
62 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib"
63 $(MAKE) -C $(PKG_BUILD_DIR)/server \
64 CC="$(TARGET_CC)" \
65 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
66 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib"
67 endef
68
69 define Package/dhcp6-client/install
70 install -d $(1)/usr/sbin $(1)/etc/dhcp6
71 install -m0755 $(PKG_BUILD_DIR)/client/cli $(1)/usr/sbin/dhcp6client
72 install -m0755 $(PKG_BUILD_DIR)/client/solicit.conf $(1)/etc/dhcp6/
73 endef
74
75 define Package/dhcp6-server/install
76 install -d -m0755 $(1)/usr/sbin $(1)/etc/dhcpd6
77 install -m0755 $(PKG_BUILD_DIR)/server/serv $(1)/usr/sbin/dhcpd6
78 install -m0755 $(PKG_BUILD_DIR)/server/*.conf $(1)/etc/dhcpd6/
79 endef
80
81 $(eval $(call BuildPackage,dhcp6-client))
82 $(eval $(call BuildPackage,dhcp6-server))