Drop unused and outdated net-p2p/cjdns
This commit is contained in:
parent
25fdcf3159
commit
1c4a58af00
@ -1 +0,0 @@
|
|||||||
DIST cjdns-v20.1.tar.gz 4073975 BLAKE2B 749f24f0430a97afb57bb15a08ac5cb92aa0202730343b55708f2386f4171c1162deac33f1a7d74904401b00936c07b2c5497963d873047377b9c1dcd4a0a24d SHA512 519835f489359fb677d35040862dece20b75d84716281096f2c32c8531e8d784d852d8e2709d8c67e8098ad819f62c2a2ef1647fbad3e28e3e20f502d23cd3e7
|
|
@ -1,114 +0,0 @@
|
|||||||
# Copyright 1999-2017 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 )
|
|
||||||
|
|
||||||
inherit eutils flag-o-matic linux-info systemd python-single-r1 toolchain-funcs
|
|
||||||
|
|
||||||
DESCRIPTION="Encrypted networking for regular people"
|
|
||||||
HOMEPAGE="https://github.com/cjdelisle/cjdns"
|
|
||||||
SRC_URI="https://github.com/cjdelisle/cjdns/archive/${PN}-v${PV}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="GPL-3"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86"
|
|
||||||
|
|
||||||
IUSE="tools"
|
|
||||||
|
|
||||||
# bunled libuv and libNaCL are slightly different
|
|
||||||
# unbundling is hard task :-/
|
|
||||||
DEPEND=">=net-libs/nodejs-4.6.2
|
|
||||||
${PYTHON_DEPS}"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${PN}-${PN}-v${PV}"
|
|
||||||
|
|
||||||
TOOLS_PATH=/usr/libexec/cjdns
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
linux-info_pkg_setup
|
|
||||||
if ! linux_config_exists; then
|
|
||||||
eerror "Unable to check your kernel for TUN support"
|
|
||||||
else
|
|
||||||
CONFIG_CHECK="~TUN"
|
|
||||||
ERROR_TUN="Your kernel lacks TUN support."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
# Drop -Werror
|
|
||||||
sed -i \
|
|
||||||
-e "/'-Werror',/d" \
|
|
||||||
node_build/make.js || die
|
|
||||||
|
|
||||||
default
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
python-single-r1_pkg_setup
|
|
||||||
tc-export CC
|
|
||||||
./do || die "./do failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
dodoc README.md doc/*.*
|
|
||||||
doman doc/man/cjdroute.conf.5
|
|
||||||
dosbin cjdroute
|
|
||||||
|
|
||||||
newinitd "${FILESDIR}/cjdns.runscript" cjdns
|
|
||||||
systemd_dounit contrib/systemd/cjdns.service
|
|
||||||
|
|
||||||
if use tools; then
|
|
||||||
exeinto ${TOOLS_PATH}
|
|
||||||
doexe contrib/python/cexec
|
|
||||||
doexe contrib/python/cjdnsa
|
|
||||||
doexe contrib/python/cjdnsadminmaker.py
|
|
||||||
doexe contrib/python/cjdnslog
|
|
||||||
doexe contrib/python/drawgraph
|
|
||||||
doexe contrib/python/dumpgraph
|
|
||||||
doexe contrib/python/dumptable
|
|
||||||
doexe contrib/python/findnodes
|
|
||||||
doexe contrib/python/getLinks
|
|
||||||
doexe contrib/python/graphStats
|
|
||||||
doexe contrib/python/ip6topk
|
|
||||||
doexe contrib/python/peerStats
|
|
||||||
doexe contrib/python/pingAll.py
|
|
||||||
doexe contrib/python/pktoip6
|
|
||||||
doexe contrib/python/searches
|
|
||||||
doexe contrib/python/sessionStats
|
|
||||||
doexe contrib/python/trashroutes
|
|
||||||
|
|
||||||
insinto "${TOOLS_PATH}/cjdnsadmin"
|
|
||||||
doins contrib/python/cjdnsadmin/*
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
local config_file="cjdroute.conf"
|
|
||||||
local config_path="${ROOT}etc/${config_file}"
|
|
||||||
|
|
||||||
if [[ ! -e "${config_path}" ]] ; then
|
|
||||||
ebegin "Generating ${config_file}..."
|
|
||||||
(umask 077 && cjdroute --genconf > "${T}/${config_file}") || die "cjdroute --genconf failed"
|
|
||||||
mv "${T}/${config_file}" "${config_path}"
|
|
||||||
eend "${?}" || die "Failed to generate and install ${config_file}"
|
|
||||||
elog "The keys in ${config_path} have been autogenerated during "
|
|
||||||
elog "emerge, they are not defaults and do not need to be overwritten."
|
|
||||||
fi
|
|
||||||
ewarn "Protect ${config_path}! A lost conf file means you have "
|
|
||||||
ewarn "lost your password and connections and anyone who connected "
|
|
||||||
ewarn "to you will no longer be able to connect. A *compromised* "
|
|
||||||
ewarn "conf file means that other people can impersonate you on "
|
|
||||||
ewarn "the network."
|
|
||||||
ewarn
|
|
||||||
einfo "The cjdns runscript will load the TUN kernel module automatically."
|
|
||||||
einfo "If you are using systemd and have TUN built as a module, add tun "
|
|
||||||
einfo "to /etc/modules-load.d/ for automatic loading at boot-time."
|
|
||||||
einfo "echo tun > /etc/modules-load.d/cjnds.conf"
|
|
||||||
|
|
||||||
if use tools ; then
|
|
||||||
einfo "Additional tools was installed into : ${TOOLS_PATH}"
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
#!/sbin/openrc-run
|
|
||||||
description="Encrypted networking for regular people."
|
|
||||||
|
|
||||||
CONFFILE=/etc/cjdroute.conf
|
|
||||||
|
|
||||||
command="/usr/sbin/cjdroute"
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
use net dns
|
|
||||||
after precursor
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
if [ ! -e /dev/net/tun ]; then
|
|
||||||
ebegin "Inserting TUN module"
|
|
||||||
|
|
||||||
if ! modprobe tun; then
|
|
||||||
eerror "Failed to insert TUN kernel module"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
ebegin "Starting CJDNS"
|
|
||||||
start-stop-daemon --start --quiet --exec "${command}" -- < "${CONFFILE}"
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping CJDNS"
|
|
||||||
start-stop-daemon --stop --exec "${command}"
|
|
||||||
eend $?
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user