Annotation of /branches/magellan-next/extras/openvpn/openvpn-2.1.3-r1.smage2
Parent Directory | Revision Log
Revision 7991 -
(hide annotations)
(download)
Tue Jun 28 14:09:04 2011 UTC (13 years ago) by niro
File size: 2042 byte(s)
Tue Jun 28 14:09:04 2011 UTC (13 years ago) by niro
File size: 2042 byte(s)
auto added: ver bump to 2.1.3-r1
1 | niro | 7991 | # $Id$ |
2 | |||
3 | PNAME="openvpn" | ||
4 | PVER="2.1.3" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCATEGORIE="net-vpn" | ||
8 | STATE="unstable" | ||
9 | |||
10 | DESCRIPTION="openvpn - an OpenSource SSL-VPN client." | ||
11 | HOMEPAGE="http://openvpn.net/" | ||
12 | |||
13 | DEPEND=">= dev-libs/lzo-2 | ||
14 | >= dev-libs/openssl-1.0.0 | ||
15 | >= sys-apps/iproute2-2.6 | ||
16 | >= sys-libs/pam-1.1" | ||
17 | |||
18 | SDEPEND=">= virtual/kernel-headers" | ||
19 | |||
20 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
21 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
22 | |||
23 | sminclude mbuild mtools | ||
24 | |||
25 | ENABLED_PLUGINS="auth-pam down-root" | ||
26 | |||
27 | # rc-script cvs revision | ||
28 | RC_REV=1.2 | ||
29 | |||
30 | SRC_URI=( | ||
31 | http://openvpn.net/release/${SRCFILE} | ||
32 | mirror://${PNAME}/${SRCFILE} | ||
33 | mirror://${PNAME}/openvpn.rc-${RC_REV} | ||
34 | ) | ||
35 | |||
36 | UP2DATE="updatecmd 'http://openvpn.net/release/?C=M;O=A' | grep ${PNAME}- | lasttarball gz" | ||
37 | |||
38 | src_compile() | ||
39 | { | ||
40 | cd ${SRCDIR} | ||
41 | |||
42 | mconfigure --enable-lzo --enable-crypto --enable-ssl --enable-pthread --enable-iproute2 || die | ||
43 | mmake || die | ||
44 | |||
45 | local plugin | ||
46 | for plugin in ${ENABLED_PLUGINS} | ||
47 | do | ||
48 | mmake -C plugin/${plugin} || die ${plugin} | ||
49 | done | ||
50 | } | ||
51 | |||
52 | src_install() | ||
53 | { | ||
54 | cd ${SRCDIR} | ||
55 | |||
56 | # needed directories | ||
57 | minstalldir /usr/share/doc/${PNAME}-${PVER}/sample-config-files || die | ||
58 | minstalldir /usr/share/doc/${PNAME}-${PVER}/sample-scripts || die | ||
59 | minstalldir /usr/$(mlibdir)/openvpn/plugins || die | ||
60 | |||
61 | mmake DESTDIR=${BINDIR} install || die | ||
62 | |||
63 | minstallfile sample-config-files/\* \ | ||
64 | /usr/share/doc/${PNAME}-${PVER}/sample-config-files || die | ||
65 | minstallfile sample-scripts/\* \ | ||
66 | /usr/share/doc/${PNAME}-${PVER}/sample-scripts || die | ||
67 | |||
68 | # install enabled plugins | ||
69 | local plugin | ||
70 | for plugin in ${ENABLED_PLUGINS} | ||
71 | do | ||
72 | minstallexec plugin/${plugin}/openvpn-${plugin}.so \ | ||
73 | /usr/$(mlibdir)/openvpn/plugins || die ${plugin} | ||
74 | cp plugin/${plugin}/{,${plugin}}README || die ${plugin} | ||
75 | minstalldocs plugin/${plugin}/${plugin}.README || die ${plugin} | ||
76 | done | ||
77 | |||
78 | # initscript stuff | ||
79 | mkeepdir /etc/openvpn || die | ||
80 | minstallrc openvpn.rc-${RC_REV} openvpn || die | ||
81 | |||
82 | minstalldocs AUTHORS COPYING COPYRIGHT.GPL ChangeLog NEWS PORTS README || die | ||
83 | } | ||
84 | |||
85 | postinstall() | ||
86 | { | ||
87 | mstartservice openvpn | ||
88 | } | ||
89 | |||
90 | postremove() | ||
91 | { | ||
92 | [[ ! -f /usr/sbin/openvpn ]] && mstopservice openvpn | ||
93 | } |