diff options
author | Jason A. Donenfeld <zx2c4@gentoo.org> | 2017-03-17 14:49:18 +0100 |
---|---|---|
committer | Jason A. Donenfeld <zx2c4@gentoo.org> | 2017-03-17 14:56:14 +0100 |
commit | 7f68c86d93d5f69d775bceb3941b3a3b46672eb1 (patch) | |
tree | b461a335b70f8d07bda55ab1e3cc54fbd568a097 /net-vpn/peervpn | |
parent | dev-ruby/nexpose: Initial version (diff) | |
download | gentoo-7f68c86d93d5f69d775bceb3941b3a3b46672eb1.tar.gz gentoo-7f68c86d93d5f69d775bceb3941b3a3b46672eb1.tar.bz2 gentoo-7f68c86d93d5f69d775bceb3941b3a3b46672eb1.zip |
Move VPN packages into net-vpn/
Diffstat (limited to 'net-vpn/peervpn')
-rw-r--r-- | net-vpn/peervpn/Manifest | 1 | ||||
-rw-r--r-- | net-vpn/peervpn/files/peervpn.initd | 26 | ||||
-rw-r--r-- | net-vpn/peervpn/files/peervpn.logrotated | 7 | ||||
-rw-r--r-- | net-vpn/peervpn/files/peervpn.service | 12 | ||||
-rw-r--r-- | net-vpn/peervpn/metadata.xml | 10 | ||||
-rw-r--r-- | net-vpn/peervpn/peervpn-0.044-r2.ebuild | 50 |
6 files changed, 106 insertions, 0 deletions
diff --git a/net-vpn/peervpn/Manifest b/net-vpn/peervpn/Manifest new file mode 100644 index 000000000000..0f3a680efa4f --- /dev/null +++ b/net-vpn/peervpn/Manifest @@ -0,0 +1 @@ +DIST peervpn-0.044.tar.gz 81948 SHA256 9d2afc4b5b2b456dee386c80c5d37c32cd7c91d72c3a784d6d99f3d0f28d21d8 SHA512 5dd8e056287a905f3aaddf93d6dad917047e6f7da30942f412ff7b2846afd26fb9f4e500cfcb76966b4045db2a37096f1aa43b87e777ff31c2e467aa0415cdba WHIRLPOOL 7935a7826ec632d0b378099fccce6bf5cb08bc5a8d3ce5d3e102075bc81eed963386f823f42a67b175d7df393a7dd5c0136807f6a5b580371d96fdbee0723bd7 diff --git a/net-vpn/peervpn/files/peervpn.initd b/net-vpn/peervpn/files/peervpn.initd new file mode 100644 index 000000000000..b02458ae16ca --- /dev/null +++ b/net-vpn/peervpn/files/peervpn.initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="peervpn server" +pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"} +logfile=${logfile:-"/var/log/${SVCNAME}/${SVCNAME}.log"} +user=${SVCNAME} +group=${SVCNAME} + +command="/usr/sbin/${SVCNAME}" +command_args="${command_args:-/etc/peervpn/peervpn.conf}" +command_background="true" +# peervpn will drop privileges based on user and group config file settings +start_stop_daemon_args=" + --stdout ${logfile} + --stderr ${logfile}" + +depend() { + need net + after net +} + +start_pre() { + checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}" +} diff --git a/net-vpn/peervpn/files/peervpn.logrotated b/net-vpn/peervpn/files/peervpn.logrotated new file mode 100644 index 000000000000..e99669c91358 --- /dev/null +++ b/net-vpn/peervpn/files/peervpn.logrotated @@ -0,0 +1,7 @@ +/var/log/peervpn/peervpn.log { + missingok + size 5M + rotate 3 + compress + copytruncate +} diff --git a/net-vpn/peervpn/files/peervpn.service b/net-vpn/peervpn/files/peervpn.service new file mode 100644 index 000000000000..13c5310f517b --- /dev/null +++ b/net-vpn/peervpn/files/peervpn.service @@ -0,0 +1,12 @@ +[Unit] +Description=peervpn server +Requires=network-online.target +After=network-online.target + +[Service] +Environment=PEERVPN_OPTS="/etc/peervpn/peervpn.conf" +ExecStart=/usr/sbin/peervpn $PEERVPN_OPTS +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/net-vpn/peervpn/metadata.xml b/net-vpn/peervpn/metadata.xml new file mode 100644 index 000000000000..d4216eaa7140 --- /dev/null +++ b/net-vpn/peervpn/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zmedico@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">peervpn/peervpn</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-vpn/peervpn/peervpn-0.044-r2.ebuild b/net-vpn/peervpn/peervpn-0.044-r2.ebuild new file mode 100644 index 000000000000..47b338de404b --- /dev/null +++ b/net-vpn/peervpn/peervpn-0.044-r2.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit systemd toolchain-funcs user + +DESCRIPTION="P2P mesh VPN" +HOMEPAGE="https://github.com/peervpn/peervpn" +EGIT_COMMIT="eb35174277fbf745c5ee0d5875d659dad819adfc" +SRC_URI="https://github.com/peervpn/peervpn/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" +RDEPEND="dev-libs/openssl:0=" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${PN}-${EGIT_COMMIT} + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} +} + +src_prepare() { + default + sed -e 's|^CFLAGS+=-O2||' -i Makefile || die +} + +src_compile() { + emake CC=$(tc-getCC) || die +} + +src_install() { + dosbin ${PN} + + insinto /etc/${PN} + newins peervpn.conf peervpn.conf.example + fowners ${PN}:${PN} /etc/${PN} + fperms 0700 /etc/${PN} + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + systemd_dounit "${FILESDIR}/${PN}.service" + + keepdir /var/log/${PN} + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotated" "${PN}" +} |