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:
parent
0783bcee97
commit
13a59c3636
|
@ -0,0 +1,12 @@
|
||||||
|
AUX spectrum-1.4.7_remoteroster.patch 1408 SHA256 de84c845a4f8a4a9c30d2c18d15a55623ddbfde02fbd963b91d09d8b1fc8b652 SHA512 b74edc60ec62b9feca7799db749b42bed7fa728e7cef1a82c052820a71f663496973fe3188593f4f2f5331ea5cecc9559fe99a6f3103dc8913c7e6700b579885 WHIRLPOOL ee71083330cccf019ababa44a26108b468329d9a3286cc28d4c6f9d43a45dc39125ffc3086f9d67737be7a2e068e380c13d18258def2d4770b98d4414360d2b5
|
||||||
|
AUX spectrum.cfg 4770 SHA256 c29eb5bed5776bdce171eb303e0e6815b60dc3c61f2a311492204337145cbe85 SHA512 ab1d9e976ef5b0c29518e5ce3e92c94e970058d41854b8db98f93d410e21fb6e0d8ea179f6f43ee9da1228d4c7ebb33af1f0213a518ba0aefb62f369f9030866 WHIRLPOOL 78d3abf5e7cd494660f5153e60d5dc14d5e616db2573c30398b8d767d9c05f34c881004bb5761189ff76ac13834d02dbcb14b0335747dcce22d6691aa80fa333
|
||||||
|
AUX spectrum.confd 157 SHA256 5f1c7a7c614ffb15ba64caadd560088cf3a8032f3973489a31f65c89ce286c85 SHA512 511213a0bb4d91b22d3c9ac8e90978248076a9697cbeaa5bfd53eaac3ce1850f78739768dc88f2443519b64dc61f278be32ed408f0c7b2f64f29c01f94fc5fee WHIRLPOOL 5fee736176e83e264af7229836bec5a09bcd598cfaaf7dea9f8362e3c864d6a241128d96c9030d3640247692b250b39d7d1f906bad7caa2c08961d10468a445d
|
||||||
|
AUX spectrum.initd 592 SHA256 80c37c82dcd1b867400de4e23433ec0b822418d2858b441dd464259e650bf27b SHA512 ed6a168a42842969804938ef7fd1a4d0d6c8a98feb5727ac41b21c22a874a4ebb1410b760e396c2f9296207fca7499a07ee85b994d2f9222cca0c834c559ff17 WHIRLPOOL 3c36392881880806af8f47983cc742d735aa2597b7444c26021d5d9038b1c3b9c658df474e23722727116ff8b2d7052209d68fa14241d5e0f0d42da032f7fa37
|
||||||
|
AUX spectrum.symlink.cfg 4855 SHA256 3dfb88f041ae3a835241ea4c128ce6958a95f944534349aebdb56d9d74efe1f3 SHA512 bdd31ae8093a10e6d4f8851451230cccf47132e3374b46863e03b793d4495901f366858dd8b2ea02143f932cf5abc63f4719be3b8ef0325fea6db11e54d458ad WHIRLPOOL 363dd7aaa569b061b2b0e09a1cfa9280f87d1c26c503a14b921e7a36ec956b7d517a668fe64be170f2fc73b1658439cca449e4f043b3c94714055d9c8c27fdf7
|
||||||
|
AUX spectrum2.initd 636 SHA256 89e516647bda5c039fe933837212a79f9390879938ba1abd3b0a187066a687be SHA512 07b728025b1df78f1e3c9141b516b07d85dfeb7c8d51f077627c544d21f1e7b0be99444fe92f78a675e583d2d3b67bcb091f1bb2b90a0eb19bf8cf794cfeab60 WHIRLPOOL 65032107ffa1931b28ce9f9b614dc681f20a29b42e16af5a9a2ff87e98937ca83994d3c8f2c1365a9c34384b6e6a7440f1e7199483c2110051da50afc92549b6
|
||||||
|
DIST spectrum-1.4.8.tar.gz 239725 SHA256 40045139cdeb7fbc085fe80bb8124b518bb57520fbb644bc50b132de8cebc3cc SHA512 05f5932ba4e5d42107b2bf1396d5c410a792d9692841d82676eaf136b0a051b9efa3232d6a82d3ad1fe4b4d77b8e6e34e005145456957633bc88a9b5d3095094 WHIRLPOOL 822fd187282bb663073aa80b2358b4314193db43387f493fee5161c7992e9dda9accbf3609c3f5ee4cc3aea63b733284a5b2c77a0187332432a608c9f21d39a2
|
||||||
|
DIST spectrum-2.0.0-beta2.tar.gz 273480 SHA256 51e0db3000de13258b4a2562a40511d40eb6e39aa45728f4ae5efcd520b2c4c7 SHA512 95caa53f8f13c822a6e07635fb9b7e277a4fa97505d5020649ef77221033b3aa23bb6fc0cd3756ed440ef19d5a141f24122d975b063320cecce3a3a02a4a7b64 WHIRLPOOL 9a215317dd7d50482248cb0aa06f0a18052bc3270ee0a1632736b23cfa86a7c640ed991150959648d93c77007b13a3a5af8a057fb192ccbaf328ef61bd42d6f2
|
||||||
|
EBUILD spectrum-1.4.8.ebuild 3656 SHA256 a1b79306dbfb807582a9d9660a67f279ee0077c69d500442dbb9514fc93c0f39 SHA512 d9b279e1d7db99b0700b051b68ab8d708ee8663235e4777685d60849dbf56e60d54a3c54f4f4051c89149ba2e8a395b6bc2796d11729314719054c6c9757318e WHIRLPOOL 387bfd16b75c3007ae80da4e682afcf56a2d78aa47671d138e4e1692feb1f459230e0572cce46a7c36273e7976a72195f0a5720e663ac5a3aa53705903722367
|
||||||
|
EBUILD spectrum-2.0.0_beta2.ebuild 2934 SHA256 a5b426bab6f9d75c9a3e3b4513fd20afe3f8d4abc67c93cc383db6c08e640447 SHA512 6c3534509cee03d6b08422c1ce390d43877d1e3e6284a0cd35de119944cc7ae140bc486a2522b95c1ffaf9440ec4c216adec39a8d7403bf0cabe777e06b895cf WHIRLPOOL b155a5ddd4c0387625842196da33dffcf9c26de1c8400d856c2156f42e351a8d9227b92147df5bebfbc88a67a7deb6e558a9226f58c0df9667071dd02ce6c977
|
||||||
|
EBUILD spectrum-2.9999.ebuild 2911 SHA256 96f09aa66367860227087ecc4e2de65d4133495c379bda300e9748f08571450b SHA512 bc1b77318506aebea31e92c0a389b5a4c87651d8576ec1fdc617db8f9cb7c375a2eb954a80ef966d9be88be64a72404e9557d6efc5f0e0bd29ac4dfd4b858508 WHIRLPOOL 582f504b19b14354d4ee96da1d25c654289627681ac56f55e6810da8a67ae01ae852b6476b85392dcc3cf3b40fe7b6930f13791df0904d954305a025a0b9412f
|
||||||
|
EBUILD spectrum-9999.ebuild 2934 SHA256 a5b426bab6f9d75c9a3e3b4513fd20afe3f8d4abc67c93cc383db6c08e640447 SHA512 6c3534509cee03d6b08422c1ce390d43877d1e3e6284a0cd35de119944cc7ae140bc486a2522b95c1ffaf9440ec4c216adec39a8d7403bf0cabe777e06b895cf WHIRLPOOL b155a5ddd4c0387625842196da33dffcf9c26de1c8400d856c2156f42e351a8d9227b92147df5bebfbc88a67a7deb6e558a9226f58c0df9667071dd02ce6c977
|
|
@ -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);
|
|
@ -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
|
|
@ -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"
|
|
@ -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 $?
|
||||||
|
}
|
|
@ -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
|
|
@ -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 $?
|
||||||
|
}
|
|
@ -0,0 +1,137 @@
|
||||||
|
# Copyright 1999-2010 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
|
EAPI=2
|
||||||
|
|
||||||
|
inherit cmake-utils
|
||||||
|
|
||||||
|
DESCRIPTION="XMPP transport/gateway"
|
||||||
|
HOMEPAGE="http://spectrum.im"
|
||||||
|
|
||||||
|
SRC_URI="https://github.com/downloads/hanzz/libtransport/${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
|
||||||
|
IUSE="mysql sqlite symlinks tools staticport"
|
||||||
|
|
||||||
|
RDEPEND="dev-libs/libev
|
||||||
|
>=dev-libs/poco-1.3.3[mysql?,sqlite?]
|
||||||
|
dev-python/xmpppy
|
||||||
|
media-gfx/imagemagick[cxx]
|
||||||
|
>=net-im/pidgin-2.6.0
|
||||||
|
>=net-libs/gloox-1.0"
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
dev-util/cmake
|
||||||
|
sys-devel/gettext"
|
||||||
|
|
||||||
|
PROTOCOL_LIST="aim facebook gg icq irc msn msn_pecan myspace qq simple sipe twitter xmpp yahoo"
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
# Declare (start) port
|
||||||
|
port=5347
|
||||||
|
|
||||||
|
# prepare config for mysql or just copy
|
||||||
|
cp "${FILESDIR}/spectrum.cfg" "${WORKDIR}/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 "${WORKDIR}/spectrum.cfg" || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
# install shared-config when using symlinks
|
||||||
|
if use symlinks; then
|
||||||
|
insinto /etc/spectrum
|
||||||
|
newins "${WORKDIR}"/spectrum.cfg spectrum-shared-conf || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
# install protocol-specific configs or symlinks
|
||||||
|
insinto /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 > "${WORKDIR}"/spectrum.confd
|
||||||
|
else
|
||||||
|
sed -e 's,\$filename:protocol,'${protocol}',g' \
|
||||||
|
-e 's,\$filename:port,'${port}',g' \
|
||||||
|
"${WORKDIR}"/spectrum.cfg > "${WORKDIR}/${protocol}.cfg" || die
|
||||||
|
sed -e 's,PROTOCOL,'${protocol}',g' \
|
||||||
|
"${FILESDIR}"/spectrum.confd > "${WORKDIR}"/spectrum.confd
|
||||||
|
doins "${WORKDIR}/${protocol}.cfg" || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
# install prepared confd
|
||||||
|
newconfd "${WORKDIR}"/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
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
# Create jabber-user
|
||||||
|
enewgroup jabber
|
||||||
|
enewuser jabber -1 -1 -1 jabber
|
||||||
|
|
||||||
|
# Set correct rights
|
||||||
|
chown root:jabber -R "/etc/spectrum" || die
|
||||||
|
chown jabber:jabber -R "/var/lib/spectrum" || 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/lib/spectrum" || die
|
||||||
|
chmod 750 "/var/log/spectrum" || die
|
||||||
|
chmod 750 "/var/run/spectrum" || die
|
||||||
|
}
|
|
@ -0,0 +1,110 @@
|
||||||
|
|
||||||
|
# Copyright 1999-2012 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
|
EAPI="4"
|
||||||
|
|
||||||
|
[[ ${PV} = *9999* ]] && VCS_ECLASS="git-2" || VCS_ECLASS=""
|
||||||
|
|
||||||
|
inherit cmake-utils versionator ${VCS_ECLASS}
|
||||||
|
|
||||||
|
DESCRIPTION="Spectrum is a XMPP transport/gateway"
|
||||||
|
HOMEPAGE="http://spectrum.im"
|
||||||
|
if [[ ${PV} == *9999* ]]; then
|
||||||
|
EGIT_REPO_URI="git://github.com/hanzz/libtransport.git"
|
||||||
|
else
|
||||||
|
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}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="2"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE_PLUGINS="frotz irc jabber purple skype sms twitter yahoo"
|
||||||
|
IUSE="debug doc libev mysql postgres sqlite test ${IUSE_PLUGINS}"
|
||||||
|
|
||||||
|
# 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[ssl]" || RDEPEND="=net-im/swift-2.0_beta1[ssl]"
|
||||||
|
|
||||||
|
RDEPEND="${RDEPEND}
|
||||||
|
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_prepare() {
|
||||||
|
# no patches as of now
|
||||||
|
#epatch "${FILESDIR}"/spectrum2-.patch
|
||||||
|
base_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
keepdir "${EPREFIX}"/var/lib/spectrum2
|
||||||
|
keepdir "${EPREFIX}"/var/log/spectrum2
|
||||||
|
keepdir "${EPREFIX}"/var/run/spectrum2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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 "${EPREFIX}/var/log/spectrum2" || die
|
||||||
|
chown jabber:jabber -R "${EPREFIX}/var/run/spectrum2" || die
|
||||||
|
chmod 750 "/etc/spectrum2" || die
|
||||||
|
chmod 750 "${EPREFIX}/var/log/spectrum2" || die
|
||||||
|
chmod 750 "${EPREFIX}/var/run/spectrum2" || die
|
||||||
|
}
|
|
@ -0,0 +1,89 @@
|
||||||
|
# Copyright 1999-2012 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
|
EAPI="4"
|
||||||
|
|
||||||
|
[[ ${PV} = *9999* ]] && VCS_ECLASS="git-2" || VCS_ECLASS=""
|
||||||
|
|
||||||
|
inherit cmake-utils ${VCS_ECLASS}
|
||||||
|
|
||||||
|
DESCRIPTION="Spectrum is an XMPP transport/gateway"
|
||||||
|
HOMEPAGE="http://spectrum.im"
|
||||||
|
|
||||||
|
if [[ ${PV} == *9999* ]]; then
|
||||||
|
EGIT_REPO_URI="git://github.com/hanzz/libtransport.git"
|
||||||
|
else
|
||||||
|
MY_PV="${PV/_/-}"
|
||||||
|
SRC_URI="http://spectrum.im/attachments/download/57/${PN}-${MY_PV}.tar.gz"
|
||||||
|
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS=""
|
||||||
|
|
||||||
|
IUSE_PLUGINS="frotz irc purple skype smstools"
|
||||||
|
IUSE="debug doc libev log mysql postgres sqlite staticport symlinks test tools ${IUSE_PLUGINS}"
|
||||||
|
|
||||||
|
RDEPEND="net-im/jabber-base
|
||||||
|
net-im/swiften
|
||||||
|
dev-libs/popt
|
||||||
|
dev-libs/openssl
|
||||||
|
log? ( dev-libs/log4cxx )
|
||||||
|
mysql? ( virtual/mysql )
|
||||||
|
postgres? ( dev-libs/libpqxx )
|
||||||
|
sqlite? ( dev-db/sqlite:3 )
|
||||||
|
frotz? ( dev-libs/protobuf )
|
||||||
|
irc? ( net-im/communi dev-libs/protobuf )
|
||||||
|
purple? ( >=net-im/pidgin-2.6.0 dev-libs/protobuf )
|
||||||
|
skype? ( dev-libs/dbus-glib x11-base/xorg-server[xvfb] dev-libs/protobuf )
|
||||||
|
libev? ( dev-libs/libev dev-libs/protobuf )"
|
||||||
|
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
sys-devel/gettext
|
||||||
|
dev-util/cmake
|
||||||
|
doc? ( app-doc/doxygen )
|
||||||
|
test? ( dev-util/cppunit )
|
||||||
|
"
|
||||||
|
|
||||||
|
REQUIRED_USE="|| ( sqlite mysql postgres )"
|
||||||
|
|
||||||
|
PROTOCOL_LIST="aim facebook gg icq irc msn msn_pecan myspace qq simple sipe twitter xmpp yahoo"
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
CMAKE_IN_SOURCE_BUILD=1
|
||||||
|
use debug && CMAKE_BUILD_TYPE=Debug
|
||||||
|
MYCMAKEARGS="-DLIB_INSTALL_DIR=$(get_libdir)"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
use sqlite || { sed -i -e 's/find_package(sqlite3)/set(SQLITE3_FOUND FALSE)/' CMakeLists.txt || die; }
|
||||||
|
use mysql || { sed -i -e 's/find_package(mysql)/set(MYSQL_FOUND FALSE)/' CMakeLists.txt || die; }
|
||||||
|
use postgres || { sed -i -e 's/find_package(pqxx)/set(PQXX_FOUND FALSE)/' CMakeLists.txt || die; }
|
||||||
|
use test || { sed -i -e 's/find_package(cppunit)/set(CPPUNIT_FOUND FALSE)/' CMakeLists.txt || die; }
|
||||||
|
use doc || { sed -i -e 's/find_package(Doxygen)/set(DOXYGEN_FOUND FALSE)/' CMakeLists.txt || die; }
|
||||||
|
use purple || { sed -i -e '/find_package(purple)/d' CMakeLists.txt || die; }
|
||||||
|
use libev || { sed -i -e 's/find_package(event)/set(HAVE_EVENT FALSE)/' CMakeLists.txt || die; }
|
||||||
|
use irc || { sed -i -e 's/find_package(Communi)/set(IRC_FOUND, FALSE)/' CMakeLists.txt || die; }
|
||||||
|
use log || { sed -i -e 's/find_package(log4cxx)/set(LOG4CXX_FOUND, FALSE)/' CMakeLists.txt || die; }
|
||||||
|
|
||||||
|
base_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
cmake-utils_src_install
|
||||||
|
|
||||||
|
newinitd "${FILESDIR}"/spectrum2.initd spectrum
|
||||||
|
keepdir "${EPREFIX}"/var/lib/spectrum2
|
||||||
|
keepdir "${EPREFIX}"/var/log/spectrum2
|
||||||
|
keepdir "${EPREFIX}"/var/run/spectrum2
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
# Set correct rights
|
||||||
|
chown jabber:jabber -R "/etc/spectrum2"
|
||||||
|
chown jabber:jabber "${EPREFIX}"/var/lib/spectrum2
|
||||||
|
chown jabber:jabber "${EPREFIX}"/var/log/spectrum2
|
||||||
|
chown jabber:jabber "${EPREFIX}"/var/run/spectrum2
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
spectrum-2.0.0_beta2.ebuild
|
|
@ -0,0 +1,3 @@
|
||||||
|
DIST swift-2.0rc1.tar.gz 8810733 SHA256 e7c046d2be03c6decbb0cea2887a1d79675b1dd7a9331acfc7838251cff004c6 SHA512 efe1d4e25afd2eeed873690acc7f6ba1d893b924cfa045b3cdaabbc103fe75e411ad693124f41fcd2c603e013ad3c1e73e0040e3383d62ddb115be8c485ddf51 WHIRLPOOL 10e204813e6ce2061e1c286e290d23088b969f2ae721d90cd0f28b9734b389435b5b09a6e93b745b9a755bf08df45b912be52c4fad6c0c0494b3e3c2714fa6cb
|
||||||
|
EBUILD swift-2.0_rc1.ebuild 4284 SHA256 d61c5017ae23da832f61a63ff2555019f0501728ccc0f9f86a9bc857ed87cf38 SHA512 7229e8122848239abee24d782d62b09bf62d86f22b4b296f71d9e6fd63137950370b8feece8b95eaf7d71dd088e3d581d7597b8b04ccf06947b0dbfe001e0442 WHIRLPOOL 0a89d4d415fcfc104c8518ef4426a97041323c9a443de069704ff17589282d7c7cedcc01cea389c8e5a1aefb2740e69e3b48a02cd5a5194c7c777199d819dd59
|
||||||
|
EBUILD swift-9999.ebuild 4155 SHA256 533bace0697943443c90bc72ca82ee33ad7725e0d8865d1ad5d019606e48d69e SHA512 6549a448751125ad2fb37d3e87531cac1a22c6a6160bc730d64417ab6da69c9a76ec1fbe8599eca3b8f2c8b55fcb425bf4617a1704d7e7b108e98395af20412c WHIRLPOOL 6278eae38502b789dc84707176df51e20dc2baa5f56ccfaa1328701b0699c107d654d047d6efcce0e58f40b7d04af2eb91f186c39298de14e78d8f224fd995a5
|
|
@ -0,0 +1,186 @@
|
||||||
|
# Copyright 1999-2011 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
|
EAPI=4
|
||||||
|
|
||||||
|
LANGS=" ca de es fr hu nl pl ru se sk"
|
||||||
|
|
||||||
|
[[ ${PV} = *9999* ]] && VCS_ECLASS="git-2" || VCS_ECLASS=""
|
||||||
|
|
||||||
|
inherit multilib toolchain-funcs linux-info qt4-r2 scons-utils ${VCS_ECLASS}
|
||||||
|
|
||||||
|
inherit versionator
|
||||||
|
MY_PN="swift"
|
||||||
|
MY_PV=$(replace_version_separator 2 '')
|
||||||
|
MY_P="${MY_PN}-${MY_PV}"
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
DESCRIPTION="Your friendly chat client"
|
||||||
|
HOMEPAGE="http://swift.im/"
|
||||||
|
if [[ ${PV} == *9999* ]] ; then
|
||||||
|
EGIT_REPO_URI="git://swift.im/swift"
|
||||||
|
else
|
||||||
|
SRC_URI="http://swift.im/downloads/releases/${MY_P}/${MY_P}.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
if [[ ${PV} == *9999* ]] ; then
|
||||||
|
KEYWORDS=""
|
||||||
|
else
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
fi
|
||||||
|
|
||||||
|
IUSE="avahi 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? (
|
||||||
|
avahi? ( net-dns/avahi )
|
||||||
|
!avahi? ( net-misc/mDNSResponder )
|
||||||
|
)
|
||||||
|
net-dns/libidn
|
||||||
|
sys-libs/zlib
|
||||||
|
qt4? (
|
||||||
|
x11-libs/libXScrnSaver
|
||||||
|
x11-libs/qt-gui
|
||||||
|
x11-libs/qt-webkit
|
||||||
|
)
|
||||||
|
"
|
||||||
|
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 avahi && 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)
|
||||||
|
$(use zeroconf && use_scons !avahi bonjour)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
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 !avahi; 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 avahi ; 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 avahi && 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"
|
||||||
|
}
|
|
@ -0,0 +1,180 @@
|
||||||
|
# Copyright 1999-2011 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
|
EAPI=4
|
||||||
|
|
||||||
|
LANGS=" ca de es fr hu nl pl ru se sk"
|
||||||
|
|
||||||
|
[[ ${PV} = *9999* ]] && VCS_ECLASS="git-2" || VCS_ECLASS=""
|
||||||
|
|
||||||
|
inherit multilib toolchain-funcs linux-info qt4-r2 scons-utils ${VCS_ECLASS}
|
||||||
|
|
||||||
|
DESCRIPTION="Your friendly chat client"
|
||||||
|
HOMEPAGE="http://swift.im/"
|
||||||
|
if [[ ${PV} == *9999* ]] ; then
|
||||||
|
EGIT_REPO_URI="git://swift.im/swift"
|
||||||
|
else
|
||||||
|
SRC_URI="http://swift.im/downloads/releases/${P}/${P}.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
if [[ ${PV} == *9999* ]] ; then
|
||||||
|
KEYWORDS=""
|
||||||
|
else
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
fi
|
||||||
|
|
||||||
|
IUSE="avahi 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? (
|
||||||
|
avahi? ( net-dns/avahi )
|
||||||
|
!avahi? ( net-misc/mDNSResponder )
|
||||||
|
)
|
||||||
|
net-dns/libidn
|
||||||
|
sys-libs/zlib
|
||||||
|
qt4? (
|
||||||
|
x11-libs/libXScrnSaver
|
||||||
|
x11-libs/qt-gui
|
||||||
|
x11-libs/qt-webkit
|
||||||
|
)
|
||||||
|
"
|
||||||
|
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 avahi && 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)
|
||||||
|
$(use zeroconf && use_scons !avahi bonjour)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
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 !avahi; 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 avahi ; 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 avahi && 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