aboutsummaryrefslogtreecommitdiffstats
path: root/net-im
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-05-03 22:04:59 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2012-05-03 22:05:09 +0200
commitba9625d5abf5f62308b2f679cc05ac70a9ea149a (patch)
tree57e61a7625aacbb608e53faf4aee64606ba733a8 /net-im
parentb7694a51502909897cb2f545ab56c86a0ada07e3 (diff)
downloadoverlay-ba9625d5abf5f62308b2f679cc05ac70a9ea149a.tar.gz
overlay-ba9625d5abf5f62308b2f679cc05ac70a9ea149a.tar.xz
overlay-ba9625d5abf5f62308b2f679cc05ac70a9ea149a.zip
net-im/spectrum: new ebuild
Diffstat (limited to 'net-im')
-rw-r--r--net-im/spectrum/Manifest1
-rw-r--r--net-im/spectrum/spectrum-1.4.8-r1.ebuild131
2 files changed, 132 insertions, 0 deletions
diff --git a/net-im/spectrum/Manifest b/net-im/spectrum/Manifest
index 92bc6df..b69f7fe 100644
--- a/net-im/spectrum/Manifest
+++ b/net-im/spectrum/Manifest
@@ -1,2 +1,3 @@
DIST spectrum-1.4.8.tar.gz 239725 RMD160 859c1d0f6f1c4d535bbada13c1c11f2b4550805a SHA1 9323f8f89eb1f84e36e1d64845741cbebbf0d249 SHA256 40045139cdeb7fbc085fe80bb8124b518bb57520fbb644bc50b132de8cebc3cc
+EBUILD spectrum-1.4.8-r1.ebuild 3511 RMD160 3c8e80fd6e6af01ea74ddca0911212edb2ed4546 SHA1 6bac125036ffe1305bfa2b0733f7a2e24a92b037 SHA256 0a64dd42a8518c625fa0d12ee5d853ccf03069189d0b6d08bd4de4858fcdfba7
EBUILD spectrum-1.4.8.ebuild 3663 RMD160 8e51a36b4846ea601c263691a47c2ef606233a4b SHA1 d9a64f610188282268f1b237675b4a06bcaa9566 SHA256 b8895c5e673d7ceb9adfb7676fa2c8313abacf5e51c215b56c5c2cdc7939d2f0
diff --git a/net-im/spectrum/spectrum-1.4.8-r1.ebuild b/net-im/spectrum/spectrum-1.4.8-r1.ebuild
new file mode 100644
index 0000000..2e32141
--- /dev/null
+++ b/net-im/spectrum/spectrum-1.4.8-r1.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+inherit cmake-utils
+
+DESCRIPTION="Spectrum is an XMPP transport/gateway"
+HOMEPAGE="http://spectrum.im"
+
+SRC_URI="http://spectrum.im/attachments/download/43/spectrum-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="mysql sqlite symlinks tools staticport"
+
+RDEPEND=">=dev-libs/poco-1.3.3[mysql?,sqlite?]
+ media-gfx/imagemagick[cxx]
+ >=net-im/pidgin-2.6.0
+ >=net-libs/gloox-1.0
+ dev-python/xmpppy
+ dev-libs/libev
+ <dev-lang/python-3"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/cmake"
+
+PROTOCOL_LIST="aim facebook gg icq irc msn msn_pecan myspace qq simple sipe twitter xmpp yahoo"
+mycmakeargs=( -DPYTHON_EXECUTABLE=/usr/bin/python2 )
+
+pkg_setup() {
+ if ! ( use sqlite || use mysql ); then
+ ewarn "No database use flag set!"
+ ewarn "You need to enable the mysql or sqlite use flag!"
+ die
+ fi
+}
+
+src_install () {
+ cmake-utils_src_install
+
+ # Install transports with seperate config files (default).
+ # If USE="symlinks" is set, install one config file with symlinks to all transports.
+
+ port=5347
+
+ # prepare config for mysql or just copy
+ cp "${FILESDIR}/spectrum.cfg" spectrum.cfg
+
+ if use mysql ; then
+ sed -e 's,^\(type\)=sqlite$,\1=mysql,' \
+ -e 's,^#\(host=localhost\)$,\1,' \
+ -e 's,^#\(user=user\)$,\1,' \
+ -e 's,^#\(password=password\)$,\1,' \
+ -e 's,^\(database=.*\),#\1,' \
+ -e 's,^#\(prefix=.*\),\1,' \
+ -i spectrum.cfg || die
+ fi
+
+ # install shared-config when using symlinks
+ if use symlinks; then
+ insinto /etc/spectrum
+ newins spectrum.cfg spectrum-shared-conf || die
+ fi
+
+ # install protocol-specific configs or symlinks
+ dodir /etc/spectrum
+ for protocol in ${PROTOCOL_LIST}; do
+ if use symlinks; then
+ dosym spectrum-shared-conf "/etc/spectrum/${protocol}:${port}.cfg" || die
+ sed -e 's,PROTOCOL,'${protocol}:${port}',g' \
+ "${FILESDIR}"/spectrum.confd > spectrum.confd
+ else
+ sed -e 's,\$filename:protocol,'${protocol}',g' \
+ -e 's,\$filename:port,'${port}',g' \
+ spectrum.cfg > "${ED}/etc/spectrum/${protocol}.cfg" || die
+ sed -e 's,PROTOCOL,'${protocol}',g' \
+ "${FILESDIR}"/spectrum.confd > spectrum.confd
+ fi
+
+ # install prepared confd
+ newconfd spectrum.confd spectrum.${protocol} || die
+
+ if ! use staticport; then
+ port=$[${port}+1]
+ fi
+ done
+
+ # Install init files
+ newinitd "${FILESDIR}"/spectrum.initd spectrum || die
+ for protocol in ${PROTOCOL_LIST}; do
+ dosym spectrum /etc/init.d/spectrum."${protocol}"
+ done
+
+ # Directories
+ dodir "/var/lib/spectrum" || die
+ dodir "/var/log/spectrum" || die
+ dodir "/var/run/spectrum" || die
+
+ # Directories for each transport
+ for protocol in ${PROTOCOL_LIST}; do
+ dodir "/var/lib/spectrum/$protocol/database" || die
+ dodir "/var/lib/spectrum/$protocol/userdir" || die
+ dodir "/var/lib/spectrum/$protocol/filetransfer_cache" || die
+ done
+
+ # Install mysql schema
+ if use mysql; then
+ insinto "/usr/share/spectrum/schemas"
+ doins schemas/* || die
+ fi
+
+ # Install misc tools
+ if use tools; then
+ insinto "/usr/share/spectrum/tools"
+ doins tools/* || die
+ fi
+
+ # Set correct rights
+ fowners jabber:jabber -R "/etc/spectrum" || die
+ fowners jabber:jabber -R "/var/lib/spectrum" || die
+ fowners jabber:jabber -R "/var/log/spectrum" || die
+ fowners jabber:jabber -R "/var/run/spectrum" || die
+ fperms 750 "/etc/spectrum" || die
+ fperms 750 "/var/lib/spectrum" || die
+ fperms 750 "/var/log/spectrum" || die
+ fperms 750 "/var/run/spectrum" || die
+}