packages: add missing conffiles define
[openwrt/svn-archive/archive.git] / ipv6 / gw6c / Makefile
1 #
2 # Copyright (C) 2008-2011 OpenWrt.org
3 #
4
5 include $(TOPDIR)/rules.mk
6
7 PKG_NAME:=gw6c
8 PKG_VERSION:=5.1
9 PKG_RELEASE:=3
10
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
12 PKG_SOURCE_URL:=http://openwrt.linux-appliance.net/sources
13 PKG_MD5SUM:=eeac7292a622681651ec3bd9b2e5b061
14 PKG_BUILD_DIR:=$(BUILD_DIR)/gw6-$(PKG_VERSION)
15
16 include $(INCLUDE_DIR)/package.mk
17
18 define Package/gw6c
19 SECTION:=ipv6
20 CATEGORY:=IPv6
21 DEPENDS:=+libpthread +ip +kmod-tun +kmod-ipv6 +uclibcxx +radvd
22 TITLE:=IPv6 tunnel client software
23 URL:=http://www.go6.net
24 endef
25
26 define Package/gw6c/description
27 Client to configure an IPv6 tunnel to
28 Hexago/freenet6/go6.net's migration broker.
29 endef
30
31 GW6C_OPTS:= \
32 C_COMPILER="$(TARGET_CC) -c -DNO_STDLIBCXX" \
33 COMPILER="$(TARGET_CROSS)g++ -c -DNO_STDLIBCXX" \
34 CPP_FLAGS="$(TARGET_CFLAGS) -fno-builtin -nostdinc++ -I. -Wall -DNDEBUG -I$(STAGING_DIR)/usr/include/uClibc++ $(TARGET_CPPFLAGS)" \
35 RANLIB="$(TARGET_CROSS)ranlib" \
36 ARCHIVER="$(TARGET_CROSS)ar" \
37 C_LINKER="$(TARGET_CC)" \
38 LINKER="$(TARGET_CROSS)g++" \
39 exportdir=$(PKG_BUILD_DIR)/gw6c \
40 export
41
42 define Build/Configure
43 $(INSTALL_DIR) $(PKG_BUILD_DIR)/gw6c/include
44 $(INSTALL_DATA) $(PKG_BUILD_DIR)/gw6c-config/gw6cconfig/gw6c_c_wrapper.h \
45 $(PKG_BUILD_DIR)/gw6c/include
46 endef
47
48 define Build/Compile
49 $(MAKE) -C $(PKG_BUILD_DIR)/gw6c-config \
50 $(GW6C_OPTS)
51 $(MAKE) -C $(PKG_BUILD_DIR)/gw6c-messaging \
52 $(GW6C_OPTS)
53 $(MAKE) -C $(PKG_BUILD_DIR)/tspc-advanced \
54 CC="$(TARGET_CC)" \
55 CFLAGS="$(TARGET_CFLAGS) -fno-builtin -Wall -I$(PKG_BUILD_DIR)/tspc-advanced/include \
56 -I$(PKG_BUILD_DIR)/tspc-advanced/platform/openwrt -I$(PKG_BUILD_DIR)/tspc-advanced" \
57 LDFLAGS="-L$(PKG_BUILD_DIR)/tspc-advanced/gw6cconfig \
58 -L$(PKG_BUILD_DIR)/tspc-advanced/gw6cmessaging \
59 $(TARGET_LDFLAGS) -nodefaultlibs -luClibc++ $(LIBGCC_S)" \
60 target="openwrt" \
61 installdir="$(PKG_INSTALL_DIR)"
62 endef
63
64 define Package/gw6c/install
65 $(INSTALL_DIR) $(1)/usr/sbin
66 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tspc-advanced/bin/$(PKG_NAME) $(1)/usr/sbin
67 $(INSTALL_DIR) $(1)/usr/share/gw6c/template
68 $(CP) ./files/openwrt.sh $(1)/usr/share/gw6c/template
69 $(INSTALL_DIR) $(1)/etc/init.d
70 $(INSTALL_BIN) ./files/gw6c.init $(1)/etc/init.d/gw6c
71 $(INSTALL_DIR) $(1)/etc/config
72 $(INSTALL_CONF) ./files/gw6c.config $(1)/etc/config/gw6c
73 endef
74
75 define Package/gw6c/conffiles
76 /etc/config/gw6c
77 endef
78
79 $(eval $(call BuildPackage,gw6c))