[net-im/spectrum] sync with PR (i have to rename this package at some point)

This commit is contained in:
Robert Förster 2018-11-12 03:04:42 +01:00
parent a644fb10f6
commit 38f8861377
2 changed files with 46 additions and 42 deletions

View File

@ -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 $?
}

View File

@ -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
}