Add spectrum2 (XMPP transport to the other IM networks)
ebuilds in this commit: spectrum/spectrum-1.4.8 spectrum/spectrum-2.0.0 spectrum/spectrum-2.9999 spectrum/spectrum-9999 swift/swift-2.0_rc1 swift/swift-9999 All ebuilds taken from official spectrum2 overlay new file: net-im/spectrum/Manifest new file: net-im/spectrum/files/spectrum-1.4.7_remoteroster.patch new file: net-im/spectrum/files/spectrum.cfg new file: net-im/spectrum/files/spectrum.confd new file: net-im/spectrum/files/spectrum.initd new file: net-im/spectrum/files/spectrum.symlink.cfg new file: net-im/spectrum/files/spectrum2.initd new file: net-im/spectrum/spectrum-1.4.8.ebuild new file: net-im/spectrum/spectrum-2.0.0_beta2.ebuild new file: net-im/spectrum/spectrum-2.9999.ebuild new file: net-im/spectrum/spectrum-9999.ebuild new file: net-im/swift/Manifest new file: net-im/swift/swift-2.0_rc1.ebuild new file: net-im/swift/swift-9999.ebuild
This commit is contained in:
32
net-im/spectrum/files/spectrum-1.4.7_remoteroster.patch
Normal file
32
net-im/spectrum/files/spectrum-1.4.7_remoteroster.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
diff --git a/src/spectrumbuddy.cpp b/src/spectrumbuddy.cpp
|
||||
index 74d5194..910266c 100644
|
||||
--- a/src/spectrumbuddy.cpp
|
||||
+++ b/src/spectrumbuddy.cpp
|
||||
@@ -36,10 +36,10 @@ SpectrumBuddy::~SpectrumBuddy() {
|
||||
|
||||
std::string SpectrumBuddy::getAlias() {
|
||||
std::string alias;
|
||||
- if (purple_buddy_get_server_alias(m_buddy))
|
||||
- alias = (std::string) purple_buddy_get_server_alias(m_buddy);
|
||||
- else
|
||||
+ if (purple_buddy_get_alias(m_buddy))
|
||||
alias = (std::string) purple_buddy_get_alias(m_buddy);
|
||||
+ else
|
||||
+ alias = (std::string) purple_buddy_get_server_alias(m_buddy);
|
||||
return alias;
|
||||
}
|
||||
|
||||
diff --git a/src/sql.cpp b/src/sql.cpp
|
||||
index 8fbc64a..70bf5db 100644
|
||||
--- a/src/sql.cpp
|
||||
+++ b/src/sql.cpp
|
||||
@@ -905,7 +905,8 @@ GHashTable *SQLClass::getBuddies(long userId, PurpleAccount *account) {
|
||||
// create buddy
|
||||
buddy = purple_buddy_new(account, buddyUins[k].c_str(), buddyNicknames[k].c_str());
|
||||
purple_blist_add_buddy(buddy, contact, g, NULL);
|
||||
- Log("ADDING BUDDY", buddyIds[k] << " " << buddyUins[k] << " subscription: " << subscription << " " << buddy);
|
||||
+ purple_blist_server_alias_buddy(buddy, buddyNicknames[k].c_str());
|
||||
+ Log("ADDING BUDDY", buddyIds[k] << " " << buddyUins[k] << " " << buddyNicknames[k] << " subscription: " << subscription << " " << buddy);
|
||||
|
||||
// add settings
|
||||
GHashTable *settings = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) purple_value_destroy);
|
||||
151
net-im/spectrum/files/spectrum.cfg
Normal file
151
net-im/spectrum/files/spectrum.cfg
Normal file
@@ -0,0 +1,151 @@
|
||||
[service]
|
||||
# enable this spectrum instance
|
||||
enable=1
|
||||
|
||||
# one of: aim, facebook, gg, icq, irc, msn, myspace, qq, simple, xmpp, yahoo
|
||||
protocol=S2P
|
||||
|
||||
# component ip
|
||||
server=127.0.0.1
|
||||
|
||||
# if use_proxy is 1, the http_proxy env var will be used as the proxy server
|
||||
# for example export http_proxy="http://user:passwd@your.proxy.server:port/"
|
||||
use_proxy=0
|
||||
|
||||
# component JID
|
||||
jid=S2P.example.com
|
||||
|
||||
# component secret
|
||||
password=secret
|
||||
|
||||
# component port
|
||||
port=5347
|
||||
|
||||
config_interface = /var/run/spectrum/S2P.sock
|
||||
|
||||
# IP:port where filetransfer proxy binds to. This has to be public IP.
|
||||
#filetransfer_bind_address=192.0.2.1:12345
|
||||
|
||||
# IP:port which will be sent in filetransfer request as stream host.
|
||||
#filetransfer_public_address=192.0.2.1:12345
|
||||
|
||||
# admin JIDs - Jabber IDs of transport administrators who have access to admin adhoc commands
|
||||
# separated by semicolons
|
||||
#admins=admin@example.com;foo@bar.cz
|
||||
|
||||
# directory where downloaded files will be saved
|
||||
filetransfer_cache=/var/lib/spectrum/S2P/filetransfer_cache
|
||||
|
||||
# URL used to acces filestransfer_cache directory from the web.
|
||||
filetransfer_web=http://example.com/files/
|
||||
|
||||
# name of transport (this will appear in service discovery)
|
||||
name=My S2P Transport
|
||||
|
||||
# default language
|
||||
language=en
|
||||
|
||||
# transport features separated by semicolons
|
||||
# combination of: avatars, chatstate, filetransfer
|
||||
# if commented, all features will be used
|
||||
# This variable is DEPRECATED and will be removed in future versions. Use [features] instead.
|
||||
#transport_features = avatars;chatstate;filetransfer
|
||||
|
||||
# if vip_mode is 1, users are divided to 2 groups according to 'vip' database field
|
||||
vip_mode=0
|
||||
|
||||
# if vip_mode is 1, you can set transport to be availabe only for VIP users by setting only_for_vip to 1.
|
||||
only_for_vip=0
|
||||
|
||||
# if vip_mode is 1 and only_for_vip is 1, users can connect from these servers even they are not VIP.
|
||||
# This feature is useful, if you want to enable transport only for users from your server, but also want
|
||||
# to give access to VIP users from other servers (for example from GTalk)
|
||||
# seperated by semicolons
|
||||
#allowed_servers=localhost
|
||||
|
||||
# transport features separated by semicolons which will be used for VIP users.
|
||||
# combination of: avatars, chatstate, filetransfer
|
||||
# if commented, all features will be used
|
||||
# This variable is DEPRECATED and will be removed in future versions. Use [vip-features] instead.
|
||||
#vip_features = avatars;chatstate;filetransfer
|
||||
|
||||
# pid file
|
||||
pid_file=/var/run/spectrum/S2P.pid
|
||||
|
||||
# require_tls to connect legacy network
|
||||
#require_tls=false
|
||||
|
||||
# Eventloop used by Spectrum. Allows to change default use of poll to epoll,
|
||||
# which should be faster and handles more connections better.
|
||||
# WARNING: some 3rd party libpurple protocol plugins are not prepared to be
|
||||
# used with different eventloop, but protocols included in libpurple by default
|
||||
# works OK.
|
||||
#eventloop=glib
|
||||
|
||||
[registration]
|
||||
# Set to 0 to disable transport registration to everyone except
|
||||
# people from host from allowed_servers list.
|
||||
#enable_public_registration=1
|
||||
|
||||
# You can override username registered by transport user. This is useful
|
||||
# for example if you want to let users to register only their Facebook name
|
||||
# and internally connect them to facebook_name@chat.facebook.com.
|
||||
# $username variable is replaced by username which has been registered
|
||||
# by particular user.
|
||||
#username_mask = $username@chat.facebook.com
|
||||
|
||||
# This option allows you to white-list newly created accounts according
|
||||
# to regexp. for example allowed_usernames=*.\.gmail\.com$ will allow only
|
||||
# GTalk users to register. If you use username_mask, then username_mask is
|
||||
# applied before this option.
|
||||
#allowed_usernames=regexp
|
||||
|
||||
# Label used to described username field in registration form
|
||||
#username_label = Facebook username
|
||||
|
||||
# This variable overrides default instructions text in registration form.
|
||||
#instructions = Type your Facebook name here:
|
||||
|
||||
# Transport features, all features are enabled by default.
|
||||
[features]
|
||||
#filetransfer=1
|
||||
#avatars=1
|
||||
#chatstates=1
|
||||
#statistics=1
|
||||
|
||||
# Transport features for VIP users, all features are enabled by default.
|
||||
[vip-features]
|
||||
#filetransfer=1
|
||||
#avatars=1
|
||||
#chatstates=1
|
||||
|
||||
[logging]
|
||||
# log file, needs to be unique for each spectrum instance
|
||||
log_file=/var/log/spectrum/S2P.log
|
||||
|
||||
# log areas
|
||||
# combination of: xml, purple
|
||||
log_areas=xml;purple
|
||||
|
||||
[database]
|
||||
# mysql or sqlite
|
||||
type=sqlite
|
||||
|
||||
# hostname (not needed for sqlite)
|
||||
#host=localhost
|
||||
|
||||
# username (not needed for sqlite)
|
||||
#user=user
|
||||
|
||||
# password (not needed for sqlite)
|
||||
#password=password
|
||||
# sqlite: set path to database file here
|
||||
# mysql: set to name of database
|
||||
database=/var/lib/spectrum/S2P/database/S2P.sqlite
|
||||
# table prefix for multiple transport instances sharing the same database
|
||||
#prefix=S2P_
|
||||
|
||||
[purple]
|
||||
# avatar, vcard, roster storage
|
||||
# needs to be unique for each spectrum instance
|
||||
userdir=/var/lib/spectrum/S2P/userdir
|
||||
7
net-im/spectrum/files/spectrum.confd
Normal file
7
net-im/spectrum/files/spectrum.confd
Normal file
@@ -0,0 +1,7 @@
|
||||
# /etc/conf.d/spectrum.S2P: config file for spectrum S2P transport
|
||||
|
||||
# Configfile
|
||||
CONFFILE="/etc/spectrum/S2P.cfg"
|
||||
|
||||
# PID
|
||||
PIDFILE="/var/run/spectrum/S2P.pid"
|
||||
22
net-im/spectrum/files/spectrum.initd
Normal file
22
net-im/spectrum/files/spectrum.initd
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use jabber-server
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting SPECTRUMGEN2PROTOCOL XMPP/Spectrum Transport"
|
||||
start-stop-daemon --start --pidfile ${PIDFILE} \
|
||||
--chuid jabber:jabber --exec /usr/bin/spectrum -- ${CONFFILE}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping SPECTRUMGEN2PROTOCOL XMPP/Spectrum Transport"
|
||||
start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
|
||||
eend $?
|
||||
}
|
||||
151
net-im/spectrum/files/spectrum.symlink.cfg
Normal file
151
net-im/spectrum/files/spectrum.symlink.cfg
Normal file
@@ -0,0 +1,151 @@
|
||||
[service]
|
||||
# enable this spectrum instance
|
||||
enable=1
|
||||
|
||||
# one of: aim, facebook, gg, icq, irc, msn, myspace, qq, simple, xmpp, yahoo
|
||||
protocol=$filename:protocol
|
||||
|
||||
# component ip
|
||||
server=127.0.0.1
|
||||
|
||||
# if use_proxy is 1, the http_proxy env var will be used as the proxy server
|
||||
# for example export http_proxy="http://user:passwd@your.proxy.server:port/"
|
||||
use_proxy=0
|
||||
|
||||
# component JID
|
||||
jid=$protocol.example.com
|
||||
|
||||
# component secret
|
||||
password=secret
|
||||
|
||||
# component port
|
||||
port=$filename:port
|
||||
|
||||
config_interface = /var/run/spectrum/$protocol.sock
|
||||
|
||||
# IP:port where filetransfer proxy binds to. This has to be public IP.
|
||||
#filetransfer_bind_address=192.0.2.1:$port
|
||||
|
||||
# IP:port which will be sent in filetransfer request as stream host.
|
||||
#filetransfer_public_address=192.0.2.1:$port
|
||||
|
||||
# admin JIDs - Jabber IDs of transport administrators who have access to admin adhoc commands
|
||||
# separated by semicolons
|
||||
#admins=admin@example.com;foo@bar.cz
|
||||
|
||||
# directory where downloaded files will be saved
|
||||
filetransfer_cache=/var/lib/spectrum/$protocol/filetransfer_cache
|
||||
|
||||
# URL used to acces filestransfer_cache directory from the web.
|
||||
filetransfer_web=http://example.com/files/
|
||||
|
||||
# name of transport (this will appear in service discovery)
|
||||
name=My $protocol Transport
|
||||
|
||||
# default language
|
||||
language=en
|
||||
|
||||
# transport features separated by semicolons
|
||||
# combination of: avatars, chatstate, filetransfer
|
||||
# if commented, all features will be used
|
||||
# This variable is DEPRECATED and will be removed in future versions. Use [features] instead.
|
||||
#transport_features = avatars;chatstate;filetransfer
|
||||
|
||||
# if vip_mode is 1, users are divided to 2 groups according to 'vip' database field
|
||||
vip_mode=0
|
||||
|
||||
# if vip_mode is 1, you can set transport to be availabe only for VIP users by setting only_for_vip to 1.
|
||||
only_for_vip=0
|
||||
|
||||
# if vip_mode is 1 and only_for_vip is 1, users can connect from these servers even they are not VIP.
|
||||
# This feature is useful, if you want to enable transport only for users from your server, but also want
|
||||
# to give access to VIP users from other servers (for example from GTalk)
|
||||
# seperated by semicolons
|
||||
#allowed_servers=localhost
|
||||
|
||||
# transport features separated by semicolons which will be used for VIP users.
|
||||
# combination of: avatars, chatstate, filetransfer
|
||||
# if commented, all features will be used
|
||||
# This variable is DEPRECATED and will be removed in future versions. Use [vip-features] instead.
|
||||
#vip_features = avatars;chatstate;filetransfer
|
||||
|
||||
# pid file
|
||||
pid_file=/var/run/spectrum/$protocol.pid
|
||||
|
||||
# require_tls to connect legacy network
|
||||
#require_tls=false
|
||||
|
||||
# Eventloop used by Spectrum. Allows to change default use of poll to epoll,
|
||||
# which should be faster and handles more connections better.
|
||||
# WARNING: some 3rd party libpurple protocol plugins are not prepared to be
|
||||
# used with different eventloop, but protocols included in libpurple by default
|
||||
# works OK.
|
||||
#eventloop=glib
|
||||
|
||||
[registration]
|
||||
# Set to 0 to disable transport registration to everyone except
|
||||
# people from host from allowed_servers list.
|
||||
#enable_public_registration=1
|
||||
|
||||
# You can override username registered by transport user. This is useful
|
||||
# for example if you want to let users to register only their Facebook name
|
||||
# and internally connect them to facebook_name@chat.facebook.com.
|
||||
# $username variable is replaced by username which has been registered
|
||||
# by particular user.
|
||||
#username_mask = $username@chat.facebook.com
|
||||
|
||||
# This option allows you to white-list newly created accounts according
|
||||
# to regexp. for example allowed_usernames=*.\.gmail\.com$ will allow only
|
||||
# GTalk users to register. If you use username_mask, then username_mask is
|
||||
# applied before this option.
|
||||
#allowed_usernames=regexp
|
||||
|
||||
# Label used to described username field in registration form
|
||||
#username_label = Facebook username
|
||||
|
||||
# This variable overrides default instructions text in registration form.
|
||||
#instructions = Type your Facebook name here:
|
||||
|
||||
# Transport features, all features are enabled by default.
|
||||
[features]
|
||||
#filetransfer=1
|
||||
#avatars=1
|
||||
#chatstates=1
|
||||
#statistics=1
|
||||
|
||||
# Transport features for VIP users, all features are enabled by default.
|
||||
[vip-features]
|
||||
#filetransfer=1
|
||||
#avatars=1
|
||||
#chatstates=1
|
||||
|
||||
[logging]
|
||||
# log file, needs to be unique for each spectrum instance
|
||||
log_file=/var/log/spectrum/$protocol.log
|
||||
|
||||
# log areas
|
||||
# combination of: xml, purple
|
||||
log_areas=xml;purple
|
||||
|
||||
[database]
|
||||
# mysql or sqlite
|
||||
type=sqlite
|
||||
|
||||
# hostname (not needed for sqlite)
|
||||
#host=localhost
|
||||
|
||||
# username (not needed for sqlite)
|
||||
#user=user
|
||||
|
||||
# password (not needed for sqlite)
|
||||
#password=password
|
||||
# sqlite: set path to database file here
|
||||
# mysql: set to name of database
|
||||
database=/var/lib/spectrum/$protocol/database/$protocol.sqlite
|
||||
# table prefix for multiple transport instances sharing the same database
|
||||
#prefix=$protocol_
|
||||
|
||||
[purple]
|
||||
# avatar, vcard, roster storage
|
||||
# needs to be unique for each spectrum instance
|
||||
userdir=/var/lib/spectrum/$protocol/userdir
|
||||
25
net-im/spectrum/files/spectrum2.initd
Normal file
25
net-im/spectrum/files/spectrum2.initd
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2012 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() {
|
||||
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 $?
|
||||
}
|
||||
Reference in New Issue
Block a user