21a3a91b77eb784e2ae0368a1fbcfd34137ad2ed
[openwrt/svn-archive/archive.git] / ipv6 / dibbler / Makefile
1 #
2 # Copyright (C) 2006-2010 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:=dibbler
11 PKG_VERSION:=0.7.3
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
15 PKG_SOURCE_URL:=http://klub.com.pl/dhcpv6/dibbler/
16 PKG_MD5SUM:=39be72da38c2e6d33fd43a2811a276b1
17
18 PKG_FIXUP:=libtool
19 PKG_LIBTOOL_PATHS:=poslib
20
21 include $(INCLUDE_DIR)/package.mk
22
23 # add dependency on 2.6 since recent dibbler needs <linux/ip_mp_alg.h>
24 define Package/dibbler/Default
25 SECTION:=ipv6
26 CATEGORY:=IPv6
27 DEPENDS:=+uclibcxx @LINUX_2_6
28 TITLE:=Dibbler, a portable DHCPv6 implementation
29 URL:=http://klub.com.pl/dhcpv6/
30 endef
31
32 define Package/dibbler/Default/description
33 Dibbler is a portable DHCPv6 implementation. It supports stateful (i.e.
34 IPv6 address granting) as well as stateless (i.e. option granting)
35 autoconfiguration for IPv6.
36 endef
37
38 define Package/dibbler-client
39 $(call Package/dibbler/Default)
40 TITLE+= (client)
41 endef
42
43 define Package/dibbler-client/description
44 $(call Package/dibbler/Default/description)
45 This package contains the dibbler client.
46 endef
47
48 define Package/dibbler-relay
49 $(call Package/dibbler/Default)
50 TITLE+= (relay)
51 endef
52
53 define Package/dibbler-relay/description
54 $(call Package/dibbler/Default/description)
55 This package contains the dibbler relay.
56 endef
57
58 define Package/dibbler-server
59 $(call Package/dibbler/Default)
60 TITLE+= (server)
61 endef
62
63 define Package/dibbler-server/description
64 $(call Package/dibbler/Default/description)
65 This package contains the dibbler server.
66 endef
67
68 define Build/Configure
69 (cd $(PKG_BUILD_DIR)/poslib; \
70 $(TARGET_CONFIGURE_OPTS) \
71 CFLAGS="$(TARGET_CFLAGS)" \
72 CPPFLAGS="$(TARGET_CPPFLAGS)" \
73 LDFLAGS="$(TARGET_LDFLAGS)" \
74 ./configure \
75 --target=$(GNU_TARGET_NAME) \
76 --host=$(GNU_TARGET_NAME) \
77 --build=$(GNU_HOST_NAME) \
78 --program-prefix="" \
79 --program-suffix="" \
80 --prefix=/usr \
81 --exec-prefix=/usr \
82 --bindir=/usr/bin \
83 --datadir=/usr/share \
84 --includedir=/usr/include \
85 --infodir=/usr/share/info \
86 --libdir=/usr/lib \
87 --libexecdir=/usr/lib \
88 --localstatedir=/var \
89 --mandir=/usr/share/man \
90 --sbindir=/usr/sbin \
91 --sysconfdir=/etc \
92 $(DISABLE_NLS) \
93 $(DISABLE_LARGEFILE) \
94 );
95 endef
96
97 # link stuff missing from uClibc++ but present in stdc++ statically
98 CXX_LIBS:= -nodefaultlibs -luClibc++ -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -lgcc
99
100 define Build/Compile
101 $(MAKE) -C $(PKG_BUILD_DIR) \
102 $(TARGET_CONFIGURE_OPTS) \
103 PORT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -fno-builtin" \
104 PORT_LDFLAGS="$(TARGET_LDFLAGS)" \
105 DEBUGINFO= \
106 CXXLD="$(TARGET_CC)" \
107 CLNT_LIBS="$(CXX_LIBS)" \
108 SRV_LIBS="$(CXX_LIBS)" \
109 server client relay
110 endef
111
112 define Package/dibbler-client/install
113 $(INSTALL_DIR) $(1)/usr/sbin
114 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-client $(1)/usr/sbin/
115 endef
116
117 define Package/dibbler-relay/install
118 $(INSTALL_DIR) $(1)/usr/sbin
119 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-relay $(1)/usr/sbin/
120 endef
121
122 define Package/dibbler-server/install
123 $(INSTALL_DIR) $(1)/usr/sbin
124 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-server $(1)/usr/sbin/
125 endef
126
127 $(eval $(call BuildPackage,dibbler-client))
128 $(eval $(call BuildPackage,dibbler-relay))
129 $(eval $(call BuildPackage,dibbler-server))