3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=7401faebc6baee9add32608709c54eec
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
)
14 PKG_IPK
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
15 PKG_IPK_DIR
:=$(PKG_BUILD_DIR
)/ipkg
17 PKG_DEPEND
:="openssl, kmod-tun"
18 ifneq ($(BR2_PACKAGE_OPENVPN_LZO
),y
)
19 DISABLE_LZO
:=--disable-lzo
24 ifneq ($(BR2_PACKAGE_OPENVPN_SERVER
),y
)
25 DISABLE_SERVER
:=--disable-server
28 $(DL_DIR
)/$(PKG_SOURCE
):
29 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
31 $(PKG_BUILD_DIR
)/.unpacked
: $(DL_DIR
)/$(PKG_SOURCE
)
32 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
33 touch
$(PKG_BUILD_DIR
)/.unpacked
35 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.unpacked
36 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
37 $(TARGET_CONFIGURE_OPTS
) \
38 CFLAGS
="$(TARGET_CFLAGS)" \
40 --target
=$(GNU_TARGET_NAME
) \
41 --host
=$(GNU_TARGET_NAME
) \
42 --build
=$(GNU_HOST_NAME
) \
47 --libexecdir
=/usr
/lib \
49 --datadir=/usr
/share \
50 --localstatedir
=/var \
57 --disable-management \
63 touch
$(PKG_BUILD_DIR
)/.configured
65 $(PKG_BUILD_DIR
)/openvpn
: $(PKG_BUILD_DIR
)/.configured
66 $(MAKE
) -C
$(PKG_BUILD_DIR
)
68 $(PKG_IPK
): $(PKG_BUILD_DIR
)/openvpn
69 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
70 echo
"Depends: $(PKG_DEPEND)" >> $(PKG_IPK_DIR
)/CONTROL
/control
71 mkdir
-p
$(PKG_IPK_DIR
)/usr
/sbin
72 cp
$(PKG_BUILD_DIR
)/openvpn
$(PKG_IPK_DIR
)/usr
/sbin
/
73 $(STRIP
) $(PKG_IPK_DIR
)/usr
/sbin
/*
74 mkdir
-p
$(PACKAGE_DIR
)
75 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
77 $(IPKG_STATE_DIR
)/info/openvpn.list
: $(PKG_IPK
)
78 $(IPKG
) install $(PKG_IPK
)
80 source
: $(DL_DIR
)/$(PKG_SOURCE
)
81 prepare
: $(PKG_BUILD_DIR
)/.unpacked
83 install: $(IPKG_STATE_DIR
)/info/openvpn.list
86 rm -rf
$(PKG_BUILD_DIR
)