[packages] quicktun: Update QuickTun to version 2.1.6
[packages.git] / net / quicktun / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=quicktun
4 PKG_VERSION:=2.1.6
5 PKG_RELEASE:=1
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
8 PKG_SOURCE_URL:=http://oss.ucis.nl/quicktun/src
9 PKG_MD5SUM:=04e322b431235b18a091438d9a880a9b
10
11 PKG_BUILD_DEPENDS:=nacl
12
13 include $(INCLUDE_DIR)/package.mk
14
15 define Package/quicktun
16   SECTION:=net
17   CATEGORY:=Network
18   TITLE:=QuickTun is a simple and secure VPN software
19   URL:=http://wiki.ucis.nl/QuickTun
20   SUBMENU:=VPN
21 endef
22
23 define Package/quicktun/description
24  QuickTun is a simple and secure VPN software
25 endef
26
27 define Package/quicktun/conffiles
28 /etc/config/quicktun
29 endef
30
31 define Build/Compile
32         ( \
33                 cd $(PKG_BUILD_DIR); \
34                 mkdir -p obj out; \
35                 \
36                 export CPATH=$(STAGING_DIR)/usr/include/nacl; \
37                 \
38                 $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -c -DCOMBINED_BINARY        src/proto.raw.c         -o obj/proto.raw.o; \
39                 $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -c -DCOMBINED_BINARY        src/proto.nacl0.c       -o obj/proto.nacl0.o; \
40                 $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -c -DCOMBINED_BINARY        src/proto.nacltai.c     -o obj/proto.nacltai.o; \
41                 $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -c -DCOMBINED_BINARY        src/run.combined.c      -o obj/run.combined.o; \
42                 $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -c                          src/common.c            -o obj/common.o; \
43                 $(TARGET_CC)  $(TARGET_LDFLAGS) -o out/quicktun.combined obj/common.o obj/run.combined.o obj/proto.raw.o obj/proto.nacl0.o obj/proto.nacltai.o \
44                         -lnacl; \
45                 \
46                 $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) -o out/quicktun.keypair     src/keypair.c           -lnacl \
47         )
48 endef
49
50 define Package/quicktun/install
51         $(INSTALL_DIR) $(1)/usr/sbin
52         $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/quicktun.{combined,keypair} $(1)/usr/sbin/
53         $(LN) quicktun.combined $(1)/usr/sbin/quicktun
54
55         $(INSTALL_DIR) $(1)/etc/init.d/
56         $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
57         $(INSTALL_DIR) $(1)/etc/config
58         $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
59 endef
60
61 $(eval $(call BuildPackage,quicktun))