[package] ruby: fix path to libiconv
[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:=6
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:=+libstdcpp @!LINUX_2_4 +libpthread
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-poslib
39 $(call Package/dibbler/Default)
40 TITLE+= (helper lib)
41 endef
42
43 define Package/dibbler-poslib/description
44 $(call Package/dibbler/Default/description)
45 This package contains the pos library.
46 endef
47
48 define Package/dibbler-client
49 $(call Package/dibbler/Default)
50 TITLE+= (client)
51 endef
52
53 define Package/dibbler-client/description
54 $(call Package/dibbler/Default/description)
55 This package contains the dibbler client.
56 endef
57
58 define Package/dibbler-relay
59 $(call Package/dibbler/Default)
60 TITLE+= (relay)
61 endef
62
63 define Package/dibbler-relay/description
64 $(call Package/dibbler/Default/description)
65 This package contains the dibbler relay.
66 endef
67
68 define Package/dibbler-server
69 $(call Package/dibbler/Default)
70 DEPENDS += +dibbler-poslib
71 TITLE+= (server)
72 endef
73
74 define Package/dibbler-server/description
75 $(call Package/dibbler/Default/description)
76 This package contains the dibbler server.
77 endef
78
79 define Build/Configure
80 (cd $(PKG_BUILD_DIR)/poslib; \
81 $(TARGET_CONFIGURE_OPTS) \
82 CFLAGS="$(TARGET_CFLAGS)" \
83 CPPFLAGS="$(TARGET_CPPFLAGS)" \
84 LDFLAGS="$(TARGET_LDFLAGS)" \
85 ./configure \
86 --target=$(GNU_TARGET_NAME) \
87 --host=$(GNU_TARGET_NAME) \
88 --build=$(GNU_HOST_NAME) \
89 --program-prefix="" \
90 --program-suffix="" \
91 --prefix=/usr \
92 --exec-prefix=/usr \
93 --bindir=/usr/bin \
94 --datadir=/usr/share \
95 --includedir=/usr/include \
96 --infodir=/usr/share/info \
97 --libdir=/usr/lib \
98 --libexecdir=/usr/lib \
99 --localstatedir=/var \
100 --mandir=/usr/share/man \
101 --sbindir=/usr/sbin \
102 --sysconfdir=/etc \
103 $(DISABLE_NLS) \
104 $(DISABLE_LARGEFILE) \
105 );
106 endef
107
108 define Build/Compile
109 $(MAKE) -C $(PKG_BUILD_DIR) \
110 $(TARGET_CONFIGURE_OPTS) \
111 PORT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
112 PORT_LDFLAGS="$(TARGET_LDFLAGS)" \
113 DEBUGINFO= \
114 server client relay
115 endef
116
117 define Package/dibbler-poslib/install
118 $(INSTALL_DIR) $(1)/usr/lib
119 $(CP) $(PKG_BUILD_DIR)/./poslib/poslib/.libs/libposlib.so* $(1)/usr/lib/
120 endef
121
122 define Package/dibbler-client/install
123 $(INSTALL_DIR) $(1)/usr/sbin
124 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-client $(1)/usr/sbin/
125 endef
126
127 define Package/dibbler-relay/install
128 $(INSTALL_DIR) $(1)/usr/sbin
129 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-relay $(1)/usr/sbin/
130 endef
131
132 define Package/dibbler-server/install
133 $(INSTALL_DIR) $(1)/usr/sbin
134 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-server $(1)/usr/sbin/
135 $(INSTALL_DIR) $(1)/etc/init.d
136 $(INSTALL_BIN) ./files/dibbler.init $(1)/etc/init.d/
137 endef
138
139 $(eval $(call BuildPackage,dibbler-poslib))
140 $(eval $(call BuildPackage,dibbler-client))
141 $(eval $(call BuildPackage,dibbler-relay))
142 $(eval $(call BuildPackage,dibbler-server))