[net-im] add spectrum and swift, both still need some cleanup but they happen to work for now
This commit is contained in:
parent
6674e2189a
commit
d4da1e2122
26
net-im/spectrum/files/spectrum2.initd
Normal file
26
net-im/spectrum/files/spectrum2.initd
Normal file
@ -0,0 +1,26 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
LOGFILE=/var/log/spectrum2/std.log
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use jabber-server
|
||||
}
|
||||
|
||||
start() {
|
||||
[ -d /var/run/spectrum2 ] || mkdir /var/run/spectrum2 && chown jabber:jabber /var/run/spectrum2 && chmod 750 /var/run/spectrum2
|
||||
ebegin "Starting ${PROTOCOL} Spectrum Transport"
|
||||
start-stop-daemon --start --user jabber --group jabber \
|
||||
--exec /usr/bin/spectrum2_manager start &> $LOGFILE
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ${PROTOCOL} Spectrum Transport"
|
||||
start-stop-daemon --user jabber --group jabber \
|
||||
--exec /usr/bin/spectrum2_manager stop 1>>$LOGFILE 2>&1
|
||||
eend $?
|
||||
}
|
4
net-im/spectrum/files/systemd/spectrum2.conf
Normal file
4
net-im/spectrum/files/systemd/spectrum2.conf
Normal file
@ -0,0 +1,4 @@
|
||||
# systemd tmpfile settings for spectrum2
|
||||
# See tmpfiles.d(5) for details
|
||||
|
||||
d /var/run/spectrum2 0750 jabber jabber -
|
97
net-im/spectrum/spectrum-9999.ebuild
Normal file
97
net-im/spectrum/spectrum-9999.ebuild
Normal file
@ -0,0 +1,97 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit cmake-utils systemd versionator ${VCS_ECLASS}
|
||||
|
||||
if [[ ${PV} = "9999" ]] ; then
|
||||
EGIT_REPO_URI="git://github.com/hanzz/libtransport.git"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
else
|
||||
RESTRICT="mirror"
|
||||
MY_PN="spectrum"
|
||||
MY_PV=$(replace_version_separator '_' '-')
|
||||
MY_P="${MY_PN}-${MY_PV}"
|
||||
SRC_URI="https://github.com/downloads/hanzz/libtransport/${MY_P}.tar.gz"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Spectrum is a XMPP transport/gateway"
|
||||
HOMEPAGE="http://spectrum.im"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="2"
|
||||
IUSE_PLUGINS="frotz irc jabber purple skype sms twitter yahoo"
|
||||
IUSE="debug doc libev mysql postgres sqlite test ${IUSE_PLUGINS}"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
<net-im/swift-9999[ssl]
|
||||
dev-libs/libev
|
||||
dev-libs/log4cxx
|
||||
dev-libs/openssl
|
||||
dev-libs/popt
|
||||
dev-libs/protobuf
|
||||
mysql? ( virtual/mysql )
|
||||
postgres? ( dev-libs/libpqxx )
|
||||
sqlite? ( dev-db/sqlite:3 )
|
||||
irc? ( net-im/communi )
|
||||
purple? ( >=net-im/pidgin-2.6.0 )
|
||||
skype? ( dev-libs/dbus-glib x11-base/xorg-server[xvfb] net-im/skype )
|
||||
libev? ( dev-libs/libev )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/cmake
|
||||
sys-devel/gettext
|
||||
doc? ( app-doc/doxygen )
|
||||
test? ( dev-util/cppunit )
|
||||
"
|
||||
|
||||
REQUIRED_USE="|| ( sqlite mysql postgres )"
|
||||
|
||||
pkg_setup() {
|
||||
CMAKE_IN_SOURCE_BUILD=1
|
||||
use debug && CMAKE_BUILD_TYPE=Debug
|
||||
MYCMAKEARGS="-DLIB_INSTALL_DIR=$(get_libdir)"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
mycmakeargs=(
|
||||
$(cmake-utils_use_enable mysql MYSQL)
|
||||
$(cmake-utils_use_enable postgres PQXX)
|
||||
$(cmake-utils_use_enable sqlite SQLITE3)
|
||||
$(cmake-utils_use_enable doc DOCS)
|
||||
$(cmake-utils_use_enable frotz FROTZ)
|
||||
$(cmake-utils_use_enable irc IRC)
|
||||
$(cmake-utils_use_enable jabber SWIFTEN)
|
||||
$(cmake-utils_use_enable purple PURPLE)
|
||||
$(cmake-utils_use_enable skype SKYPE)
|
||||
$(cmake-utils_use_enable sms SMSTOOLS3)
|
||||
$(cmake-utils_use_enable twitter TWITTER)
|
||||
$(cmake-utils_use_enable yahoo YAHOO2)
|
||||
)
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
newinitd "${FILESDIR}"/spectrum2.initd spectrum2
|
||||
systemd_dotmpfilesd "${FILESDIR}"/systemd/spectrum2.conf
|
||||
keepdir "${EPREFIX}"/var/lib/spectrum2
|
||||
keepdir "${EPREFIX}"/var/log/spectrum2
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
chown jabber:jabber -R "/etc/spectrum2" || die
|
||||
chown jabber:jabber -R "${EPREFIX}/var/lib/spectrum2" || die
|
||||
chown jabber:jabber -R "${EPREFIX}/var/log/spectrum2" || die
|
||||
chmod 750 "/etc/spectrum2" || die
|
||||
chmod 750 "${EPREFIX}/var/lib/spectrum2" || die
|
||||
chmod 750 "${EPREFIX}/var/log/spectrum2" || die
|
||||
}
|
174
net-im/swift/swift-2.9999.ebuild
Normal file
174
net-im/swift/swift-2.9999.ebuild
Normal file
@ -0,0 +1,174 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
LANGS="ca de es fr gl he hu nl pl ru sk sv"
|
||||
|
||||
inherit multilib toolchain-funcs linux-info qt4-r2 scons-utils
|
||||
|
||||
if [[ ${PV} = "2.9999" ]] ; then
|
||||
EGIT_REPO_URI="git://swift.im/swift"
|
||||
EGIT_BRANCH="swift-2.x"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
else
|
||||
RESTRICT="mirror"
|
||||
SRC_URI="http://swift.im/downloads/releases/${P}/${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Your friendly chat client"
|
||||
HOMEPAGE="http://swift.im/"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
IUSE="debug doc examples +expat qt4 ssl static-libs zeroconf"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/boost
|
||||
expat? ( dev-libs/expat )
|
||||
!expat? ( dev-libs/libxml2 )
|
||||
ssl? ( dev-libs/openssl )
|
||||
zeroconf? ( net-dns/avahi )
|
||||
net-dns/libidn
|
||||
sys-libs/zlib
|
||||
qt4? (
|
||||
x11-libs/libXScrnSaver
|
||||
dev-qt/qtgui
|
||||
dev-qt/qtwebkit
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
doc? (
|
||||
>=app-text/docbook-xsl-stylesheets-1.75
|
||||
>=app-text/docbook-xml-dtd-4.5
|
||||
dev-libs/libxslt
|
||||
)
|
||||
"
|
||||
scons_targets=()
|
||||
set_scons_targets() {
|
||||
scons_targets=( Swiften )
|
||||
use qt4 && scons_targets+=( Swift )
|
||||
use zeroconf && scons_targets+=( Slimber )
|
||||
use examples && scons_targets+=(
|
||||
Documentation/SwiftenDevelopersGuide/Examples
|
||||
Limber
|
||||
Sluift
|
||||
Swiften/Config
|
||||
Swiften/Examples
|
||||
Swiften/QA
|
||||
SwifTools
|
||||
)
|
||||
}
|
||||
|
||||
scons_vars=()
|
||||
set_scons_vars() {
|
||||
scons_vars=(
|
||||
V=1
|
||||
allow_warnings=1
|
||||
cc="$(tc-getCC)"
|
||||
cxx="$(tc-getCXX)"
|
||||
ccflags="${CXXFLAGS}"
|
||||
linkflags="${LDFLAGS}"
|
||||
qt="${S}/local-qt"
|
||||
openssl="${EPREFIX}/usr"
|
||||
docbook_xsl="${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets"
|
||||
docbook_xml="${EPREFIX}/usr/share/sgml/docbook/xml-dtd-4.5"
|
||||
$(use_scons debug)
|
||||
$(use !static-libs && use_scons !static-libs swiften_dll)
|
||||
$(use_scons ssl openssl)
|
||||
)
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
mkdir local-qt
|
||||
ln -s "${EPREFIX}"/usr/$(get_libdir)/qt4 local-qt/lib || die
|
||||
ln -s "${EPREFIX}"/usr/include/qt4 local-qt/include || die
|
||||
|
||||
cd 3rdParty || die
|
||||
# TODO CppUnit, Lua
|
||||
rm -rf Boost CAres DocBook Expat LCov LibIDN OpenSSL SCons SQLite ZLib || die
|
||||
cd .. || die
|
||||
|
||||
for x in ${LANGS}; do
|
||||
if use !linguas_${x}; then
|
||||
rm -f Swift/Translations/swift_${x}.ts || die
|
||||
fi
|
||||
done
|
||||
|
||||
# Richard H. <chain@rpgfiction.net> (2012-03-29): SCons ignores us,
|
||||
# just delete unneeded stuff!
|
||||
if use !zeroconf; then
|
||||
rm -rf Slumber || die
|
||||
fi
|
||||
|
||||
if use !examples; then
|
||||
rm -rf Documentation/SwiftenDevelopersGuide/Examples \
|
||||
Limber \
|
||||
Slimber \
|
||||
Sluift \
|
||||
Swiften/Examples \
|
||||
Swiften/QA \
|
||||
Swiftob || die
|
||||
fi
|
||||
|
||||
if use !qt4; then
|
||||
rm -rf Swift || die
|
||||
fi
|
||||
|
||||
sed -i BuildTools/SCons/Tools/qt4.py \
|
||||
-e "s/linux2/linux${KV_MAJOR}/" \
|
||||
|| die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
set_scons_targets
|
||||
set_scons_vars
|
||||
|
||||
escons "${scons_vars[@]}" "${scons_targets[@]}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
set_scons_targets
|
||||
set_scons_vars
|
||||
|
||||
escons "${scons_vars[@]}" test=unit QA
|
||||
}
|
||||
|
||||
src_install() {
|
||||
set_scons_targets
|
||||
set_scons_vars
|
||||
|
||||
escons "${scons_vars[@]}" SWIFT_INSTALLDIR="${D}/usr" SWIFTEN_INSTALLDIR="${D}/usr" "${D}" "${scons_targets[@]}"
|
||||
|
||||
if use zeroconf ; then
|
||||
newbin Slimber/Qt/slimber slimber-qt
|
||||
newbin Slimber/CLI/slimber slimber-cli
|
||||
fi
|
||||
|
||||
if use examples ; then
|
||||
for i in EchoBot{1,2,3,4,5,6} EchoComponent ; do
|
||||
newbin "Documentation/SwiftenDevelopersGuide/Examples/EchoBot/${i}" "${PN}-${i}"
|
||||
done
|
||||
|
||||
dobin Limber/limber
|
||||
dobin Sluift/sluift
|
||||
dobin Swiften/Config/swiften-config
|
||||
|
||||
for i in BenchTool ConnectivityTest LinkLocalTool ParserTester SendFile SendMessage ; do
|
||||
newbin "Swiften/Examples/${i}/${i}" "${PN}-${i}"
|
||||
done
|
||||
newbin Swiften/Examples/SendFile/ReceiveFile "${PN}-ReceiveFile"
|
||||
use zeroconf && dobin Swiften/Examples/LinkLocalTool/LinkLocalTool
|
||||
|
||||
for i in ClientTest NetworkTest StorageTest TLSTest ; do
|
||||
newbin "Swiften/QA/${i}/${i}" "${PN}-${i}"
|
||||
done
|
||||
|
||||
newbin SwifTools/Idle/IdleQuerierTest/IdleQuerierTest ${PN}-IdleQuerierTest
|
||||
fi
|
||||
|
||||
use doc && dohtml "Documentation/SwiftenDevelopersGuide/Swiften Developers Guide.html"
|
||||
}
|
173
net-im/swift/swift-9999.ebuild
Normal file
173
net-im/swift/swift-9999.ebuild
Normal file
@ -0,0 +1,173 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
LANGS="ca de es fr gl he hu nl pl ru sk sv"
|
||||
|
||||
inherit multilib toolchain-funcs linux-info qt4-r2 scons-utils
|
||||
|
||||
if [[ ${PV} = "9999" ]] ; then
|
||||
EGIT_REPO_URI="git://swift.im/swift"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
else
|
||||
RESTRICT="mirror"
|
||||
SRC_URI="http://swift.im/downloads/releases/${P}/${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Your friendly chat client"
|
||||
HOMEPAGE="http://swift.im/"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
IUSE="debug doc examples +expat qt4 ssl static-libs zeroconf"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/boost
|
||||
expat? ( dev-libs/expat )
|
||||
!expat? ( dev-libs/libxml2 )
|
||||
ssl? ( dev-libs/openssl )
|
||||
zeroconf? ( net-dns/avahi )
|
||||
net-dns/libidn
|
||||
sys-libs/zlib
|
||||
qt4? (
|
||||
x11-libs/libXScrnSaver
|
||||
dev-qt/qtgui
|
||||
dev-qt/qtwebkit
|
||||
)
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
doc? (
|
||||
>=app-text/docbook-xsl-stylesheets-1.75
|
||||
>=app-text/docbook-xml-dtd-4.5
|
||||
dev-libs/libxslt
|
||||
)
|
||||
"
|
||||
scons_targets=()
|
||||
set_scons_targets() {
|
||||
scons_targets=( Swiften )
|
||||
use qt4 && scons_targets+=( Swift )
|
||||
use zeroconf && scons_targets+=( Slimber )
|
||||
use examples && scons_targets+=(
|
||||
Documentation/SwiftenDevelopersGuide/Examples
|
||||
Limber
|
||||
Sluift
|
||||
Swiften/Config
|
||||
Swiften/Examples
|
||||
Swiften/QA
|
||||
SwifTools
|
||||
)
|
||||
}
|
||||
|
||||
scons_vars=()
|
||||
set_scons_vars() {
|
||||
scons_vars=(
|
||||
V=1
|
||||
allow_warnings=1
|
||||
cc="$(tc-getCC)"
|
||||
cxx="$(tc-getCXX)"
|
||||
ccflags="${CXXFLAGS}"
|
||||
linkflags="${LDFLAGS}"
|
||||
qt="${S}/local-qt"
|
||||
openssl="${EPREFIX}/usr"
|
||||
docbook_xsl="${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets"
|
||||
docbook_xml="${EPREFIX}/usr/share/sgml/docbook/xml-dtd-4.5"
|
||||
$(use_scons debug)
|
||||
$(use !static-libs && use_scons !static-libs swiften_dll)
|
||||
$(use_scons ssl openssl)
|
||||
)
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
mkdir local-qt
|
||||
ln -s "${EPREFIX}"/usr/$(get_libdir)/qt4 local-qt/lib || die
|
||||
ln -s "${EPREFIX}"/usr/include/qt4 local-qt/include || die
|
||||
|
||||
cd 3rdParty || die
|
||||
# TODO CppUnit, Lua
|
||||
rm -rf Boost CAres DocBook Expat LCov LibIDN OpenSSL SCons SQLite ZLib || die
|
||||
cd .. || die
|
||||
|
||||
for x in ${LANGS}; do
|
||||
if use !linguas_${x}; then
|
||||
rm -f Swift/Translations/swift_${x}.ts || die
|
||||
fi
|
||||
done
|
||||
|
||||
# Richard H. <chain@rpgfiction.net> (2012-03-29): SCons ignores us,
|
||||
# just delete unneeded stuff!
|
||||
if use !zeroconf; then
|
||||
rm -rf Slumber || die
|
||||
fi
|
||||
|
||||
if use !examples; then
|
||||
rm -rf Documentation/SwiftenDevelopersGuide/Examples \
|
||||
Limber \
|
||||
Slimber \
|
||||
Sluift \
|
||||
Swiften/Examples \
|
||||
Swiften/QA \
|
||||
Swiftob || die
|
||||
fi
|
||||
|
||||
if use !qt4; then
|
||||
rm -rf Swift || die
|
||||
fi
|
||||
|
||||
sed -i BuildTools/SCons/Tools/qt4.py \
|
||||
-e "s/linux2/linux${KV_MAJOR}/" \
|
||||
|| die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
set_scons_targets
|
||||
set_scons_vars
|
||||
|
||||
escons "${scons_vars[@]}" "${scons_targets[@]}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
set_scons_targets
|
||||
set_scons_vars
|
||||
|
||||
escons "${scons_vars[@]}" test=unit QA
|
||||
}
|
||||
|
||||
src_install() {
|
||||
set_scons_targets
|
||||
set_scons_vars
|
||||
|
||||
escons "${scons_vars[@]}" SWIFT_INSTALLDIR="${D}/usr" SWIFTEN_INSTALLDIR="${D}/usr" "${D}" "${scons_targets[@]}"
|
||||
|
||||
if use zeroconf ; then
|
||||
newbin Slimber/Qt/slimber slimber-qt
|
||||
newbin Slimber/CLI/slimber slimber-cli
|
||||
fi
|
||||
|
||||
if use examples ; then
|
||||
for i in EchoBot{1,2,3,4,5,6} EchoComponent ; do
|
||||
newbin "Documentation/SwiftenDevelopersGuide/Examples/EchoBot/${i}" "${PN}-${i}"
|
||||
done
|
||||
|
||||
dobin Limber/limber
|
||||
dobin Sluift/sluift
|
||||
dobin Swiften/Config/swiften-config
|
||||
|
||||
for i in BenchTool ConnectivityTest LinkLocalTool ParserTester SendFile SendMessage ; do
|
||||
newbin "Swiften/Examples/${i}/${i}" "${PN}-${i}"
|
||||
done
|
||||
newbin Swiften/Examples/SendFile/ReceiveFile "${PN}-ReceiveFile"
|
||||
use zeroconf && dobin Swiften/Examples/LinkLocalTool/LinkLocalTool
|
||||
|
||||
for i in ClientTest NetworkTest StorageTest TLSTest ; do
|
||||
newbin "Swiften/QA/${i}/${i}" "${PN}-${i}"
|
||||
done
|
||||
|
||||
newbin SwifTools/Idle/IdleQuerierTest/IdleQuerierTest ${PN}-IdleQuerierTest
|
||||
fi
|
||||
|
||||
use doc && dohtml "Documentation/SwiftenDevelopersGuide/Swiften Developers Guide.html"
|
||||
}
|
Loading…
Reference in New Issue
Block a user