aboutsummaryrefslogtreecommitdiffstats
path: root/package/openvpn/openvpn.mk
blob: bfacc4185f6d5ec469fea3c0af5adb4e47a4d084 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#############################################################
#
# openvpn
#
#############################################################

OPENVPN_VERSION = 2.0.9
OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.gz
OPENVPN_SITE = http://openvpn.net/release
OPENVPN_DEPENDENCIES = lzo openssl

OPENVPN_CONF_OPT = --enable-small

ifeq ($(BR2_PTHREADS_NATIVE),y)
	OPENVPN_CONF_OPT += --enable-threads=posix
else
	OPENVPN_CONF_OPT += --enable-pthread
endif

$(eval $(call AUTOTARGETS,package,openvpn))

$(OPENVPN_TARGET_INSTALL_TARGET):
	$(call MESSAGE,"Installing")
	$(INSTALL) -m 755 $(OPENVPN_DIR)/openvpn \
		$(TARGET_DIR)/usr/sbin/openvpn
	if [ ! -f $(TARGET_DIR)/etc/init.d/openvpn ]; then \
		$(INSTALL) -m 755 -D package/openvpn/openvpn.init \
			$(TARGET_DIR)/etc/init.d/openvpn; \
	fi
	touch $@

$(OPENVPN_TARGET_UNINSTALL):
	$(call MESSAGE,"Uninstalling")
	rm -f $(TARGET_DIR)/usr/sbin/openvpn
	rm -f $(TARGET_DIR)/etc/init.d/openvpn
	rm -f $(OPENVPN_TARGET_INSTALL_TARGET) $(OPENVPN_HOOK_POST_INSTALL)