Files
gentoo-zh/net-proxy/make-proxy/make-proxy-2.0.0.ebuild
T
2020-01-07 13:06:21 +08:00

62 lines
1.1 KiB
Bash

# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=7
inherit systemd
DESCRIPTION="Socks5 proxy written in Erlang"
HOMEPAGE="https://github.com/yueyoum/make-proxy"
SRC_URI="https://github.com/yueyoum/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="make-proxy"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+client server systemd"
DEPEND="dev-lang/erlang
systemd? ( sys-apps/systemd ) "
RDEPEND="${DEPEND}"
src_compile() {
if use client ; then
make client
fi
if use server ; then
make server
fi
}
src_install() {
insinto "/opt/${PN}"
doins -r .
insinto "/etc/${PN}"
if use client ; then
newins client.config.example client.config
doinitd "${FILESDIR}/mp-client"
fi
if use server ; then
newins server.config.example server.config
doinitd "${FILESDIR}/mp-server"
fi
newdoc README.md "${PN}".md
if use systemd ; then
if use client ; then
systemd_dounit "${FILESDIR}/mp-client.service"
fi
if use server ; then
systemd_dounit "${FILESDIR}/mp-server.service"
fi
fi
}