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