Magellan Linux

Contents of /branches/R11-stable/extras/openvpn/openvpn-2.2.2-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 16743 - (show annotations) (download)
Mon Mar 4 12:23:15 2013 UTC (11 years, 2 months ago) by niro
File size: 1893 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="openvpn"
4 PVER="2.2.2"
5 PBUILD="r4"
6
7 PCAT="net-vpn"
8
9 DESCRIPTION="openvpn - an OpenSource SSL-VPN client."
10 HOMEPAGE="http://openvpn.net/"
11
12 DEPEND=">= dev-libs/lzo-2
13 >= dev-libs/openssl-1.0.1e
14 >= sys-apps/iproute2-2.6
15 >= sys-libs/pam-1.1"
16
17 SDEPEND=">= virtual/kernel-headers"
18
19 SRCFILE="${PNAME}-${PVER}.tar.gz"
20 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
21
22 sminclude mbuild mtools
23
24 ENABLED_PLUGINS="auth-pam down-root"
25
26 SRC_URI=(
27 http://swupdate.openvpn.org/community/releases/${SRCFILE}
28 mirror://${PNAME}/${SRCFILE}
29 mirror://${PNAME}/openvpn.service
30 )
31
32 UP2DATE="updatecmd 'http://openvpn.net/release/?C=M;O=A' | grep ${PNAME}- | lasttarball gz"
33
34 src_compile()
35 {
36 cd ${SRCDIR}
37
38 mconfigure --enable-lzo --enable-crypto --enable-ssl --enable-pthread --enable-iproute2 || die
39 mmake || die
40
41 local plugin
42 for plugin in ${ENABLED_PLUGINS}
43 do
44 mmake -C plugin/${plugin} || die ${plugin}
45 done
46 }
47
48 src_install()
49 {
50 cd ${SRCDIR}
51
52 # needed directories
53 minstalldir /usr/share/doc/${PNAME}-${PVER}/sample-config-files || die
54 minstalldir /usr/share/doc/${PNAME}-${PVER}/sample-scripts || die
55 minstalldir /usr/$(mlibdir)/openvpn/plugins || die
56
57 mmake DESTDIR=${BINDIR} install || die
58
59 minstallfile sample-config-files/\* \
60 /usr/share/doc/${PNAME}-${PVER}/sample-config-files || die
61 minstallfile sample-scripts/\* \
62 /usr/share/doc/${PNAME}-${PVER}/sample-scripts || die
63
64 # install enabled plugins
65 local plugin
66 for plugin in ${ENABLED_PLUGINS}
67 do
68 minstallexec plugin/${plugin}/openvpn-${plugin}.so \
69 /usr/$(mlibdir)/openvpn/plugins || die ${plugin}
70 cp plugin/${plugin}/{,${plugin}}README || die ${plugin}
71 minstalldocs plugin/${plugin}/${plugin}.README || die ${plugin}
72 done
73
74 # initscript stuff
75 mkeepdir /etc/openvpn || die
76 minstallunit openvpn.service 'openvpn@.service' || die
77
78 minstalldocs AUTHORS COPYING COPYRIGHT.GPL ChangeLog NEWS PORTS README || die
79 }
80