From 38f8861377667192b6e0401c4a8cfb9233df5e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20F=C3=B6rster?= Date: Mon, 12 Nov 2018 03:04:42 +0100 Subject: [PATCH] [net-im/spectrum] sync with PR (i have to rename this package at some point) --- net-im/spectrum/files/spectrum2.initd | 26 +++++------ net-im/spectrum/spectrum-9999.ebuild | 62 +++++++++++++++------------ 2 files changed, 46 insertions(+), 42 deletions(-) diff --git a/net-im/spectrum/files/spectrum2.initd b/net-im/spectrum/files/spectrum2.initd index d311d92..826bca2 100644 --- a/net-im/spectrum/files/spectrum2.initd +++ b/net-im/spectrum/files/spectrum2.initd @@ -1,35 +1,31 @@ #!/sbin/openrc-run -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -SPECTRUM2_GROUP="spectrum" -SPECTRUM2_MANAGER="/usr/bin/spectrum2_manager" -SPECTRUM2_USER="spectrum" +command="/usr/bin/${RC_SVCNAME}_manager" +command_args="start" +command_background="true" +command_group="spectrum" +command_user="spectrum" +name="Spectrum2 Transport" +pidfile="/run/${RC_SVCNAME}/${RC_SVCNAME}_manager.pid" depend() { need net } -start() { - ebegin "Starting Spectrum2 Transport" - start-stop-daemon --start --group ${SPECTRUM2_GROUP} --user ${SPECTRUM2_USER} \ - --exec ${SPECTRUM2_MANAGER} start - eend $? -} - start_pre() { - checkpath -d -o ${SPECTRUM2_USER}:${SPECTRUM2_GROUP} -q /run/spectrum2 + checkpath -d -o "${command_user}:${command_group}" -q "/run/${RC_SVCNAME}" } status() { ebegin "Status Spectrum2 Transport" - ${SPECTRUM2_MANAGER} status + ${command} status eend $? } stop() { ebegin "Stopping Spectrum2 Transport" - start-stop-daemon --start --group ${SPECTRUM2_GROUP} --user ${SPECTRUM2_USER} \ - --exec ${SPECTRUM2_MANAGER} stop + ${command} stop eend $? } diff --git a/net-im/spectrum/spectrum-9999.ebuild b/net-im/spectrum/spectrum-9999.ebuild index 9e9a604..02baa35 100644 --- a/net-im/spectrum/spectrum-9999.ebuild +++ b/net-im/spectrum/spectrum-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=6 inherit cmake-utils user @@ -20,36 +20,45 @@ HOMEPAGE="https://www.spectrum.im" LICENSE="GPL-2+" SLOT="0" -IUSE="debug doc frotz irc mysql postgres purple sms +sqlite test twitter xmpp" +IUSE="debug doc frotz irc mysql postgres purple sms +sqlite test twitter whatsapp xmpp" REQUIRED_USE="|| ( mysql postgres sqlite )" -DEPEND="dev-libs/boost:= +DEPEND_RDEPEND=" + dev-libs/boost:= dev-libs/expat dev-libs/log4cxx dev-libs/jsoncpp:= dev-libs/openssl:0= dev-libs/popt dev-libs/protobuf:= - net-dns/libidn + net-dns/libidn:0= net-misc/curl - sys-libs/zlib - doc? ( app-doc/doxygen ) + sys-libs/zlib:= frotz? ( !games-engines/frotz ) irc? ( net-im/libcommuni ) mysql? ( || ( dev-db/mariadb-connector-c dev-db/mysql-connector-c ) ) postgres? ( dev-db/postgresql:= ) purple? ( dev-libs/glib - dev-libs/libev - net-im/pidgin ) + dev-libs/libev:= + net-im/pidgin:= ) sms? ( app-mobilephone/smstools ) sqlite? ( dev-db/sqlite:3 ) - test? ( dev-util/cppunit ) twitter? ( net-misc/curl ) - xmpp? ( net-im/swift:=[ft] )" + whatsapp? ( net-im/transwhat ) + xmpp? ( net-im/swift:= )" -RDEPEND="${DEPEND}" +DEPEND=" + ${DEPEND_RDEPEND} + doc? ( app-doc/doxygen ) + test? ( dev-util/cppunit ) +" -PATCHES=( "${FILESDIR}/remove_debug_cflags.patch" "${FILESDIR}/use_qt5_libcommuni.patch" ) +RDEPEND="${DEPEND_BOTH}" + +PATCHES=( + "${FILESDIR}/remove_debug_cflags.patch" + "${FILESDIR}/use_qt5_libcommuni.patch" +) pkg_setup() { enewgroup spectrum @@ -68,22 +77,20 @@ src_prepare() { } src_configure() { - if use debug; then - CMAKE_BUILD_TYPE="Debug" - fi + use debug && CMAKE_BUILD_TYPE="Debug" local mycmakeargs=( - -DENABLE_DOCS="$(usex doc)" \ - -DENABLE_FROTZ="$(usex frotz)" \ - -DENABLE_IRC="$(usex irc)" \ - -DENABLE_MYSQL="$(usex mysql)" \ - -DENABLE_PQXX="$(usex postgres)" \ - -DENABLE_PURPLE="$(usex purple)" \ - -DENABLE_SMSTOOLS3="$(usex sms)" \ - -DENABLE_SQLITE3="$(usex sqlite)" \ - -DENABLE_TESTS="$(usex test)" \ - -DENABLE_TWITTER="$(usex twitter)" \ - -DENABLE_XMPP="$(usex xmpp)" \ + -DENABLE_DOCS="$(usex doc)" + -DENABLE_FROTZ="$(usex frotz)" + -DENABLE_IRC="$(usex irc)" + -DENABLE_MYSQL="$(usex mysql)" + -DENABLE_PQXX="$(usex postgres)" + -DENABLE_PURPLE="$(usex purple)" + -DENABLE_SMSTOOLS3="$(usex sms)" + -DENABLE_SQLITE3="$(usex sqlite)" + -DENABLE_TESTS="$(usex test)" + -DENABLE_TWITTER="$(usex twitter)" + -DENABLE_XMPP="$(usex xmpp)" -DLIB_INSTALL_DIR="$(get_libdir)" ) @@ -97,6 +104,7 @@ src_install() { diropts -o spectrum -g spectrum keepdir /var/log/spectrum2 /var/lib/spectrum2 + diropts newinitd "${FILESDIR}"/spectrum2.initd spectrum2 }