Files @ 794dc86717e2
Branch filter:

Location: portage-overlay.git/net-im/spectrum/spectrum-2.0.0_beta2.ebuild

794dc86717e2 1.9 KiB application/vnd.gentoo.ebuild Show Annotation Show as Raw Download as Raw
chain
initial commit of main tree

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

[[ ${PV} = *9999* ]] && VCS_ECLASS="git-2" || VCS_ECLASS=""

inherit cmake-utils versionator ${VCS_ECLASS}

MY_PN="spectrum"
MY_PV=$(replace_version_separator '_' '-')
MY_P="${MY_PN}-${MY_PV}"
S="${WORKDIR}/${MY_P}"

DESCRIPTION="XMPP transport/gateway"
HOMEPAGE="http://spectrum.im"
if [[ ${PV} == *9999* ]] ; then
	EGIT_REPO_URI="https://github.com/hanzz/libtransport"
else
	SRC_URI="http://spectrum.im/attachments/download/59/${MY_P}.tar.gz"
fi

LICENSE=""
SLOT="2"
KEYWORDS="~amd64 ~x86"
IUSE="irc log4cxx mysql postgres purple skype sqlite"

# TODO: IRC (ebuild missing!); PostgresSQL (anyone?)

# Richard H. <chain@rpgfiction.net> (2012-10-17): 2.0_beta2 does only build with swift-2.0_beta1
[[ ${PV} = *9999* ]] && RDEPEND="net-im/swift" || RDEPEND="=net-im/swift-2.0_beta1"

RDEPEND="${RDEPEND}
		dev-libs/libev
		dev-libs/protobuf
		log4cxx? ( dev-libs/log4cxx )
		mysql? ( virtual/mysql )
		purple? ( net-im/pidgin )
		skype? (
					dev-libs/dbus-glib
					net-im/skype[-qt-static]
					x11-base/xorg-server
				)
		sqlite? ( dev-db/sqlite )
		"

DEPEND="${RDEPEND}
                dev-util/cmake"

pkg_setup() {
        if ! ( use sqlite || use mysql || use postgres ); then
                ewarn "No database use flag set!"
                ewarn "You need to enable the mysql, postgres, or sqlite use flag!"
                die
        fi
}

pkg_postinst() {
        # Create jabber-user
        enewgroup jabber
        enewuser jabber -1 -1 -1 jabber

        # Set correct rights
        chown jabber:jabber -R "/etc/spectrum2" || die
        chown jabber:jabber -R "/var/log/spectrum" || die
        chown jabber:jabber -R "/var/run/spectrum" || die
        chmod 750 "/etc/spectrum" || die
        chmod 750 "/var/log/spectrum" || die
        chmod 750 "/var/run/spectrum" || die
}