From 58969e4f1757e77f7dabe4027430403a4abf6281 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sun, 22 Jul 2018 01:51:51 +0300 Subject: tox redone, renamed to toxcore qtox redone --- packages/net-im/qtox/qtox-1.16.3.exheres-0 | 6 ++ packages/net-im/qtox/qtox-scm.exheres-0 | 52 +-------------- packages/net-im/qtox/qtox.exlib | 56 ++++++++++++++++ packages/net-libs/tox/files/confd | 2 - packages/net-libs/tox/files/initd | 30 --------- .../tox/files/systemd/tox-bootstrapd.service | 15 ----- packages/net-libs/tox/files/tox-bootstrapd.conf | 65 ------------------- packages/net-libs/tox/tox-scm.exheres-0 | 70 -------------------- packages/net-libs/toxcore/files/confd | 2 + packages/net-libs/toxcore/files/initd | 30 +++++++++ .../toxcore/files/systemd/tox-bootstrapd.service | 15 +++++ .../net-libs/toxcore/files/tox-bootstrapd.conf | 65 +++++++++++++++++++ packages/net-libs/toxcore/toxcore-0.2.4.exheres-0 | 6 ++ packages/net-libs/toxcore/toxcore-scm.exheres-0 | 6 ++ packages/net-libs/toxcore/toxcore.exlib | 74 ++++++++++++++++++++++ 15 files changed, 261 insertions(+), 233 deletions(-) create mode 100644 packages/net-im/qtox/qtox-1.16.3.exheres-0 create mode 100644 packages/net-im/qtox/qtox.exlib delete mode 100644 packages/net-libs/tox/files/confd delete mode 100644 packages/net-libs/tox/files/initd delete mode 100644 packages/net-libs/tox/files/systemd/tox-bootstrapd.service delete mode 100644 packages/net-libs/tox/files/tox-bootstrapd.conf delete mode 100644 packages/net-libs/tox/tox-scm.exheres-0 create mode 100644 packages/net-libs/toxcore/files/confd create mode 100644 packages/net-libs/toxcore/files/initd create mode 100644 packages/net-libs/toxcore/files/systemd/tox-bootstrapd.service create mode 100644 packages/net-libs/toxcore/files/tox-bootstrapd.conf create mode 100644 packages/net-libs/toxcore/toxcore-0.2.4.exheres-0 create mode 100644 packages/net-libs/toxcore/toxcore-scm.exheres-0 create mode 100644 packages/net-libs/toxcore/toxcore.exlib (limited to 'packages') diff --git a/packages/net-im/qtox/qtox-1.16.3.exheres-0 b/packages/net-im/qtox/qtox-1.16.3.exheres-0 new file mode 100644 index 0000000..6e8464e --- /dev/null +++ b/packages/net-im/qtox/qtox-1.16.3.exheres-0 @@ -0,0 +1,6 @@ +# Distributed under the terms of the GNU General Public License v2 +# Copyright 2018 Gluzskiy Alexandr + +require qtox + +PLATFORMS="~amd64 ~x86" diff --git a/packages/net-im/qtox/qtox-scm.exheres-0 b/packages/net-im/qtox/qtox-scm.exheres-0 index 3983635..6e8464e 100644 --- a/packages/net-im/qtox/qtox-scm.exheres-0 +++ b/packages/net-im/qtox/qtox-scm.exheres-0 @@ -1,56 +1,6 @@ # Distributed under the terms of the GNU General Public License v2 # Copyright 2018 Gluzskiy Alexandr -require github [ user=qTox project=qTox ] -require cmake [ api=2 ] +require qtox -DOWNLOADS="" -SLOT="0" PLATFORMS="~amd64 ~x86" -SUMMARY="Most feature-rich GUI for net-libs/tox using Qt5" -HOMEPAGE="https://github.com/qTox/qTox" -MYOPTIONS=" - gtk - ( providers: - ffmpeg - libav - ) - [[ number-selected = exactly-one ]] -" - -DEPENDENCIES=" - build+run: - app-crypt/sqlcipher - media-libs/qrencode - media-libs/openal - media-libs/libexif - net-libs/tox[av] - x11-libs/libX11 - x11-libs/libXScrnSaver - x11-libs/qtbase:5[gui][sql] - x11-libs/qtsvg - gtk? ( - dev-libs/atk - dev-libs/glib:2 - x11-libs/gdk-pixbuf[X] - x11-libs/gtk+:2 - x11-libs/cairo[X] - x11-libs/pango[X] - ) - providers:ffmpeg? ( media/ffmpeg ) - providers:libav? ( media/libav ) - " - -DEFAULT_SRC_PREPARE_PATCHES=( - "${FILES}"/cflags.patch -) - - -src_configure() { - local cmakeparams=() - cmakeparams+=( - -DENABLE_STATUSNOTIFIER=$(option gtk && echo gtk) - -DENABLE_GTK_SYSTRAY=$(option gtk && echo gtk) - ) - ecmake "${cmakeparams[@]}" -} diff --git a/packages/net-im/qtox/qtox.exlib b/packages/net-im/qtox/qtox.exlib new file mode 100644 index 0000000..f57e78c --- /dev/null +++ b/packages/net-im/qtox/qtox.exlib @@ -0,0 +1,56 @@ +# Distributed under the terms of the GNU General Public License v2 +# Copyright 2018 Gluzskiy Alexandr + +require github [ user=qTox project=qTox tag=v${PV} ] +require cmake [ api=2 ] + +export_exlib_phases src_configure + +SLOT="0" +SUMMARY="Most feature-rich GUI for net-libs/tox using Qt5" +HOMEPAGE="https://github.com/qTox/qTox" +MYOPTIONS=" + gtk + ( providers: + ffmpeg + libav + ) + [[ number-selected = exactly-one ]] +" + +DEPENDENCIES=" + build+run: + app-crypt/sqlcipher + media-libs/qrencode + media-libs/openal + media-libs/libexif + net-libs/toxcore[av] + x11-libs/libX11 + x11-libs/libXScrnSaver + x11-libs/qtbase:5[gui][sql] + x11-libs/qtsvg + gtk? ( + dev-libs/atk + dev-libs/glib:2 + x11-libs/gdk-pixbuf[X] + x11-libs/gtk+:2 + x11-libs/cairo[X] + x11-libs/pango[X] + ) + providers:ffmpeg? ( media/ffmpeg ) + providers:libav? ( media/libav ) + " + +DEFAULT_SRC_PREPARE_PATCHES=( + "${FILES}"/cflags.patch +) + + +qtox_src_configure() { + local cmakeparams=() + cmakeparams+=( + -DENABLE_STATUSNOTIFIER=$(option gtk && echo gtk) + -DENABLE_GTK_SYSTRAY=$(option gtk && echo gtk) + ) + ecmake "${cmakeparams[@]}" +} diff --git a/packages/net-libs/tox/files/confd b/packages/net-libs/tox/files/confd deleted file mode 100644 index 33f850b..0000000 --- a/packages/net-libs/tox/files/confd +++ /dev/null @@ -1,2 +0,0 @@ -TOX_GROUP=tox -TOX_USER=tox diff --git a/packages/net-libs/tox/files/initd b/packages/net-libs/tox/files/initd deleted file mode 100644 index 101d329..0000000 --- a/packages/net-libs/tox/files/initd +++ /dev/null @@ -1,30 +0,0 @@ -#!/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/packages/net-libs/tox/files/systemd/tox-bootstrapd.service b/packages/net-libs/tox/files/systemd/tox-bootstrapd.service deleted file mode 100644 index ae2f238..0000000 --- a/packages/net-libs/tox/files/systemd/tox-bootstrapd.service +++ /dev/null @@ -1,15 +0,0 @@ -[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/packages/net-libs/tox/files/tox-bootstrapd.conf b/packages/net-libs/tox/files/tox-bootstrapd.conf deleted file mode 100644 index 3413f59..0000000 --- a/packages/net-libs/tox/files/tox-bootstrapd.conf +++ /dev/null @@ -1,65 +0,0 @@ -// 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/packages/net-libs/tox/tox-scm.exheres-0 b/packages/net-libs/tox/tox-scm.exheres-0 deleted file mode 100644 index e6f5359..0000000 --- a/packages/net-libs/tox/tox-scm.exheres-0 +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -SCM_REPOSITORY="https://github.com/TokTok/c-toxcore.git" - -require scm-git systemd-service -require autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.15 1.13 1.12 1.11 ] need_libtool=false ] - -DOWNLOADS="" -SLOT="0" -PLATFORMS="~amd64 ~x86" -SUMMARY="Encrypted P2P, messaging, and audio/video calling platform" -DESCRIPTION="" -HOMEPAGE="https://tox.chat" -LICENCES="GPL-3+" -MYOPTIONS=" - av - daemon - log-debug [[ requires = [ -log-error -log-info -log-trace -log-warn ] ]] - log-error [[ requires = [ -log-debug -log-info -log-trace -log-warn ] ]] - log-info [[ requires = [ -log-debug -log-error -log-trace -log-warn ] ]] - log-trace [[ requires = [ -log-debug -log-error -log-info -log-warn ] ]] - log-warn [[ requires = [ -log-debug -log-error -log-info -log-trace ] ]] - ntox" - -DEPENDENCIES=" - build+run: - av? ( media-libs/libvpx media-libs/opus ) - daemon? ( dev-libs/libconfig ) - ntox? ( sys-libs/ncurses ) - dev-libs/libsodium -" - -src_configure() { - myconf=() - if option log-debug; then - myconf+=( --enable-logging ) - myconf+=( --with-log-level=DEBUG ) - elif option log-error; then - myconf+=( --enable-logging ) - myconf+=( --with-log-level=ERROR ) - elif option log-info; then - myconf+=( --enable-logging ) - myconf+=( --with-log-level=INFO ) - elif option log-trace; then - myconf+=( --enable-logging ) - myconf+=( --with-log-level=TRACE ) - elif option log-warn; then - myconf+=( --enable-logging ) - myconf+=( --with-log-level=WARNING ) - fi - econf \ - $(option_enable av av ) \ - $(option_enable ntox ntox ) \ - $(option_enable daemon daemon ) \ - "${myconf[@]}" - -} - -src_install() { - default_src_install - if option daemon; then - newconfd "${FILESDIR}"/confd tox-dht-daemon - insinto /etc - doins "${FILESDIR}"/tox-bootstrapd.conf - install_systemd_files - else - edo rmdir "${IMAGE}"/usr/$(exhost --target)/bin - fi -} diff --git a/packages/net-libs/toxcore/files/confd b/packages/net-libs/toxcore/files/confd new file mode 100644 index 0000000..33f850b --- /dev/null +++ b/packages/net-libs/toxcore/files/confd @@ -0,0 +1,2 @@ +TOX_GROUP=tox +TOX_USER=tox diff --git a/packages/net-libs/toxcore/files/initd b/packages/net-libs/toxcore/files/initd new file mode 100644 index 0000000..101d329 --- /dev/null +++ b/packages/net-libs/toxcore/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/packages/net-libs/toxcore/files/systemd/tox-bootstrapd.service b/packages/net-libs/toxcore/files/systemd/tox-bootstrapd.service new file mode 100644 index 0000000..ae2f238 --- /dev/null +++ b/packages/net-libs/toxcore/files/systemd/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/packages/net-libs/toxcore/files/tox-bootstrapd.conf b/packages/net-libs/toxcore/files/tox-bootstrapd.conf new file mode 100644 index 0000000..3413f59 --- /dev/null +++ b/packages/net-libs/toxcore/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/packages/net-libs/toxcore/toxcore-0.2.4.exheres-0 b/packages/net-libs/toxcore/toxcore-0.2.4.exheres-0 new file mode 100644 index 0000000..8e145c2 --- /dev/null +++ b/packages/net-libs/toxcore/toxcore-0.2.4.exheres-0 @@ -0,0 +1,6 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +require toxcore + +PLATFORMS="~amd64 ~x86" diff --git a/packages/net-libs/toxcore/toxcore-scm.exheres-0 b/packages/net-libs/toxcore/toxcore-scm.exheres-0 new file mode 100644 index 0000000..8e145c2 --- /dev/null +++ b/packages/net-libs/toxcore/toxcore-scm.exheres-0 @@ -0,0 +1,6 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +require toxcore + +PLATFORMS="~amd64 ~x86" diff --git a/packages/net-libs/toxcore/toxcore.exlib b/packages/net-libs/toxcore/toxcore.exlib new file mode 100644 index 0000000..63b2927 --- /dev/null +++ b/packages/net-libs/toxcore/toxcore.exlib @@ -0,0 +1,74 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +require github [ user=TokTok project=c-toxcore tag=v${PV} ] +#require scm-git +require systemd-service +require autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.15 1.13 1.12 1.11 ] need_libtool=false ] + +export_exlib_phases src_configure src_install + +SLOT="0" +SUMMARY="Encrypted P2P, messaging, and audio/video calling platform" +DESCRIPTION="" +HOMEPAGE="https://tox.chat" +LICENCES="GPL-3+" +MYOPTIONS=" + av [[ description = [ Enable audio/video support ] ]] + daemon [[ description = [ Build and install tox network booststrap daemon ] ]] + ntox [[ description = [ Build testing console-based client ] ]] + ( + log-debug [[ description = [ Turn on debug logging ] ]] + log-error [[ description = [ Turn on error logging ] ]] + log-info [[ description = [ Turn on info logging ] ]] + log-trace [[ description = [ Turn on trace logging ] ]] + log-warn [[ description = [ Turn on warn logging ] ]] + ) + [[ number-selected = at-most-one ]] +" + +DEPENDENCIES=" + build+run: + av? ( media-libs/libvpx media-libs/opus ) + daemon? ( dev-libs/libconfig ) + ntox? ( sys-libs/ncurses ) + dev-libs/libsodium +" + +toxcore_src_configure() { + myconf=() + if option log-debug; then + myconf+=( --enable-logging ) + myconf+=( --with-log-level=DEBUG ) + elif option log-error; then + myconf+=( --enable-logging ) + myconf+=( --with-log-level=ERROR ) + elif option log-info; then + myconf+=( --enable-logging ) + myconf+=( --with-log-level=INFO ) + elif option log-trace; then + myconf+=( --enable-logging ) + myconf+=( --with-log-level=TRACE ) + elif option log-warn; then + myconf+=( --enable-logging ) + myconf+=( --with-log-level=WARNING ) + fi + econf \ + $(option_enable av av ) \ + $(option_enable ntox ntox ) \ + $(option_enable daemon daemon ) \ + "${myconf[@]}" + +} + +toxcore_src_install() { + default_src_install + if option daemon; then + newconfd "${FILESDIR}"/confd tox-dht-daemon + insinto /etc + doins "${FILESDIR}"/tox-bootstrapd.conf + install_systemd_files + else + edo rmdir "${IMAGE}"/usr/$(exhost --target)/bin + fi +} -- cgit v1.2.3