diff --git a/net-libs/tox/ChangeLog b/net-libs/tox/ChangeLog new file mode 100644 index 0000000..7065458 --- /dev/null +++ b/net-libs/tox/ChangeLog @@ -0,0 +1,10 @@ +*tox-0.1.6 (20 Jul 2018) +*tox-0.2.3 (20 Jul 2018) +*tox-0_pre20160904 (20 Jul 2018) +*tox-9999 (20 Jul 2018) + + 20 Jul 2018; Horea Christian +files/confd, +files/initd, + +files/tox-bootstrapd.conf, +files/tox-bootstrapd.service, +metadata.xml, + +tox-0.1.6.ebuild, +tox-0.2.3.ebuild, +tox-0_pre20160904.ebuild, + +tox-9999.ebuild: + net-libs/tox: new package with attempted version bump diff --git a/net-libs/tox/Manifest b/net-libs/tox/Manifest new file mode 100644 index 0000000..ec6739e --- /dev/null +++ b/net-libs/tox/Manifest @@ -0,0 +1,3 @@ +DIST tox-0.1.6.tar.lz 314837 SHA256 c51dfaf30cddbfb9a6080c8202d68113452224570109cd9a6f1b7d9709eae6af SHA512 57ed7cee2c621c57e24f5ab36d68d99414d9820cdb3e8b7c4390818222f9d885f352f9cf76c8eb522c238bebc7d420bcf3cdd5f6ab65b9801aadbd225765166c WHIRLPOOL f75b27ade0f87f3793affbd291aba4b9e2387a29cd89deaf1351ed0797f634737938ff68d95a9fa1866891a68fa7a3b7f1c7ff0b68e3865eb7835fb9c4e5ff8b +DIST tox-0.2.3.tar.gz 471336 SHA256 22c52f286c46d3f802edb6978bcf2a53f8301363e2b745784613427a33ba3a34 SHA512 25433cbbc0aa7e32174c8517a93c6351a23bd04cef34945876290bbd01e6074a5d7df2f5dcd39e67e3e18a6817346f98c45d55d789d462055643271ce44e49ee WHIRLPOOL 2a33e3d8e98d13b81a84248c7e289a321ab7e17ae438a17019d16b814f32f1545b86862cffc51c63353f7b9b9a2b2ba8e8394f4e9bfc7576a473ab59a3f240cd +DIST tox-0_pre20160904.tar.gz 395495 SHA256 2d4a0d096bdb81b12b10551765fb9f87270e170f10f387f700b3def68cb6c35c SHA512 c0da52ac908141e97e96510a05431cbfb4b9aae81faf4c136c95e21b90a23e3bbe6db88303e48c0f4f3c74ca954229787564b7aa41bfb462afb0d8f8430cdaa1 WHIRLPOOL abd3f61784fac93d983e453515d1e8bc87f7d76651a53ce6f566a277d7ec7c1e03294d95781364ce9ab30f2698c6f5cd552bfa4888f8d5d0d315daf038980c63 diff --git a/net-libs/tox/files/confd b/net-libs/tox/files/confd new file mode 100644 index 0000000..33f850b --- /dev/null +++ b/net-libs/tox/files/confd @@ -0,0 +1,2 @@ +TOX_GROUP=tox +TOX_USER=tox diff --git a/net-libs/tox/files/initd b/net-libs/tox/files/initd new file mode 100644 index 0000000..101d329 --- /dev/null +++ b/net-libs/tox/files/initd @@ -0,0 +1,30 @@ +#!/sbin/openrc-run + +PIDDIR=/run/tox-bootstrapd +PIDFILE="${PIDDIR}"/tox-bootstrap.pid + +depend() { + need net +} + +start() { + ebegin "Starting tox-dht-bootstrap daemon" + + checkpath -d -q -o "${TOX_USER}":"${TOX_GROUP}" "${PIDDIR}" + + start-stop-daemon --start \ + --pidfile "${PIDFILE}" \ + --user="${TOX_USER}" --group="${TOX_GROUP}" \ + --exec /usr/bin/tox-bootstrapd -- --config /etc/tox-bootstrapd.conf + + eend $? +} + +stop() { + ebegin "Stopping tox-dht-bootstrap daemon" + + start-stop-daemon --stop \ + --pidfile "${PIDFILE}" + + eend $? +} diff --git a/net-libs/tox/files/tox-bootstrapd.conf b/net-libs/tox/files/tox-bootstrapd.conf new file mode 100644 index 0000000..3413f59 --- /dev/null +++ b/net-libs/tox/files/tox-bootstrapd.conf @@ -0,0 +1,65 @@ +// Tox DHT bootstrap daemon configuration file. + +// Listening port (UDP). +port = 33445 + +// A key file is like a password, so keep it where no one can read it. +// If there is no key file, a new one will be generated. +// The daemon should have permission to read/write it. +keys_file_path = "/var/lib/tox-bootstrapd/keys" + +// The PID file written to by the daemon. +// Make sure that the user that daemon runs as has permissions to write to the +// PID file. +pid_file_path = "/var/run/tox-bootstrapd/tox-bootstrapd.pid" + +// Enable IPv6. +enable_ipv6 = true + +// Fallback to IPv4 in case IPv6 fails. +enable_ipv4_fallback = true + +// Automatically bootstrap with nodes on local area network. +enable_lan_discovery = true + +enable_tcp_relay = true + +// While Tox uses 33445 port by default, 443 (https) and 3389 (rdp) ports are very +// common among nodes, so it's encouraged to keep them in place. +tcp_relay_ports = [443, 3389, 33445] + +// Reply to MOTD (Message Of The Day) requests. +enable_motd = true + +// Just a message that is sent when someone requests MOTD. +// Put anything you want, but note that it will be trimmed to fit into 255 bytes. +motd = "tox-bootstrapd" + +// Any number of nodes the daemon will bootstrap itself off. +// +// Remember to replace the provided example with your own node list. +// There is a maintained list of bootstrap nodes on Tox's wiki, if you need it +// (https://wiki.tox.chat/users/nodes). +// +// You may leave the list empty or remove "bootstrap_nodes" completely, +// in both cases this will be interpreted as if you don't want to bootstrap +// from anyone. +// +// address = any IPv4 or IPv6 address and also any US-ASCII domain name. +bootstrap_nodes = ( + { // Example Node 1 (IPv4) + address = "127.0.0.1" + port = 33445 + public_key = "728925473812C7AAC482BE7250BCCAD0B8CB9F737BF3D42ABD34459C1768F854" + }, + { // Example Node 2 (IPv6) + address = "::1/128" + port = 33445 + public_key = "3E78BACF0F84235B30054B54898F56793E1DEF8BD46B1038B9D822E8460FAB67" + }, + { // Example Node 3 (US-ASCII domain name) + address = "example.org" + port = 33445 + public_key = "8CD5A9BF0A6CE358BA36F7A653F99FA6B258FF756E490F52C1F98CC420F78858" + } +) diff --git a/net-libs/tox/files/tox-bootstrapd.service b/net-libs/tox/files/tox-bootstrapd.service new file mode 100644 index 0000000..ae2f238 --- /dev/null +++ b/net-libs/tox/files/tox-bootstrapd.service @@ -0,0 +1,15 @@ +[Unit] +Description=Tox DHT Bootstrap Daemon +After=network.target + +[Service] +User=tox +Group=tox +RuntimeDirectory=tox-bootstrapd +PIDFile=/run/tox-bootstrapd/tox-bootstrapd.pid +WorkingDirectory=/var/lib/tox-bootstrapd +ExecStart=/usr/bin/tox-bootstrapd --config /etc/tox-bootstrapd.conf +#CapabilityBoundingSet=CAP_NET_BIND_SERVICE + +[Install] +WantedBy=multi-user.target diff --git a/net-libs/tox/metadata.xml b/net-libs/tox/metadata.xml new file mode 100644 index 0000000..0dc9808 --- /dev/null +++ b/net-libs/tox/metadata.xml @@ -0,0 +1,19 @@ + + + + + + Adds support for audio and video. + Log level: 0 (no debug info logged) + Log level: 1 + Log level: 2 + Log level: 3 + Log level: 4 + Log level: 5 + Enable the testing nTox client. + Enable the DHT Bootstrap Daemon. + + + TokTok/c-toxcore + + diff --git a/net-libs/tox/tox-0.1.6.ebuild b/net-libs/tox/tox-0.1.6.ebuild new file mode 100644 index 0000000..62dd43f --- /dev/null +++ b/net-libs/tox/tox-0.1.6.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools systemd unpacker user + +DESCRIPTION="Encrypted P2P, messaging, and audio/video calling platform" +HOMEPAGE="https://tox.chat" +SRC_URI="https://github.com/TokTok/c-toxcore/releases/download/v${PV}/c-toxcore-v${PV}.tar.lz -> ${P}.tar.lz" + +LICENSE="GPL-3+" +SLOT="0/0.1" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="+av daemon log-debug log-error log-info log-trace log-warn +no-log ntox static-libs test" + +REQUIRED_USE="^^ ( no-log log-trace log-debug log-info log-warn log-error )" + +RDEPEND=" + av? ( media-libs/libvpx:= + media-libs/opus ) + daemon? ( dev-libs/libconfig ) + ntox? ( sys-libs/ncurses:0= ) + >=dev-libs/libsodium-0.6.1:=[asm,urandom]" +DEPEND="${RDEPEND} + $(unpacker_src_uri_depends) + test? ( dev-libs/check ) + virtual/pkgconfig" + +S=${WORKDIR} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(usex log-trace "--enable-logging --with-log-level=TRACE" "") \ + $(usex log-debug "--enable-logging --with-log-level=DEBUG" "") \ + $(usex log-info "--enable-logging --with-log-level=INFO" "") \ + $(usex log-warn "--enable-logging --with-log-level=WARNING" "") \ + $(usex log-error "--enable-logging --with-log-level=ERROR" "") \ + $(use_enable av) \ + $(use_enable test tests) \ + $(use_enable ntox) \ + $(use_enable daemon) \ + $(use_enable static-libs static) +} + +src_install() { + default + if use daemon; then + newinitd "${FILESDIR}"/initd tox-dht-daemon + newconfd "${FILESDIR}"/confd tox-dht-daemon + insinto /etc + doins "${FILESDIR}"/tox-bootstrapd.conf + systemd_dounit "${FILESDIR}"/tox-bootstrapd.service + fi + + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + if use daemon; then + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} + if [[ -f ${EROOT%/}/var/lib/tox-dht-bootstrap/key ]]; then + ewarn "Backwards compatability with the bootstrap daemon might have been" + ewarn "broken a while ago. To resolve this issue, REMOVE the following files:" + ewarn " ${EROOT%/}/var/lib/tox-dht-bootstrap/key" + ewarn " ${EROOT%/}/etc/tox-bootstrapd.conf" + ewarn " ${EROOT%/}/run/tox-dht-bootstrap/tox-dht-bootstrap.pid" + ewarn "Then just re-emerge net-libs/tox" + fi + fi +} diff --git a/net-libs/tox/tox-0.2.3.ebuild b/net-libs/tox/tox-0.2.3.ebuild new file mode 100644 index 0000000..02aa63d --- /dev/null +++ b/net-libs/tox/tox-0.2.3.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools systemd unpacker user + +DESCRIPTION="Encrypted P2P, messaging, and audio/video calling platform" +HOMEPAGE="https://tox.chat" +SRC_URI="https://github.com/TokTok/c-toxcore/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0/0.1" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="+av daemon log-debug log-error log-info log-trace log-warn +no-log ntox static-libs test" + +REQUIRED_USE="^^ ( no-log log-trace log-debug log-info log-warn log-error )" + +RDEPEND=" + av? ( media-libs/libvpx:= + media-libs/opus ) + daemon? ( dev-libs/libconfig ) + ntox? ( sys-libs/ncurses:0= ) + >=dev-libs/libsodium-0.6.1:=[asm,urandom]" +DEPEND="${RDEPEND} + $(unpacker_src_uri_depends) + test? ( dev-libs/check ) + virtual/pkgconfig" + +S=${WORKDIR} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(usex log-trace "--enable-logging --with-log-level=TRACE" "") \ + $(usex log-debug "--enable-logging --with-log-level=DEBUG" "") \ + $(usex log-info "--enable-logging --with-log-level=INFO" "") \ + $(usex log-warn "--enable-logging --with-log-level=WARNING" "") \ + $(usex log-error "--enable-logging --with-log-level=ERROR" "") \ + $(use_enable av) \ + $(use_enable test tests) \ + $(use_enable ntox) \ + $(use_enable daemon) \ + $(use_enable static-libs static) +} + +src_install() { + default + if use daemon; then + newinitd "${FILESDIR}"/initd tox-dht-daemon + newconfd "${FILESDIR}"/confd tox-dht-daemon + insinto /etc + doins "${FILESDIR}"/tox-bootstrapd.conf + systemd_dounit "${FILESDIR}"/tox-bootstrapd.service + fi + + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + if use daemon; then + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} + if [[ -f ${EROOT%/}/var/lib/tox-dht-bootstrap/key ]]; then + ewarn "Backwards compatability with the bootstrap daemon might have been" + ewarn "broken a while ago. To resolve this issue, REMOVE the following files:" + ewarn " ${EROOT%/}/var/lib/tox-dht-bootstrap/key" + ewarn " ${EROOT%/}/etc/tox-bootstrapd.conf" + ewarn " ${EROOT%/}/run/tox-dht-bootstrap/tox-dht-bootstrap.pid" + ewarn "Then just re-emerge net-libs/tox" + fi + fi +} diff --git a/net-libs/tox/tox-0_pre20160904.ebuild b/net-libs/tox/tox-0_pre20160904.ebuild new file mode 100644 index 0000000..0d148a0 --- /dev/null +++ b/net-libs/tox/tox-0_pre20160904.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools systemd user vcs-snapshot + +DESCRIPTION="Encrypted P2P, messaging, and audio/video calling platform" +HOMEPAGE="https://tox.chat" +EGIT_COMMIT="755f084e8720b349026c85afbad58954cb7ff1d4" +SRC_URI="https://github.com/irungentoo/toxcore/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0/0.0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="+av daemon log-debug log-error log-info log-trace log-warn +no-log ntox static-libs test" + +REQUIRED_USE="^^ ( no-log log-trace log-debug log-info log-warn log-error )" + +RDEPEND=" + av? ( media-libs/libvpx:= + media-libs/opus ) + daemon? ( dev-libs/libconfig ) + ntox? ( sys-libs/ncurses:0= ) + >=dev-libs/libsodium-0.6.1:=[asm,urandom]" +DEPEND="${RDEPEND} + test? ( dev-libs/check ) + virtual/pkgconfig" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(usex log-trace "--enable-logging --with-log-level=TRACE" "") \ + $(usex log-debug "--enable-logging --with-log-level=DEBUG" "") \ + $(usex log-info "--enable-logging --with-log-level=INFO" "") \ + $(usex log-warn "--enable-logging --with-log-level=WARNING" "") \ + $(usex log-error "--enable-logging --with-log-level=ERROR" "") \ + $(use_enable av) \ + $(use_enable test tests) \ + $(use_enable ntox) \ + $(use_enable daemon) \ + $(use_enable static-libs static) +} + +src_install() { + default + if use daemon; then + newinitd "${FILESDIR}"/initd tox-dht-daemon + newconfd "${FILESDIR}"/confd tox-dht-daemon + insinto /etc + doins "${FILESDIR}"/tox-bootstrapd.conf + systemd_dounit "${FILESDIR}"/tox-bootstrapd.service + fi + + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + if use daemon; then + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} + if [[ -f ${EROOT}var/lib/tox-dht-bootstrap/key ]]; then + ewarn "Backwards compatability with the bootstrap daemon might have been" + ewarn "broken a while ago. To resolve this issue, REMOVE the following files:" + ewarn " ${EROOT}var/lib/tox-dht-bootstrap/key" + ewarn " ${EROOT}etc/tox-bootstrapd.conf" + ewarn " ${EROOT}run/tox-dht-bootstrap/tox-dht-bootstrap.pid" + ewarn "Then just re-emerge net-libs/tox" + fi + fi +} diff --git a/net-libs/tox/tox-9999.ebuild b/net-libs/tox/tox-9999.ebuild new file mode 100644 index 0000000..c3bf186 --- /dev/null +++ b/net-libs/tox/tox-9999.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools git-r3 user systemd + +DESCRIPTION="Encrypted P2P, messaging, and audio/video calling platform" +HOMEPAGE="https://tox.chat" +SRC_URI="" +EGIT_REPO_URI="https://github.com/TokTok/c-toxcore.git" + +LICENSE="GPL-3+" +SLOT="0/0.1" +KEYWORDS="" +IUSE="+av daemon log-debug log-error log-info log-trace log-warn +no-log ntox static-libs test" + +REQUIRED_USE="^^ ( no-log log-trace log-debug log-info log-warn log-error )" + +RDEPEND=" + av? ( media-libs/libvpx:= + media-libs/opus ) + daemon? ( dev-libs/libconfig ) + ntox? ( sys-libs/ncurses:0= ) + >=dev-libs/libsodium-0.6.1:=[asm,urandom]" +DEPEND="${RDEPEND} + test? ( dev-libs/check ) + virtual/pkgconfig" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(usex log-trace "--enable-logging --with-log-level=TRACE" "") \ + $(usex log-debug "--enable-logging --with-log-level=DEBUG" "") \ + $(usex log-info "--enable-logging --with-log-level=INFO" "") \ + $(usex log-warn "--enable-logging --with-log-level=WARNING" "") \ + $(usex log-error "--enable-logging --with-log-level=ERROR" "") \ + $(use_enable av) \ + $(use_enable test tests) \ + $(use_enable ntox) \ + $(use_enable daemon) \ + $(use_enable static-libs static) +} + +src_install() { + default + if use daemon; then + newinitd "${FILESDIR}"/initd tox-dht-daemon + newconfd "${FILESDIR}"/confd tox-dht-daemon + insinto /etc + doins "${FILESDIR}"/tox-bootstrapd.conf + systemd_dounit "${FILESDIR}"/tox-bootstrapd.service + fi + + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + if use daemon; then + enewgroup ${PN} + enewuser ${PN} -1 -1 -1 ${PN} + if [[ -f ${EROOT%/}/var/lib/tox-dht-bootstrap/key ]]; then + ewarn "Backwards compatability with the bootstrap daemon might have been" + ewarn "broken a while ago. To resolve this issue, REMOVE the following files:" + ewarn " ${EROOT%/}/var/lib/tox-dht-bootstrap/key" + ewarn " ${EROOT%/}/etc/tox-bootstrapd.conf" + ewarn " ${EROOT%/}/run/tox-dht-bootstrap/tox-dht-bootstrap.pid" + ewarn "Then just re-emerge net-libs/tox" + fi + fi +}