Contents of /trunk/extras/openvpn/openvpn-2.2.2-r1.smage2
Parent Directory | Revision Log
Revision 11075 -
(show annotations)
(download)
Thu Feb 16 23:25:21 2012 UTC (12 years, 7 months ago) by niro
File size: 1931 byte(s)
Thu Feb 16 23:25:21 2012 UTC (12 years, 7 months ago) by niro
File size: 1931 byte(s)
-fixed SRC_URI
1 | # $Id$ |
2 | |
3 | PNAME="openvpn" |
4 | PVER="2.2.2" |
5 | PBUILD="r1" |
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.0 |
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://openvpn.net/release/${SRCFILE} |
28 | http://swupdate.openvpn.org/community/releases/${SRCFILE} |
29 | mirror://${PNAME}/${SRCFILE} |
30 | mirror://${PNAME}/openvpn.service |
31 | ) |
32 | |
33 | UP2DATE="updatecmd 'http://openvpn.net/release/?C=M;O=A' | grep ${PNAME}- | lasttarball gz" |
34 | |
35 | src_compile() |
36 | { |
37 | cd ${SRCDIR} |
38 | |
39 | mconfigure --enable-lzo --enable-crypto --enable-ssl --enable-pthread --enable-iproute2 || die |
40 | mmake || die |
41 | |
42 | local plugin |
43 | for plugin in ${ENABLED_PLUGINS} |
44 | do |
45 | mmake -C plugin/${plugin} || die ${plugin} |
46 | done |
47 | } |
48 | |
49 | src_install() |
50 | { |
51 | cd ${SRCDIR} |
52 | |
53 | # needed directories |
54 | minstalldir /usr/share/doc/${PNAME}-${PVER}/sample-config-files || die |
55 | minstalldir /usr/share/doc/${PNAME}-${PVER}/sample-scripts || die |
56 | minstalldir /usr/$(mlibdir)/openvpn/plugins || die |
57 | |
58 | mmake DESTDIR=${BINDIR} install || die |
59 | |
60 | minstallfile sample-config-files/\* \ |
61 | /usr/share/doc/${PNAME}-${PVER}/sample-config-files || die |
62 | minstallfile sample-scripts/\* \ |
63 | /usr/share/doc/${PNAME}-${PVER}/sample-scripts || die |
64 | |
65 | # install enabled plugins |
66 | local plugin |
67 | for plugin in ${ENABLED_PLUGINS} |
68 | do |
69 | minstallexec plugin/${plugin}/openvpn-${plugin}.so \ |
70 | /usr/$(mlibdir)/openvpn/plugins || die ${plugin} |
71 | cp plugin/${plugin}/{,${plugin}}README || die ${plugin} |
72 | minstalldocs plugin/${plugin}/${plugin}.README || die ${plugin} |
73 | done |
74 | |
75 | # initscript stuff |
76 | mkeepdir /etc/openvpn || die |
77 | minstallunit openvpn.service 'openvpn@.service' || die |
78 | |
79 | minstalldocs AUTHORS COPYING COPYRIGHT.GPL ChangeLog NEWS PORTS README || die |
80 | } |
81 |