upgrade kernel, quagga and openvpn, add licensing info to diag module, fix up jffs2
[openwrt.git] / openwrt / package / openvpn / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=openvpn
6 PKG_VERSION:=2.0_rc21
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=949c51cb6c69da7054613d80042dc5a6
9
10 PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
13 PKG_CAT:=zcat
14 PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
15 PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
16
17 ifneq ($(BR2_PACKAGE_OPENVPN_LZO),y)
18 DISABLE_LZO:=--disable-lzo
19 endif
20
21 ifneq ($(BR2_PACKAGE_OPENVPN_SERVER),y)
22 DISABLE_SERVER:=--disable-server
23 endif
24
25 $(DL_DIR)/$(PKG_SOURCE):
26 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
27
28 $(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE)
29 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
30 touch $(PKG_BUILD_DIR)/.unpacked
31
32 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
33 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
34 $(TARGET_CONFIGURE_OPTS) \
35 CFLAGS="$(TARGET_CFLAGS)" \
36 ./configure \
37 --target=$(GNU_TARGET_NAME) \
38 --host=$(GNU_TARGET_NAME) \
39 --build=$(GNU_HOST_NAME) \
40 --prefix=/usr \
41 --exec-prefix=/usr \
42 --bindir=/usr/bin \
43 --sbindir=/usr/sbin \
44 --libexecdir=/usr/lib \
45 --sysconfdir=/etc \
46 --datadir=/usr/share \
47 --localstatedir=/var \
48 --mandir=/usr/man \
49 --infodir=/usr/info \
50 --program-prefix="" \
51 --disable-pthread \
52 --disable-debug \
53 --disable-plugins \
54 --disable-management \
55 --disable-socks \
56 --disable-http \
57 $(DISABLE_LZO) \
58 $(DISABLE_SERVER) \
59 );
60 touch $(PKG_BUILD_DIR)/.configured
61
62 $(PKG_BUILD_DIR)/openvpn: $(PKG_BUILD_DIR)/.configured
63 $(MAKE) -C $(PKG_BUILD_DIR)
64
65 $(PKG_IPK): $(PKG_BUILD_DIR)/openvpn
66 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
67 mkdir -p $(PKG_IPK_DIR)/usr/sbin
68 cp $(PKG_BUILD_DIR)/openvpn $(PKG_IPK_DIR)/usr/sbin/
69 $(STRIP) $(PKG_IPK_DIR)/usr/sbin/*
70 mkdir -p $(PACKAGE_DIR)
71 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
72
73 $(IPKG_STATE_DIR)/info/openvpn.list: $(PKG_IPK)
74 $(IPKG) install $(PKG_IPK)
75
76 source: $(DL_DIR)/$(PKG_SOURCE)
77 prepare: $(PKG_BUILD_DIR)/.unpacked
78 compile: $(PKG_IPK)
79 install: $(IPKG_STATE_DIR)/info/openvpn.list
80
81 clean:
82 rm -rf $(PKG_BUILD_DIR)
83 rm -f $(PKG_IPK)
This page took 0.044381 seconds and 5 git commands to generate.