summaryrefslogtreecommitdiffstats
path: root/rules/openvpn.make
blob: 7356b18c0a04d083cd303d03d0671bd6aaee9b33 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# -*-makefile-*-
#
# Copyright (C) 2007 by Carsten Schlote <c.schlote@konzeptpark.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_OPENVPN) += openvpn

#
# Paths and names
#
OPENVPN_VERSION		:= 2.1.1
OPENVPN			:= openvpn-$(OPENVPN_VERSION)
OPENVPN_SUFFIX		:= tar.gz
OPENVPN_URL		:= http://openvpn.net/release/$(OPENVPN).$(OPENVPN_SUFFIX)
OPENVPN_SOURCE		:= $(SRCDIR)/$(OPENVPN).$(OPENVPN_SUFFIX)
OPENVPN_DIR		:= $(BUILDDIR)/$(OPENVPN)

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

$(OPENVPN_SOURCE):
	@$(call targetinfo)
	@$(call get, OPENVPN)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

OPENVPN_PATH	:= PATH=$(CROSS_PATH)
OPENVPN_ENV 	:= $(CROSS_ENV)

#
# autoconf
#
OPENVPN_AUTOCONF := $(CROSS_AUTOCONF_USR)

ifdef PTXCONF_OPENVPN_LZO
OPENVPN_AUTOCONF += --enable-lzo
else
OPENVPN_AUTOCONF += --disable-lzo
endif

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/openvpn.targetinstall:
	@$(call targetinfo)

	@$(call install_init, openvpn)
	@$(call install_fixup, openvpn,PACKAGE,openvpn)
	@$(call install_fixup, openvpn,PRIORITY,optional)
	@$(call install_fixup, openvpn,VERSION,$(OPENVPN_VERSION))
	@$(call install_fixup, openvpn,SECTION,base)
	@$(call install_fixup, openvpn,AUTHOR,"Carsten Schlote <c.schlote@konzeptpark.de>")
	@$(call install_fixup, openvpn,DEPENDS,)
	@$(call install_fixup, openvpn,DESCRIPTION,missing)

	@$(call install_copy, openvpn, 0, 0, 0755, -, /usr/sbin/openvpn)

	@$(call install_copy, openvpn, 0, 0, 0755, /etc/openvpn)

	@$(call install_finish, openvpn)

	@$(call touch)

# vim: syntax=make