21 |
|
|
22 |
sminclude mbuild mtools |
sminclude mbuild mtools |
23 |
|
|
|
ENABLED_PLUGINS="auth-pam down-root" |
|
|
|
|
24 |
SRC_URI=( |
SRC_URI=( |
25 |
http://swupdate.openvpn.org/community/releases/${SRCFILE} |
http://swupdate.openvpn.org/community/releases/${SRCFILE} |
26 |
mirror://${PNAME}/${SRCFILE} |
mirror://${PNAME}/${SRCFILE} |
34 |
{ |
{ |
35 |
cd ${SRCDIR} |
cd ${SRCDIR} |
36 |
|
|
37 |
mconfigure --enable-lzo --enable-crypto --enable-ssl --enable-pthread --enable-iproute2 || die |
mconfigure \ |
38 |
mmake || die |
--enable-lzo \ |
39 |
|
--enable-crypto \ |
40 |
|
--enable-ssl \ |
41 |
|
--enable-pthread \ |
42 |
|
--enable-iproute2 \ |
43 |
|
--enable-plugin-auth-pam \ |
44 |
|
--enable-plugin-down-root \ |
45 |
|
|| die |
46 |
|
|
47 |
local plugin |
mmake || die |
|
for plugin in ${ENABLED_PLUGINS} |
|
|
do |
|
|
mmake -C plugin/${plugin} || die ${plugin} |
|
|
done |
|
48 |
} |
} |
49 |
|
|
50 |
src_install() |
src_install() |
51 |
{ |
{ |
52 |
cd ${SRCDIR} |
cd ${SRCDIR} |
53 |
|
mmake DESTDIR=${BINDIR} install || die |
54 |
|
|
|
# needed directories |
|
55 |
minstalldir /usr/share/doc/${PNAME}-${PVER}/sample-config-files || die |
minstalldir /usr/share/doc/${PNAME}-${PVER}/sample-config-files || die |
56 |
|
minstallfile sample-config-files/\* /usr/share/doc/${PNAME}-${PVER}/sample-config-files || die |
57 |
minstalldir /usr/share/doc/${PNAME}-${PVER}/sample-scripts || die |
minstalldir /usr/share/doc/${PNAME}-${PVER}/sample-scripts || die |
58 |
minstalldir /usr/$(mlibdir)/openvpn/plugins || die |
minstallfile sample-scripts/\* /usr/share/doc/${PNAME}-${PVER}/sample-scripts || die |
|
|
|
|
mmake DESTDIR=${BINDIR} install || die |
|
|
|
|
|
minstallfile sample-config-files/\* \ |
|
|
/usr/share/doc/${PNAME}-${PVER}/sample-config-files || die |
|
|
minstallfile sample-scripts/\* \ |
|
|
/usr/share/doc/${PNAME}-${PVER}/sample-scripts || die |
|
|
|
|
|
# install enabled plugins |
|
|
local plugin |
|
|
for plugin in ${ENABLED_PLUGINS} |
|
|
do |
|
|
minstallexec plugin/${plugin}/openvpn-${plugin}.so \ |
|
|
/usr/$(mlibdir)/openvpn/plugins || die ${plugin} |
|
|
cp plugin/${plugin}/{,${plugin}}README || die ${plugin} |
|
|
minstalldocs plugin/${plugin}/${plugin}.README || die ${plugin} |
|
|
done |
|
59 |
|
|
60 |
# initscript stuff |
# initscript stuff |
61 |
mkeepdir /etc/openvpn || die |
mkeepdir /etc/openvpn || die |