Changeset - 188f6ead5aac
[Not reviewed]
0 2 32
Chel Sea (chain) - 11 years ago 2013-01-31 11:41:06
chain@rpgfiction.net
added ebuilds from server branch
34 files changed with 2166 insertions and 111 deletions:
app-portage/.DS_Store
bin+new file
0 comments (0 inline, 0 general)
app-backup/vzdump/vzdump-1.2_p16.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2009 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: /var/cvsroot/gentoo-x86/app-backup/vzdump/vzdump-1.2.ebuild,v 1.2 2009/12/16 20:09:18 bangert Exp $
 

	
 
EAPI="2"
 

	
 
DESCRIPTION="A utility to make consistent snapshots of running OpenVZ containers."
 
HOMEPAGE="http://www.proxmox.com/cms_proxmox/en/virtualization/openvz/vzdump/"
 
SRC_URI="http://download.proxmox.com/debian/dists/lenny/pve/binary-amd64/vzdump_1.2-16_all.deb"
 

	
 
LICENSE="GPL-2"
 
SLOT="0"
 
KEYWORDS="~x86 ~amd64"
 
IUSE=""
 

	
 
RDEPEND="dev-lang/perl
 
	dev-perl/LockFile-Simple
 
	virtual/perl-Getopt-Long
 
	sys-cluster/vzctl
 
	net-misc/rsync
 
	app-misc/cstream
 
	virtual/mta
 
	sys-fs/lvm2"
 

	
 
src_install() {
 
		cp -pPR * "${D}"/ || die
 
}
 

	
 
src_unpack() {
 
        unpack ${A}
 
        unpack ./data.tar.gz
 
        rm -f control.tar.gz data.tar.gz debian-binary
 
}
app-backup/vzdump/vzdump-2011.09.13.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2009 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: /var/cvsroot/gentoo-x86/app-backup/vzdump/vzdump-1.2.ebuild,v 1.2 2009/12/16 20:09:18 bangert Exp $
 

	
 
EAPI="2"
 

	
 
inherit versionator
 

	
 
MY_PV=$(replace_all_version_separators '-')
 
MY_P="${PN}_${MY_PV}"
 
S="${WORKDIR}/${MY_P}"
 

	
 
DESCRIPTION="A utility to make consistent snapshots of running OpenVZ containers."
 
HOMEPAGE="http://www.proxmox.com/cms_proxmox/en/virtualization/openvz/vzdump/"
 
SRC_URI="http://download.proxmox.com/sources/${MY_P}.tar.gz"
 

	
 
LICENSE="GPL-2"
 
SLOT="0"
 
KEYWORDS="~x86 ~amd64"
 
IUSE=""
 

	
 
RDEPEND="dev-lang/perl
 
	dev-perl/LockFile-Simple
 
	virtual/perl-Getopt-Long
 
	sys-cluster/vzctl
 
	net-misc/rsync
 
	app-misc/cstream
 
	virtual/mta
 
	sys-fs/lvm2"
 

	
 
src_compile() {
 
	:;
 
}
 

	
 
src_install() {
 
	local installvendorlib
 
	eval "$(perl -V:installvendorlib )"
 
	make PERLLIBDIR="${installvendorlib}/PVE" DESTDIR="${D}" install || die "make install failed"
 
	dodoc ChangeLog TODO
 
}
app-backup/vzdump/vzdump_2011-09-13.tar.gz
Show inline comments
 
new file 100644
 
binary diff not shown
app-portage/.DS_Store
Show inline comments
 
new file 100644
 
binary diff not shown
app-portage/findcruft/files/digest-findcruft-1.0.4-r1
Show inline comments
 
new file 100644
 
MD5 1ec42866aca3ed9a1ac146bc58c155c6 findcruft-1.0.4.tar.bz2 16636
 
RMD160 73e0266e9a83bf7aacfd0a3a3659da179d23b040 findcruft-1.0.4.tar.bz2 16636
 
SHA256 6fde43f77b83f95dba65174de0505b2914f6fdabd583e039d1009902b21aeed7 findcruft-1.0.4.tar.bz2 16636
 
MD5 47eef5256ca8a1951ff8fe04df0dd40e findcruft-config-20050807.tar.bz2 8125
 
RMD160 3caf0db0f7931a72ad8d095bddf7e08fea222c71 findcruft-config-20050807.tar.bz2 8125
 
SHA256 12577badc39daa00a34ba9935a0a07371d80376bc3025cf43a46e17f86823b01 findcruft-config-20050807.tar.bz2 8125
dev-java/red5-bin/files/21red5
Show inline comments
 
new file 100644
 
CONFIG_PROTECT="/opt/red5/conf /var/lib/red5-webapps"
dev-java/red5-bin/files/red5.confd
Show inline comments
 
new file 100644
 
# Red5's User
 
RED5_USER=red5
dev-java/red5-bin/files/red5.initd
Show inline comments
 
new file 100644
 
#!/sbin/runscript
 
# Copyright 1999-2007 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License, v2
 
# $Header: $
 

	
 
depend() {
 
	need net
 
	use dns logger postgresql mysql
 
}
 

	
 
start()	{
 
	ebegin "Starting Red5"
 
        cd /opt/red5
 
	su -s /bin/bash -c "/usr/bin/nohup /opt/red5/red5.sh &" ${RED5_USER}
 
	eend $?
 
}
 

	
 
stop ()	{
 
	ebegin "Stopping Red5"
 
        su -s /bin/bash -c "killall -q -u ${RED5_USER} java" ${RED5_USER}
 
	eend $?
 
}
 

	
dev-java/red5-bin/red5-bin-0.9.1.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2007 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: $
 

	
 
EAPI="2"
 
inherit eutils
 

	
 
MY_P=${P/_/}
 
S=${WORKDIR}/${MY_P}
 

	
 
DESCRIPTION="Open Source Flash Server written in Java"
 
HOMEPAGE="http://code.google.com/p/red5/"
 
SRC_URI="http://www.red5.org/downloads/0_9/red5-0.9.1.tar.gz"
 
LICENSE="LGPL-2.1"
 
SLOT="1"
 
KEYWORDS="~amd64 ~x86"
 
IUSE="doc source"
 
DEPEND=">=virtual/jdk-1.5
 
	>=dev-java/ant-core-1.5"
 
RDEPEND=">=virtual/jdk-1.5"
 

	
 
RED5_HOME=/opt/red5
 

	
 
pkg_setup() {
 
	enewgroup red5
 
	enewuser red5 -1 -1 ${RED5_HOME} red5
 
}
 

	
 

	
 
src_install() {
 
	newinitd "${FILESDIR}"/red5.initd red5
 
	newconfd "${FILESDIR}"/red5.confd red5
 
	doenvd "${FILESDIR}"/21red5
 

	
 
	if use doc ; then
 
		dodoc doc/*
 
	else
 
		rm -rf doc
 
	fi
 

	
 
	if ! use source ; then
 
		rm src.zip
 
	fi
 

	
 
	dodir ${RED5_HOME}
 
	cp -rp red5-0.9.1/* ${D}${RED5_HOME}
 
	fowners -R red5:red5 ${RED5_HOME}
 
	fperms 0750 ${RED5_HOME}/red5.sh
 
	dosym ${RED5_HOME}/webapps /var/lib/red5-webapps
 
}
dev-python/twisted-xish/files/twisted-xish-0.1.0-tests-2.1-compat.patch
Show inline comments
 
new file 100644
 
Index: Twisted/twisted/xish/test/test_domish.py
 
===================================================================
 
--- Twisted/twisted/xish/test/test_domish.py	(revision 14510)
 
+++ Twisted/twisted/xish/test/test_domish.py	(revision 14511)
 
@@ -84,11 +84,10 @@
 
 query3_elem1 = xpath.internQuery("/error[not(@xmlns)]")
 
 
 
 class DomishStreamTestCase(unittest.TestCase):    
 
-    def __init__(self):
 
+    def setUp(self):
 
         self.doc_started = False
 
         self.packet_count = 0
 
         self.doc_ended = False
 
-        self.match_list = []
 
 
 
     def _docStarted(self, root):
 
         self.doc_started = True
 
@@ -106,9 +105,6 @@
 
         self.stream.DocumentStartEvent = self._docStarted
 
         self.stream.ElementEvent = self._elementMatched
 
         self.stream.DocumentEndEvent = self._docEnded
 
-        self.doc_started = False
 
-        self.packet_count = 0
 
-        self.doc_ended = False
 
         self.match_list = matches
 
     
 
     def testSuxStream(self):
dev-python/twisted-xish/twisted-xish-0.1.0-r2.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2006 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: $ 
 

	
 
MY_PACKAGE=Xish
 

	
 
inherit twisted
 

	
 
DESCRIPTION="Twisted Xish is an XML library with XPath-ish and DOM-ish support."
 

	
 
KEYWORDS="alpha amd64 ia64 ppc sparc x86"
 

	
 
DEPEND=">=dev-python/twisted-2"
 

	
 
src_unpack() {
 
	unpack ${A}
 
	cd "${S}"
 
	epatch "${FILESDIR}/${P}-tests-2.1-compat.patch"
 
	cat > twisted/xish/_version.py <<-EOF
 
		from twisted.python import versions
 
		version = versions.Version(__name__[:__name__.rfind('.')], 0, 1, 0)
 
	EOF
 
}
net-analyzer/centreon/centreon-2.3.8.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2008 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/centreon/centreon-1.4.2.4.ebuild,v 1.3 2008/04/03 08:30:17 hollow Exp $
 
EAPI=2
 

	
 
inherit depend.apache depend.php
 

	
 
DESCRIPTION="Centreon is a monitoring web-frontend based on the nagios monitoring engine"
 
HOMEPAGE="http://www.centreon.org"
 
SRC_URI="http://download.centreon.com/${PN}/${P}.tar.gz"
 

	
 
LICENSE="GPL-2"
 
SLOT="0"
 
KEYWORDS="~amd64 ~x86"
 
IUSE="ldap xmlwriter"
 

	
 
#version 1 cannot be upgraded
 
DEPEND="!<net-analyzer/centreon-2"
 

	
 
RDEPEND="
 
	>=net-analyzer/nagios-3
 
	net-analyzer/rrdtool[perl]
 
	net-analyzer/net-snmp[perl]
 
	net-analyzer/snmptt
 
	net-analyzer/ndoutils
 
	app-admin/sudo
 
	>=dev-lang/php-5[xmlwriter?,mysql,ldap?,posix,snmp,soap,truetype]
 
	>=dev-php/PEAR-PEAR-1.8.1
 
	dev-php/smarty
 
	dev-php/PEAR-Archive_Tar
 
	dev-php/PEAR-Console_Getopt
 
	>=dev-php/PEAR-DB-1.7.6
 
	>=dev-php/PEAR-DB_DataObject_FormBuilder-1.0.0_rc4
 
	>=dev-php/PEAR-Date-1.4.6
 
	>=dev-php/PEAR-HTML_QuickForm_advmultiselect-1.1.0
 
	>=dev-php/PEAR-HTML_Table-1.6.1
 
	>=dev-php/PEAR-MDB2-2.0.0
 
	>=dev-php/PEAR-Net_Ping-2.4.1
 
	>=dev-php/PEAR-Net_Traceroute-0.21
 
	>=dev-php/PEAR-SOAP-0.10.1
 
	>=dev-php/PEAR-Validate-0.6.2
 
	dev-perl/Config-IniFiles
 
	dev-perl/Crypt-DES
 
	dev-perl/DBI
 
	dev-perl/Digest-HMAC
 
	dev-perl/Digest-SHA1
 
	dev-perl/GD
 
	dev-perl/IO-Socket-INET6
 
	dev-perl/Net-SNMP
 
	dev-perl/Socket6"
 

	
 
need_apache2
 
need_php5
 

	
 
setup_vars() {
 
	INSTALL_DIR_OREON="/usr/share/centreon"
 
	INSTALL_DIR_CENTREON="/usr/share/centreon"
 
	OREON_PATH=${INSTALL_DIR_OREON}
 
	CENTREON_ETC="/etc/centreon"
 
	CENTREON_VARLIB="/var/lib/centreon"
 
	VARLIB_CENTERON=${CENTERON_VARLIB}
 
	CENTREON_LOG="/var/log/centreon"
 
	CENTREON_PATH=${OREON_PATH}
 
	CENTREON_RUNDIR="/var/run/centreon"
 
	CENTREON_GENDIR="/var/cache/centreon"
 
	CENTSTORAGE_RRD="${CENTREON_GENDIR}/rrd"
 
	CENTSTORAGE_LIB="${CENTREON_RRD}"
 
	CENTPLUGINS_TMP="${CENTREON_GENDIR}/tmp"
 
	CENTPLUGINSTRAPS_BINDIR="/usr/sbin"
 

	
 
	INSTALL_DIR_NAGIOS="/usr/share/nagios"
 
	NAGIOS_ETC="/etc/nagios"
 
	NAGIOS_VAR="/var/nagios"
 
	NAGIOS_BIN="/usr/sbin"
 
	NAGIOS_BINARY="${NAGIOS_BIN}/nagios"
 
	NAGIOSTATS_BINARY="${NAGIOS_BINARY}tats"
 
	NAGIOS_PLUGINS="/usr/lib/nagios/plugins"
 
	NAGIOS_PLUGIN=${NAGIOS_PLUGINS}
 
	NAGIOS_IMG="${INSTALL_DIR_NAGIOS}/htdocs/images"
 
	NAGIOS_INIT_SCRIPT="/etc/init.d/nagios"
 
	NAGIOS_USER="nagios"
 
	NAGIOS_GROUP="nagios"
 

	
 
	NDOMOD_BINARY="/usr/bin/ndomod-3x.o"
 
	BIN_RRDTOOL="/usr/bin/rrdtool"
 
	BIN_MAIL="/bin/mail"
 
	BIN_SSH="/usr/bin/ssh"
 
	BIN_SCP="/usr/bin/scp"
 
	MAILER="/bin/mail"
 
}
 

	
 
pkg_setup() {
 
	require_php_sapi_from apache2 cli
 
	require_gd
 

	
 
	setup_vars
 
}
 

	
 
varsubst() {
 
	local path=$1
 

	
 
	for var in "$@"; do
 
		sed -i -e "s:@${var}@:$(eval echo \$${var}):g" "${D}${path}"
 
	done
 
}
 

	
 
install_centreon() {
 
	cd "${S}"
 

	
 
	# copy www and doc files
 
	insinto "${OREON_PATH}"
 
	doins -r www
 
	dosym /usr/share/nagios/htdocs/docs "${OREON_PATH}"/doc
 

	
 
	# sanitize file modes
 
	find "${D}${OREON_PATH}" -type d -exec chmod 755 {} \;
 
	find "${D}${OREON_PATH}" -type f -exec chmod 644 {} \;
 

	
 
	# keep important directories
 
	keepdir "${OREON_PATH}"/www/modules
 
	keepdir /var/log/centreon
 
	keepdir /var/cache/centreon/rrd
 
	keepdir /var/cache/centreon/smarty/{cache,config,compile}
 
	keepdir /var/cache/centreon/generate/{nagiosCFG,osm}
 
	keepdir /var/cache/centreon/tmp
 
	keepdir /var/cache/centreon/upload/nagiosCFG
 
	dosym /var/cache/centreon/generate /var/cache/centreon/filesGeneration
 

	
 
	# prepare SQL files
 
	varsubst "${OREON_PATH}"/www/install/insertBaseConf.sql \
 
		NAGIOS_{USER,GROUP,ETC,BIN,VAR,PLUGIN,PLUGINS,IMG,BINARY,INIT_SCRIPT} \
 
		INSTALL_DIR_NAGIOS INSTALL_DIR_{OREON,CENTREON} \
 
		BIN_RRDTOOL BIN_MAIL MAILER NDOMOD_BINARY NAGIOSTATS_BINARY
 

	
 
	varsubst "${OREON_PATH}"/www/install/createTablesCentstorage.sql \
 
		NAGIOS_VAR CENTSTORAGE_RRD
 

	
 
	# fix paths in php files
 
	varsubst "${OREON_PATH}"/www/include/configuration/configCGI/formCGI.php \
 
		NAGIOS_ETC INSTALL_DIR_NAGIOS
 

	
 
	varsubst "${OREON_PATH}"/www/include/options/oreon/upGrade/preUpdate.php \
 
		OREON_PATH
 
        for i in $(find www/ -type f); do
 
                varsubst "${OREON_PATH}"/${i} CENTREON_{ETC,VARLIB,GENDIR,LOG} \
 
			MAILER CENTPLUGINSTRAPS_BINDIR
 
        done
 

	
 
	# fix preinstalled smarty
 
	sed -i "s:\.\./GPL_LIB/Smarty/libs/:Smarty/:" \
 
		"${D}${OREON_PATH}/www/header.php"
 
	sed -i "s:\(\(../\)\+\|$centreon_path/\)GPL_LIB/SmartyCache:/var/cache/centreon/smarty:" \
 
                  "${D}${OREON_PATH}/www/include/common/common-Func.php"
 
	sed -i "s:$centreon_path . 'GPL_LIB/Smarty/libs/':'Smarty/':" \
 
		"${D}${OREON_PATH}/www/include/monitoring/external_cmd/popup/popup.php"
 

	
 

	
 
	# install apache config
 
	insinto "${APACHE_MODULES_CONFDIR}"
 
	doins "${FILESDIR}"/99_centreon.conf
 

	
 
	# install global installation config
 
	insinto "${OREON_PATH}"/www/install
 
	newins "${FILESDIR}"/initial-installconf.php install.conf.php
 

	
 
	# set permissions
 
	fowners -R apache:apache \
 
		/var/cache/centreon \
 
		"${OREON_PATH}"/www
 

	
 
	fowners -R nagios:apache \
 
		/var/log/centreon
 
}
 

	
 
install_plugins() {
 
	cd "${S}"
 

	
 
	# install plugin configuration
 
	insinto /etc/centreon
 
	doins ./plugins/src/centreon.conf
 
	rm -f ./plugins/src/centreon.conf
 
	dosym "${NAGIOS_PLUGINS}/centreon.conf" /etc/centreon/centreon.conf
 

	
 
	varsubst /etc/centreon/centreon.conf \
 
		INSTALL_DIR_NAGIOS INSTALL_DIR_OREON \
 
		NAGIOS_ETC NAGIOS_PLUGINS
 

	
 
	fowners -R apache:apache \
 
		/etc/centreon
 

	
 
	# install nagios plugins
 
	exeinto "${NAGIOS_PLUGINS}"
 

	
 
	for plugin in ./plugins/src/*; do
 
		if [[ ! -d "${plugin}" ]]; then
 
			doexe "${plugin}"
 
			varsubst "${NAGIOS_PLUGINS}/$(basename "${plugin}")" \
 
				NAGIOS_PLUGINS NAGIOS_VAR CENTREON_ETC \
 
				CENTPLUGINS_TMP
 
		fi
 
	done
 
}
 

	
 
install_traps() {
 
	cd "${S}"
 

	
 
	# install snmp traps plugins
 
	dodir "${NAGIOS_PLUGINS}"/traps
 
	dodir /etc/snmp/centreon
 
	dosym /etc/snmp/centreon /etc/snmp/centreon_traps
 

	
 
	# install snmp configs
 
	insinto /etc/snmp/centreon
 
	doins plugins/src/traps/conf/snmptt.ini
 
	fowners -R apache:nagios /etc/snmp/centreon
 

	
 
	insinto /etc/snmp/
 
	doins plugins/src/traps/conf/snmp.conf
 
	doins plugins/src/traps/conf/snmptrapd.conf
 
}
 

	
 
install_daemons() {
 
	cd "${S}"
 

	
 
	# install daemon
 
	insinto /usr
 
	dosbin bin/*
 
	for i in $(find bin/ -type f); do
 
	        varsubst /usr/sbin/$(basename "${i}") \
 
			CENTREON_{LOG,PATH,RUNDIR,ETC,VARLIB,DIR} \
 
			NAGIOS_{USER,GROUP} BIN_{SSH,SCP} CENTPLUGINS_TMP \
 
			CENTSTORAGE_LIB
 
        done
 
	# install daemon library files
 
	insinto /usr/share/centreon/lib
 
	doins lib/*
 

	
 
	# install init script
 
	newinitd "${FILESDIR}"/centreon.initd centreon
 

	
 
	# keep important directories
 
	keepdir /etc/centreon
 
	keepdir /var/run/centreon
 
	keepdir /var/log/centreon
 
	keepdir /var/lib/centreon
 
	keepdir /var/lib/centreon/database
 

	
 
	# set permissions
 
	fowners -R nagios:nagios \
 
		/var/run/centreon \
 
		/var/log/centreon \
 
		/var/lib/centreon/database
 
}
 

	
 
install_cron() {
 
	cd "${S}"
 

	
 
	insinto "${OREON_PATH}"
 
	doins -r cron
 

	
 
	fperms +x "${OREON_PATH}"/cron/*
 

	
 
	for i in $(find cron/ -type f); do
 
		varsubst "${OREON_PATH}"/${i} \
 
			CENTREON_{PATH,ETC,VARLIB,LOG,RUNDIR} \
 
			VARLIB_CENTREON
 
	done
 

	
 
	insinto /etc/cron.d
 
	newins "${FILESDIR}"/centreon-2.cron centreon
 
}
 

	
 
src_install() {
 
	install_centreon
 
	install_plugins
 
	install_traps
 
	install_daemons
 
	install_cron
 
}
 

	
 
pkg_config() {
 
	setup_vars
 

	
 
	einfo "Setting permissions on ${ROOT}${NAGIOS_ETC}"
 
	chown nagios:apache "${ROOT}${NAGIOS_ETC}"
 
	chmod 0775 "${ROOT}${NAGIOS_ETC}"
 

	
 
	einfo "Setting permissions on ${ROOT}${NAGIOS_PLUGINS}"
 
	chown nagios:apache "${ROOT}${NAGIOS_PLUGINS}"
 
	chmod 0775 "${ROOT}${NAGIOS_PLUGINS}"
 

	
 
	einfo "Setting permissions on ${ROOT}${NAGIOS_PLUGINS}/contrib"
 
	chown nagios:apache "${ROOT}${NAGIOS_PLUGINS}"/contrib
 
	chmod 0775 "${ROOT}${NAGIOS_PLUGINS}"/contrib
 

	
 
	einfo "Adding user apache to group nagios"
 
	usermod -a -G nagios apache
 

	
 
	SUDOERS="${ROOT}etc/sudoers"
 

	
 
	if ! grep -q CENTREON "${SUDOERS}"; then
 
		einfo "Adding sudo configuration"
 
		echo >> "${SUDOERS}"
 
		echo "# centreon configuration" >> "${SUDOERS}"
 
		echo "User_Alias  CENTREON=apache" >> "${SUDOERS}"
 
		echo "CENTREON    ALL = NOPASSWD: /etc/init.d/nagios restart" >> "${SUDOERS}"
 
		echo "CENTREON    ALL = NOPASSWD: /etc/init.d/nagios reload"  >> "${SUDOERS}"
 
		echo "CENTREON    ALL = NOPASSWD: /etc/init.d/snmptrapd restart" >> "${SUDOERS}"
 
	fi
 
}
net-analyzer/centreon/centreon-2.3.9.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2008 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/centreon/centreon-1.4.2.4.ebuild,v 1.3 2008/04/03 08:30:17 hollow Exp $
 
EAPI=2
 

	
 
inherit depend.apache depend.php
 

	
 
DESCRIPTION="Centreon is a monitoring web-frontend based on the nagios monitoring engine"
 
HOMEPAGE="http://www.centreon.org"
 
SRC_URI="http://download.centreon.com/${PN}/${P}.tar.gz"
 

	
 
LICENSE="GPL-2"
 
SLOT="0"
 
KEYWORDS="~amd64 ~x86"
 
IUSE="ldap xmlwriter"
 

	
 
#version 1 cannot be upgraded
 
DEPEND="!<net-analyzer/centreon-2"
 

	
 
RDEPEND="
 
	>=net-analyzer/nagios-3
 
	net-analyzer/rrdtool[perl]
 
	net-analyzer/net-snmp[perl]
 
	net-analyzer/snmptt
 
	net-analyzer/ndoutils
 
	app-admin/sudo
 
	>=dev-lang/php-5[xmlwriter?,mysql,ldap?,posix,snmp,soap,truetype]
 
	>=dev-php/PEAR-PEAR-1.8.1
 
	dev-php/smarty
 
	dev-php/PEAR-Archive_Tar
 
	dev-php/PEAR-Console_Getopt
 
	>=dev-php/PEAR-DB-1.7.6
 
	>=dev-php/PEAR-DB_DataObject_FormBuilder-1.0.0_rc4
 
	>=dev-php/PEAR-Date-1.4.6
 
	>=dev-php/PEAR-HTML_QuickForm_advmultiselect-1.1.0
 
	>=dev-php/PEAR-HTML_Table-1.6.1
 
	>=dev-php/PEAR-MDB2-2.0.0
 
	>=dev-php/PEAR-Net_Ping-2.4.1
 
	>=dev-php/PEAR-Net_Traceroute-0.21
 
	>=dev-php/PEAR-SOAP-0.10.1
 
	>=dev-php/PEAR-Validate-0.6.2
 
	dev-perl/Config-IniFiles
 
	dev-perl/Crypt-DES
 
	dev-perl/DBI
 
	dev-perl/Digest-HMAC
 
	dev-perl/Digest-SHA1
 
	dev-perl/GD
 
	dev-perl/IO-Socket-INET6
 
	dev-perl/Net-SNMP
 
	dev-perl/Socket6"
 

	
 
need_apache2
 
need_php5
 

	
 
setup_vars() {
 
	INSTALL_DIR_OREON="/usr/share/centreon"
 
	INSTALL_DIR_CENTREON="/usr/share/centreon"
 
	OREON_PATH=${INSTALL_DIR_OREON}
 
	CENTREON_ETC="/etc/centreon"
 
	CENTREON_VARLIB="/var/lib/centreon"
 
	VARLIB_CENTERON=${CENTERON_VARLIB}
 
	CENTREON_LOG="/var/log/centreon"
 
	CENTREON_PATH=${OREON_PATH}
 
	CENTREON_RUNDIR="/var/run/centreon"
 
	CENTREON_GENDIR="/var/cache/centreon"
 
	CENTSTORAGE_RRD="${CENTREON_GENDIR}/rrd"
 
	CENTSTORAGE_LIB="${CENTREON_RRD}"
 
	CENTPLUGINS_TMP="${CENTREON_GENDIR}/tmp"
 
	CENTPLUGINSTRAPS_BINDIR="/usr/sbin"
 

	
 
	INSTALL_DIR_NAGIOS="/usr/share/nagios"
 
	NAGIOS_ETC="/etc/nagios"
 
	NAGIOS_VAR="/var/nagios"
 
	NAGIOS_BIN="/usr/sbin"
 
	NAGIOS_BINARY="${NAGIOS_BIN}/nagios"
 
	NAGIOSTATS_BINARY="${NAGIOS_BINARY}tats"
 
	NAGIOS_PLUGINS="/usr/lib/nagios/plugins"
 
	NAGIOS_PLUGIN=${NAGIOS_PLUGINS}
 
	NAGIOS_IMG="${INSTALL_DIR_NAGIOS}/htdocs/images"
 
	NAGIOS_INIT_SCRIPT="/etc/init.d/nagios"
 
	NAGIOS_USER="nagios"
 
	NAGIOS_GROUP="nagios"
 

	
 
	NDOMOD_BINARY="/usr/bin/ndomod-3x.o"
 
	BIN_RRDTOOL="/usr/bin/rrdtool"
 
	BIN_MAIL="/bin/mail"
 
	BIN_SSH="/usr/bin/ssh"
 
	BIN_SCP="/usr/bin/scp"
 
	MAILER="/bin/mail"
 
}
 

	
 
pkg_setup() {
 
	require_php_sapi_from apache2 cli
 
	require_gd
 

	
 
	setup_vars
 
}
 

	
 
varsubst() {
 
	local path=$1
 

	
 
	for var in "$@"; do
 
		sed -i -e "s:@${var}@:$(eval echo \$${var}):g" "${D}${path}"
 
	done
 
}
 

	
 
install_centreon() {
 
	cd "${S}"
 

	
 
	# copy www and doc files
 
	insinto "${OREON_PATH}"
 
	doins -r www
 
	dosym /usr/share/nagios/htdocs/docs "${OREON_PATH}"/doc
 

	
 
	# sanitize file modes
 
	find "${D}${OREON_PATH}" -type d -exec chmod 755 {} \;
 
	find "${D}${OREON_PATH}" -type f -exec chmod 644 {} \;
 

	
 
	# keep important directories
 
	keepdir "${OREON_PATH}"/www/modules
 
	keepdir /var/log/centreon
 
	keepdir /var/cache/centreon/rrd
 
	keepdir /var/cache/centreon/smarty/{cache,config,compile}
 
	keepdir /var/cache/centreon/generate/{nagiosCFG,osm}
 
	keepdir /var/cache/centreon/tmp
 
	keepdir /var/cache/centreon/upload/nagiosCFG
 
	dosym /var/cache/centreon/generate /var/cache/centreon/filesGeneration
 

	
 
	# prepare SQL files
 
	varsubst "${OREON_PATH}"/www/install/insertBaseConf.sql \
 
		NAGIOS_{USER,GROUP,ETC,BIN,VAR,PLUGIN,PLUGINS,IMG,BINARY,INIT_SCRIPT} \
 
		INSTALL_DIR_NAGIOS INSTALL_DIR_{OREON,CENTREON} \
 
		BIN_RRDTOOL BIN_MAIL MAILER NDOMOD_BINARY NAGIOSTATS_BINARY
 

	
 
	varsubst "${OREON_PATH}"/www/install/createTablesCentstorage.sql \
 
		NAGIOS_VAR CENTSTORAGE_RRD
 

	
 
	# fix paths in php files
 
	varsubst "${OREON_PATH}"/www/include/configuration/configCGI/formCGI.php \
 
		NAGIOS_ETC INSTALL_DIR_NAGIOS
 

	
 
	varsubst "${OREON_PATH}"/www/include/options/oreon/upGrade/preUpdate.php \
 
		OREON_PATH
 
        for i in $(find www/ -type f); do
 
                varsubst "${OREON_PATH}"/${i} CENTREON_{ETC,VARLIB,GENDIR,LOG} \
 
			MAILER CENTPLUGINSTRAPS_BINDIR
 
        done
 

	
 
	# fix preinstalled smarty
 
	sed -i "s:\.\./GPL_LIB/Smarty/libs/:Smarty/:" \
 
		"${D}${OREON_PATH}/www/header.php"
 
	sed -i "s:\(\(../\)\+\|$centreon_path/\)GPL_LIB/SmartyCache:/var/cache/centreon/smarty:" \
 
                  "${D}${OREON_PATH}/www/include/common/common-Func.php"
 
	sed -i "s:$centreon_path . 'GPL_LIB/Smarty/libs/':'Smarty/':" \
 
		"${D}${OREON_PATH}/www/include/monitoring/external_cmd/popup/popup.php"
 

	
 

	
 
	# install apache config
 
	insinto "${APACHE_MODULES_CONFDIR}"
 
	doins "${FILESDIR}"/99_centreon.conf
 

	
 
	# install global installation config
 
	insinto "${OREON_PATH}"/www/install
 
	newins "${FILESDIR}"/initial-installconf.php install.conf.php
 

	
 
	# set permissions
 
	fowners -R apache:apache \
 
		/var/cache/centreon \
 
		"${OREON_PATH}"/www
 

	
 
	fowners -R nagios:apache \
 
		/var/log/centreon
 
}
 

	
 
install_plugins() {
 
	cd "${S}"
 

	
 
	# install plugin configuration
 
	insinto /etc/centreon
 
	doins ./plugins/src/centreon.conf
 
	rm -f ./plugins/src/centreon.conf
 
	dosym "${NAGIOS_PLUGINS}/centreon.conf" /etc/centreon/centreon.conf
 

	
 
	varsubst /etc/centreon/centreon.conf \
 
		INSTALL_DIR_NAGIOS INSTALL_DIR_OREON \
 
		NAGIOS_ETC NAGIOS_PLUGINS
 

	
 
	fowners -R apache:apache \
 
		/etc/centreon
 

	
 
	# install nagios plugins
 
	exeinto "${NAGIOS_PLUGINS}"
 

	
 
	for plugin in ./plugins/src/*; do
 
		if [[ ! -d "${plugin}" ]]; then
 
			doexe "${plugin}"
 
			varsubst "${NAGIOS_PLUGINS}/$(basename "${plugin}")" \
 
				NAGIOS_PLUGINS NAGIOS_VAR CENTREON_ETC \
 
				CENTPLUGINS_TMP
 
		fi
 
	done
 
}
 

	
 
install_traps() {
 
	cd "${S}"
 

	
 
	# install snmp traps plugins
 
	dodir "${NAGIOS_PLUGINS}"/traps
 
	dodir /etc/snmp/centreon
 
	dosym /etc/snmp/centreon /etc/snmp/centreon_traps
 

	
 
	# install snmp configs
 
	insinto /etc/snmp/centreon
 
	doins plugins/src/traps/conf/snmptt.ini
 
	fowners -R apache:nagios /etc/snmp/centreon
 

	
 
	insinto /etc/snmp/
 
	doins plugins/src/traps/conf/snmp.conf
 
	doins plugins/src/traps/conf/snmptrapd.conf
 
}
 

	
 
install_daemons() {
 
	cd "${S}"
 

	
 
	# install daemon
 
	insinto /usr
 
	dosbin bin/*
 
	for i in $(find bin/ -type f); do
 
	        varsubst /usr/sbin/$(basename "${i}") \
 
			CENTREON_{LOG,PATH,RUNDIR,ETC,VARLIB,DIR} \
 
			NAGIOS_{USER,GROUP} BIN_{SSH,SCP} CENTPLUGINS_TMP \
 
			CENTSTORAGE_LIB
 
        done
 
	# install daemon library files
 
	insinto /usr/share/centreon/lib
 
	doins lib/*
 

	
 
	# install init script
 
	newinitd "${FILESDIR}"/centreon.initd centreon
 

	
 
	# keep important directories
 
	keepdir /etc/centreon
 
	keepdir /var/run/centreon
 
	keepdir /var/log/centreon
 
	keepdir /var/lib/centreon
 
	keepdir /var/lib/centreon/database
 

	
 
	# set permissions
 
	fowners -R nagios:nagios \
 
		/var/run/centreon \
 
		/var/log/centreon \
 
		/var/lib/centreon/database
 
}
 

	
 
install_cron() {
 
	cd "${S}"
 

	
 
	insinto "${OREON_PATH}"
 
	doins -r cron
 

	
 
	fperms +x "${OREON_PATH}"/cron/*
 

	
 
	for i in $(find cron/ -type f); do
 
		varsubst "${OREON_PATH}"/${i} \
 
			CENTREON_{PATH,ETC,VARLIB,LOG,RUNDIR} \
 
			VARLIB_CENTREON
 
	done
 

	
 
	insinto /etc/cron.d
 
	newins "${FILESDIR}"/centreon-2.cron centreon
 
}
 

	
 
src_install() {
 
	install_centreon
 
	install_plugins
 
	install_traps
 
	install_daemons
 
	install_cron
 
}
 

	
 
pkg_config() {
 
	setup_vars
 

	
 
	einfo "Setting permissions on ${ROOT}${NAGIOS_ETC}"
 
	chown nagios:apache "${ROOT}${NAGIOS_ETC}"
 
	chmod 0775 "${ROOT}${NAGIOS_ETC}"
 

	
 
	einfo "Setting permissions on ${ROOT}${NAGIOS_PLUGINS}"
 
	chown nagios:apache "${ROOT}${NAGIOS_PLUGINS}"
 
	chmod 0775 "${ROOT}${NAGIOS_PLUGINS}"
 

	
 
	einfo "Setting permissions on ${ROOT}${NAGIOS_PLUGINS}/contrib"
 
	chown nagios:apache "${ROOT}${NAGIOS_PLUGINS}"/contrib
 
	chmod 0775 "${ROOT}${NAGIOS_PLUGINS}"/contrib
 

	
 
	einfo "Adding user apache to group nagios"
 
	usermod -a -G nagios apache
 

	
 
	SUDOERS="${ROOT}etc/sudoers"
 

	
 
	if ! grep -q CENTREON "${SUDOERS}"; then
 
		einfo "Adding sudo configuration"
 
		echo >> "${SUDOERS}"
 
		echo "# centreon configuration" >> "${SUDOERS}"
 
		echo "User_Alias  CENTREON=apache" >> "${SUDOERS}"
 
		echo "CENTREON    ALL = NOPASSWD: /etc/init.d/nagios restart" >> "${SUDOERS}"
 
		echo "CENTREON    ALL = NOPASSWD: /etc/init.d/nagios reload"  >> "${SUDOERS}"
 
		echo "CENTREON    ALL = NOPASSWD: /etc/init.d/snmptrapd restart" >> "${SUDOERS}"
 
	fi
 
}
net-im/centerim/centerim-5.0_alpha1.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2008 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: /var/cvsroot/gentoo-x86/net-im/centerim/centerim-4.22.5.ebuild,v 1.7 2008/11/07 23:20:28 swegener Exp $
 

	
 
WANT_AUTOMAKE="none"
 

	
 
inherit eutils autotools
 

	
 
PROTOCOL_IUSE="aim gadu icq irc jabber lj msn rss yahoo"
 
IUSE="${PROTOCOL_IUSE} bidi nls ssl crypt jpeg otr"
 

	
 
DESCRIPTION="CenterIM is a fork of CenterICQ - a ncurses ICQ/Yahoo!/AIM/IRC/MSN/Jabber/GaduGadu/RSS/LiveJournal Client"
 
SRC_URI="http://www.centerim.org/download/cim5/centerim-5.0-alpha1.tar.bz2"
 
HOMEPAGE="http://www.centerim.org/"
 
SLOT="5"
 
LICENSE="GPL-2"
 
KEYWORDS="~amd64 ~x86 ~x86-fbsd"
 

	
 
DEPEND=">=sys-libs/ncurses-5.2
 
	bidi? ( dev-libs/fribidi )
 
	ssl? ( >=dev-libs/openssl-0.9.6g )
 
	jpeg? ( media-libs/jpeg )
 
	jabber? (
 
		otr? ( net-libs/libotr )
 
		crypt? ( >=app-crypt/gpgme-1.0.2 )
 
	)
 
	msn? (
 
		net-misc/curl
 
		dev-libs/openssl
 
	)"
 

	
 
RDEPEND="${DEPEND}
 
	nls? ( sys-devel/gettext )"
 

	
 
S="${WORKDIR}"/${P/centerim-5.0-alpha1}
 

	
 
check_protocol_iuse() {
 
	local flag
 

	
 
	for flag in ${PROTOCOL_IUSE}
 
	do
 
		use ${flag} && return 0
 
	done
 

	
 
	return 1
 
}
 

	
 
pkg_setup() {
 
	if ! check_protocol_iuse
 
	then
 
		eerror
 
		eerror "Please activate at least one of the following protocol USE flags:"
 
		eerror "${PROTOCOL_IUSE}"
 
		eerror
 
		die "Please activate at least one protocol USE flag!"
 
	fi
 

	
 
	if use msn && ! built_with_use net-misc/curl ssl
 
	then
 
		eerror
 
		eerror "As of right now, the msn use flags requires curl to be built"
 
		eerror "with SSL support. Make sure ssl is in your USE flags and"
 
		eerror "re-emerge net-misc/curl."
 
		eerror
 
		die "net-misc/curl dependencie issue"
 
	fi
 

	
 
	if use otr && ! use jabber
 
	then
 
		eerror
 
		eerror "Support for OTR is only supported with Jabber!"
 
		eerror
 
		die "Support for OTR is only supported with Jabber!"
 
	fi
 

	
 
	if use gadu && ! use jpeg
 
	then
 
		ewarn
 
		ewarn "You need jpeg support to be able to register Gadu-Gadu accounts!"
 
		ewarn
 
	fi
 
}
 

	
 
src_unpack() {
 
	unpack ${A}
 
	cd "${S}"
 

	
 
	eautoreconf
 

	
 
	# Don't execute git commands, bug #228151
 
	cat >"${S}"/misc/git-version-gen <<-EOF
 
		#!/bin/sh
 
		echo -n "${PVR}"
 
	EOF
 
}
 

	
 
src_compile() {
 
	econf \
 
		$(use_with ssl) \
 
		$(use_enable aim) \
 
		$(use_with bidi fribidi) \
 
		$(use_with jpeg libjpeg) \
 
		$(use_with otr libotr) \
 
		$(use_enable gadu gg) \
 
		$(use_enable icq) \
 
		$(use_enable irc) \
 
		$(use_enable jabber) \
 
		$(use_enable lj) \
 
		$(use_enable msn) \
 
		$(use_enable nls locales-fix) \
 
		$(use_enable nls) \
 
		$(use_enable rss) \
 
		$(use_enable yahoo) \
 
		|| die "econf failed"
 
	emake || die "emake failed"
 
}
 

	
 
src_install () {
 
	emake DESTDIR="${D}" install || die "emake install failed"
 

	
 
	dodoc AUTHORS ChangeLog FAQ README THANKS TODO
 
}
net-im/centerim/files/centerim-4.22.5-libotr-configure.patch
Show inline comments
 
new file 120000
 
/usr/portage/net-im/centerim/files/centerim-4.22.5-libotr-configure.patch
 
\ No newline at end of file
net-im/ejabberd/ejabberd-2.1.11-r1.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2012 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-2.1.9.ebuild,v 1.4 2012/03/06 11:40:51 radhermit Exp $
 

	
 
EAPI=4
 

	
 
inherit eutils multilib pam ssl-cert
 

	
 
DESCRIPTION="The Erlang Jabber Daemon"
 
HOMEPAGE="http://www.ejabberd.im/"
 
SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz
 
	mod_statsdx? ( mirror://gentoo/ejabberd-mod_statsdx-1080.patch.gz )"
 

	
 
LICENSE="GPL-2"
 
SLOT="0"
 
KEYWORDS="amd64 ~arm ~ia64 ~ppc ~sparc x86"
 
EJABBERD_MODULES="mod_irc mod_muc mod_proxy65 mod_pubsub mod_statsdx"
 
IUSE="captcha debug ldap odbc pam remoteroster +web zlib ${EJABBERD_MODULES}"
 

	
 
DEPEND=">=net-im/jabber-base-0.01
 
	>=dev-libs/expat-1.95
 
	>=dev-lang/erlang-12.2.5[ssl]
 
	odbc? ( dev-db/unixODBC )
 
	ldap? ( =net-nds/openldap-2* )
 
	>=dev-libs/openssl-0.9.8e
 
	captcha? ( media-gfx/imagemagick[truetype,png] )
 
	zlib? ( sys-libs/zlib )"
 
#>=sys-apps/shadow-4.1.4.2-r3 - fixes bug in su that made ejabberdctl unworkable.
 
RDEPEND="${DEPEND}
 
	>=sys-apps/shadow-4.1.4.2-r3
 
	pam? ( virtual/pam )"
 

	
 
S=${WORKDIR}/${P}/src
 

	
 
# paths in net-im/jabber-base
 
JABBER_ETC="${EPREFIX}/etc/jabber"
 
#JABBER_RUN="/var/run/jabber"
 
JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
 
JABBER_LOG="${EPREFIX}/var/log/jabber"
 
JABBER_DOC="${EPREFIX}/usr/share/doc/${PF}"
 

	
 
src_prepare() {
 
	if use mod_statsdx; then
 
		ewarn "mod_statsdx is not a part of upstream tarball but is a third-party module"
 
		ewarn "taken from here: http://www.ejabberd.im/mod_stats2file"
 
		EPATCH_OPTS="-p2" epatch "${WORKDIR}/ejabberd-mod_statsdx-1080.patch"
 
	fi
 

	
 
	if use remoteroster; then
 
		ewarn "Remote roster has not yet been accepted for consideration or"
 
		ewarn "approved in any official manner by the XMPP Standards Foundation,"
 
		ewarn "and is not yet an XMPP Extension Protocol (XEP)."
 
		EPATCH_OPTS="-d ${WORKDIR}/${P}" epatch "${FILESDIR}/ejabberd-2.1.x-remote-roster.patch"
 
	fi
 

	
 
	# don't install release notes (we'll do this manually)
 
	sed '/install .* [.][.]\/doc\/[*][.]txt $(DOCDIR)/d' -i Makefile.in || die
 
	# Set correct paths
 
	sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${PF}:}" \
 
		-e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
 
		-e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
 
		-e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
 
			-i Makefile.in || die
 
	sed -e "/EJABBERDDIR=/{s:ejabberd:${PF}:}" \
 
		-e "s|\(ETCDIR=\)@SYSCONFDIR@.*|\1${JABBER_ETC}|" \
 
		-e "s|\(LOGS_DIR=\)@LOCALSTATEDIR@.*|\1${JABBER_LOG}|" \
 
		-e "s|\(SPOOLDIR=\)@LOCALSTATEDIR@.*|\1${JABBER_SPOOL}|" \
 
			-i ejabberdctl.template || die
 

	
 
	# Set shell, so it'll work even in case jabber user have no shell
 
	# This is gentoo specific I guess since other distributions may have
 
	# ejabberd user with reall shell, while we share this user among different
 
	# jabberd implementations.
 
	sed '/^HOME/aSHELL=/bin/sh' -i ejabberdctl.template || die
 
	sed '/^export HOME/aexport SHELL' -i ejabberdctl.template || die
 

	
 
	#sed -e "s:/share/doc/ejabberd/:${JABBER_DOC}:" -i web/ejabberd_web_admin.erl
 

	
 
	# fix up the ssl cert paths in ejabberd.cfg to use our cert
 
	sed -e "s:/path/to/ssl.pem:/etc/ssl/ejabberd/server.pem:g" \
 
		-i ejabberd.cfg.example || die "Failed sed ejabberd.cfg.example"
 

	
 
	# correct path to captcha script in default ejabberd.cfg
 
	sed -e 's|\({captcha_cmd,[[:space:]]*"\).\+"}|\1/usr/'$(get_libdir)'/erlang/lib/'${P}'/priv/bin/captcha.sh"}|' \
 
			-i ejabberd.cfg.example || die "Failed sed ejabberd.cfg.example"
 

	
 
	# disable mod_irc in ejabberd.cfg
 
	if ! use mod_irc; then
 
		sed -i -e "s/{mod_irc,/%{mod_irc,/" \
 
			-i ejabberd.cfg.example || die "Failed to disable mod_irc"
 
	fi
 

	
 
}
 

	
 
src_configure() {
 
	econf \
 
		--docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
 
		--libdir="${EPREFIX}/usr/$(get_libdir)/erlang/lib/" \
 
		$(use_enable mod_irc) \
 
		$(use_enable ldap eldap) \
 
		$(use_enable mod_muc) \
 
		$(use_enable mod_proxy65) \
 
		$(use_enable mod_pubsub) \
 
		$(use_enable web) \
 
		$(use_enable odbc) \
 
		$(use_enable zlib ejabberd_zlib) \
 
		$(use_enable pam) \
 
		--enable-user=jabber
 
}
 

	
 
src_compile() {
 
	emake $(use debug && echo debug=true ejabberd_debug=true)
 
}
 

	
 
src_install() {
 
	emake DESTDIR="${ED}" install
 

	
 
	# Pam helper module permissions
 
	# http://www.process-one.net/docs/ejabberd/guide_en.html
 
	if use pam; then
 
		pamd_mimic_system xmpp auth account || die "Cannot create pam.d file"
 
		fowners root:jabber "/usr/$(get_libdir)/erlang/lib/${PF}/priv/bin/epam"
 
		fperms 4750 "/usr/$(get_libdir)/erlang/lib/${PF}/priv/bin/epam"
 
	fi
 

	
 
	cd "${WORKDIR}/${P}/doc"
 
	dodoc "release_notes_${PV%%_rc*}.txt"
 

	
 
	#dodir /var/lib/ejabberd
 
	newinitd "${FILESDIR}/${PN}-3.initd" ${PN}
 
	newconfd "${FILESDIR}/${PN}-3.confd" ${PN}
 
}
 

	
 
pkg_postinst() {
 
	elog "For configuration instructions, please see"
 
	elog "/usr/share/doc/${PF}/html/guide.html, or the online version at"
 
	elog "http://www.process-one.net/en/ejabberd/docs/guide_en/"
 

	
 
	if ! use web ; then
 
		ewarn
 
		ewarn "The web USE flag is off, this has disabled the web admin interface."
 
		ewarn
 
	fi
 

	
 
	elog
 
	elog '===================================================================='
 
	elog 'Quick Start Guide:'
 
	elog '1) Add output of `hostname -f` to /etc/jabber/ejabberd.cfg line 91'
 
	elog '   {hosts, ["localhost", "thehost"]}.'
 
	elog '2) Add an admin user to /etc/jabber/ejabberd.cfg line 360'
 
	elog '   {acl, admin, {user, "theadmin", "thehost"}}.'
 
	elog '3) Start the server'
 
	elog '   # /etc/init.d/ejabberd start'
 
	elog '4) Register the admin user'
 
	elog '   # /usr/sbin/ejabberdctl register theadmin thehost thepassword'
 
	elog '5) Log in with your favourite jabber client or using the web admin'
 

	
 
	# Upgrading from ejabberd-2.0.x:
 
	if grep -E '^[^#]*EJABBERD_NODE=' "${EROOT}/etc/conf.d/ejabberd" >/dev/null 2>&1; then
 
		source "${EROOT}/etc/conf.d/ejabberd"
 
		ewarn
 
		ewarn "!!! WARNING !!!  WARNING !!!  WARNING !!!  WARNING !!!"
 
		ewarn "Starting with 2.1.x some paths and configuration files were"
 
		ewarn "changed to reflect upstream intentions better. Notable changes are:"
 
		ewarn
 
		ewarn "1. Everything (even init scripts) is now handled with ejabberdctl script."
 
		ewarn "Thus main configuration file became /etc/jabberd/ejabberdctl.cfg"
 
		ewarn "You must update ERLANG_NODE there with the value of EJABBERD_NODE"
 
		ewarn "from /etc/conf.d/ejebberd or ejabberd will refuse to start."
 
		ewarn
 
		ewarn "2. SSL certificate is now generated with ssl-cert eclass and resides"
 
		ewarn "at standard location: /etc/ssl/ejabberd/server.pem."
 
		ewarn
 
		ewarn "3. Cookie now resides at /var/spool/jabber/.erlang.cookie"
 
		ewarn
 
		ewarn "4. /var/log/jabber/sasl.log is now /var/log/jabber/erlang.log"
 
		ewarn
 
		ewarn "5. Crash dumps (if any) will be located at /var/log/jabber"
 

	
 
		local i ctlcfg new_ctlcfg
 
		i=0
 
		ctlcfg=${EROOT}/etc/jabber/ejabberdctl.cfg
 
		while :; do
 
			new_ctlcfg=$(printf "${EROOT}/etc/jabber/._cfg%04d_ejabberdctl.cfg" ${i})
 
			[[ ! -e ${new_ctlcfg} ]] && break
 
			ctlcfg=${new_ctlcfg}
 
			((i++))
 
		done
 

	
 
		ewarn
 
		ewarn "Updating ${ctlcfg} (debug: ${new_ctlcfg})"
 
		sed -e "/#ERLANG_NODE=/aERLANG_NODE=$EJABBERD_NODE" "${ctlcfg}" > "${new_ctlcfg}" || die
 

	
 
		if [[ -e ${EROOT}/var/run/jabber/.erlang.cookie ]]; then
 
			ewarn "Moving .erlang.cookie..."
 
			if [[ -e ${EROOT}/var/spool/jabber/.erlang.cookie ]]; then
 
				mv -v "${EROOT}"/var/spool/jabber/.erlang.cookie{,bak}
 
			fi
 
			mv -v "${EROOT}"/var/{run/jabber,spool/jabber}/.erlang.cookie
 
		fi
 
		ewarn
 
		ewarn "We'll try to handle upgrade automagically but, please, do your"
 
		ewarn "own checks and do not forget to run 'etc-update'!"
 
		ewarn "PLEASE! Run 'etc-update' now!"
 
	fi
 

	
 
	SSL_ORGANIZATION="${SSL_ORGANIZATION:-Ejabberd XMPP Server}"
 
	install_cert /etc/ssl/ejabberd/server
 
	# Fix ssl cert permissions bug #369809
 
	chown root:jabber "${EROOT}/etc/ssl/ejabberd/server.pem"
 
	chmod 0440 "${EROOT}/etc/ssl/ejabberd/server.pem"
 
	if [[ -e ${EROOT}/etc/jabber/ssl.pem ]]; then
 
		ewarn
 
		ewarn "The location of SSL certificates has changed. If you are"
 
		ewarn "upgrading from ${CATEGORY}/${PN}-2.0.5* or earlier  you might"
 
		ewarn "want to move your old certificates from /etc/jabber into"
 
		ewarn "/etc/ssl/ejabberd/, update config files and"
 
		ewarn "rm /etc/jabber/ssl.pem to avoid this message."
 
		ewarn
 
	fi
 
}
net-im/jwchat/files/postinstall-en.txt
Show inline comments
 
new file 100644
 
For ${PN} to function correctly, these modules must be enabled in your
 
Apache installation:
 
 
	mod_negotiation
 
	mod_proxy
 
	mod_proxy_http (not needed for apache-1.x)
 
 
The the following settings must be in effect (at least
 
for this application):
 
 
	AddDefaultCharset UTF-8
 
	Options +MultiViews
 
	ProxyPass /http-bind/ http://127.0.0.1:8080/http-bind/ (or something
 
	similar, where the destination URL is the HTTP Binding URL for your XMPP
 
	server or HTTP Binding gateway)
net-im/jwchat/jwchat-1.0.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2005 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: $
 

	
 
S=${WORKDIR}/${PN}-${PV/_/}
 
MY_P=${P/_beta2/beta2}
 
DESCRIPTION="JWChat is a web based jabber client"
 
HOMEPAGE="http://jwchat.sourceforge.net"
 
SRC_URI="mirror://sourceforge/jwchat/${MY_P}.tar.gz"
 

	
 
LICENSE="GPL-2"
 
SLOT="0"
 
KEYWORDS="~x86"
 
IUSE=""
 

	
 
DEPEND="net-proxy/punjab
 
	dev-perl/Encode-compat
 
	>=perl-core/locale-maketext-1.01
 
	dev-perl/locale-maketext-fuzzy
 
	>=dev-perl/locale-maketext-lexicon-0.10
 
	dev-perl/regexp-common"					
 

	
 
src_unpack() {
 
	unpack ${A}
 
	
 
	#install messages only in user-selected languages:
 
	if [ -n "${LINGUAS}" ]; then
 
		local lang
 
		cd ${S}
 
		for lang in ${LINGUAS}; do
 
			[ -f "index.html.${lang}" ] && \
 
			MY_LOCALE_LANGUAGES="${MY_LOCALE_LANGUAGES} ${lang}"
 
		done
 
		export MY_LOCALE_LANGUAGES
 
	fi
 
}
 

	
 
src_install() {
 
	dodir /var/www/punjab/jwchat
 
	cd ${S}
 
	
 
		if [ -n "${MY_LOCALE_LANGUAGES}" ]; then
 
			local lang
 
				for lang in ${MY_LOCALE_LANGUAGES}; do
 
					cp *.html.${lang} *.js.${lang} ${D}/var/www/punjab/jwchat
 
				done
 
			cp *.html *.js jwchat.css ${D}/var/www/punjab/jwchat/
 
			dodir /var/www/punjab/jwchat/{images,sounds}
 
			cp images/* ${D}/var/www/punjab/jwchat/images/
 
			cp sounds/* ${D}/var/www/punjab/jwchat/sounds/
 
		else
 
			cp -r * ${D}/var/www/punjab/jwchat
 
		fi
 
	
 
	dodoc AUTHORS COPYING ChangeLog README 
 

	
 
	cd ${D}/var/www/punjab/jwchat
 
	perl -e 'for my $file (split("\n",`ls *.en`)) { $tmp = $file; $tmp =~s/\.en$//gi; rename($file,$tmp);}'
 
}
 

	
 
pkg_postinst(){
 
	echo
 
	einfo "Before using, please edit config.js file located at"
 
	einfo "/var/www/punjab/jwchat/. For jabberd server add" 
 
	einfo "punjab to the default runlevel and run punjab script."
 
	einfo "rc-update add punjab default; /etc/init.d/punjab start"
 
	echo
 
}
net-im/spectrum/files/spectrum2.initd
Show inline comments
 
new file 100644
 
#!/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 $?
 
}
net-im/spectrum/spectrum-2.0.0_beta2.ebuild
Show inline comments
 

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

	
 
EAPI=2
 
EAPI="4"
 

	
 
[[ ${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"
 
DESCRIPTION="Spectrum is a XMPP transport/gateway"
 
HOMEPAGE="http://spectrum.im"
 
if [[ ${PV} == *9999* ]] ; then
 
	EGIT_REPO_URI="https://github.com/hanzz/libtransport"
 
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="http://spectrum.im/attachments/download/59/${MY_P}.tar.gz"
 
	S="${WORKDIR}/${MY_P}"
 
fi
 

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

	
 
# TODO: IRC (ebuild missing!); PostgresSQL (anyone?)
 
IUSE_PLUGINS="frotz irc jabber purple skype sms twitter yahoo"
 
IUSE="debug doc libev log 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" || RDEPEND="=net-im/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/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 )
 
		"
 
	dev-libs/libev
 
	dev-libs/openssl
 
	dev-libs/popt
 
	dev-libs/protobuf
 
	log? ( dev-libs/log4cxx )
 
	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"
 
	dev-util/cmake
 
	sys-devel/gettext
 
	doc? ( app-doc/doxygen )
 
	test? ( dev-util/cppunit )
 
	"
 

	
 
REQUIRED_USE="|| ( sqlite mysql postgres )"
 

	
 
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
 
	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 log LOGS)
 
		$(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 "/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
 
	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
 
}
net-im/swift/swift-2.0_rc1.ebuild
Show inline comments
 
new file 100644
 
# 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"
 
}
net-misc/pyload/files/pyload-0.4.9-sanitize-config.patch
Show inline comments
 
new file 100644
 
diff -urN pyload.orig/module/config/default.conf pyload.new/module/config/default.conf
 
--- pyload.orig/module/config/default.conf	2011-12-29 13:06:43.000000000 +0100
 
+++ pyload.new/module/config/default.conf	2012-01-13 00:17:20.351549582 +0100
 
@@ -2,7 +2,7 @@
 
 
 
 remote - "Remote":
 
 	int port : "Port" = 7227
 
-	ip listenaddr : "Adress" = 0.0.0.0
 
+	ip listenaddr : "Adress" = 127.0.0.1
 
 	bool nolocalauth : "No authentication on local connections" = True
 
 	bool activated : "Activated" = True
 
 ssl - "SSL":
 
@@ -13,7 +13,7 @@
 
 	bool activated : "Activated" = True
 
 	builtin;threaded;fastcgi;lightweight server : "Server" = builtin
 
 	bool https : "Use HTTPS" = False
 
-	ip host : "IP" = 0.0.0.0
 
+	ip host : "IP" = 127.0.0.1
 
 	int port : "Port" = 8001
 
 	str template : "Template" = default
 
     str prefix: "Path Prefix" =
net-misc/pyload/pyload-0.4.8.ebuild
Show inline comments
 
@@ -16,48 +16,38 @@ else
 
	SRC_URI="http://get.pyload.org/static/${PN}-src-v${PV}.zip"
 
	KEYWORDS="~amd64 ~x86"
 
fi
 
DESCRIPTION="A fast, lightweight and full featured download manager for many One-Click-Hosters."
 

	
 
DESCRIPTION="A fast, lightweight and full featured download manager for many One-Click-Hoster."
 
HOMEPAGE="http://www.pyload.org"
 
LICENSE="freedist"
 
LICENSE="GPL-3"
 
SLOT="0"
 
IUSE="captcha clicknload container qt4 rar ssl systemd"
 
IUSE="captcha clicknload container curl qt4 rar ssl systemd"
 

	
 
DEPEND="app-arch/unzip"
 

	
 
RDEPEND="${DEPEND}
 
	dev-python/beautifulsoup
 
	dev-python/beaker
 
	dev-python/feedparser
 
	dev-python/simplejson
 
	dev-python/pycurl
 
	dev-python/jinja
 
	captcha? (
 
		dev-python/imaging
 
		app-text/tesseract
 
	)
 
	clicknload? (
 
	|| (
 
		dev-lang/spidermonkey
 
		dev-java/rhino
 
	)
 
	)
 
	container? ( dev-python/pycrypto )
 
	qt4? ( dev-python/PyQt4	)
 
	rar? ( app-arch/unrar )
 
	ssl? (
 
		dev-python/pycrypto
 
		dev-python/pyopenssl
 
	)"
 
		dev-python/beautifulsoup
 
		dev-python/beaker
 
		dev-python/feedparser
 
		dev-python/simplejson
 
		captcha? ( dev-python/imaging app-text/tesseract )
 
		clicknload? ( || ( dev-lang/spidermonkey dev-java/rhino ) )
 
		container? ( dev-python/pycrypto )
 
		curl? ( dev-python/pycurl )
 
		qt4? ( dev-python/PyQt4 )
 
		rar? ( app-arch/unrar )
 
		ssl? ( dev-python/pycrypto dev-python/pyopenssl )"
 

	
 
#clicknload? ( || ( ... ossp-js pyv8 ) )
 

	
 
S=${WORKDIR}/${PN}
 

	
 
PYLOAD_WORKDIR=/var/lib/pyload # (/var/lib/ in lack of a better place)
 
PYLOAD_WORKDIR="/var/lib/pyload" # (/var/lib/ in lack of a better place)
 

	
 
pkg_setup() {
 
	python_pkg_setup
 
	python_set_active_version 2
 
#	enewuser pyload -1 -1 ${PYLOAD_WORKDIR}
 

	
 
#	enewuser "pyload" -1 -1 "${PYLOAD_WORKDIR}"
 
}
 

	
 
src_unpack() {
 
@@ -67,38 +57,31 @@ src_unpack() {
 
		default
 
		#base_src_unpack
 
	fi
 

	
 
	cd "${S}"
 
	epatch "${FILESDIR}/${P}-pid.patch"
 
	epatch "${FILESDIR}/${P}-sanitize-config.patch"
 
	epatch "${FILESDIR}/${P}-locale-fix.patch"
 
}
 

	
 
src_prepare() {
 
	# fix pidfile
 
	sed -i -e 's:self.pidfile = "pyload.pid":self.pidfile = "/var/run/pyload.pid":' ${S}/pyLoadCore.py
 

	
 
	# fix workdir
 
	echo ${PYLOAD_WORKDIR} > ${S}/module/config/configdir
 
	cat > ${S}/module/config/configdir <<-EOF
 
		${PYLOAD_WORKDIR}
 
	EOF
 

	
 
	# replace some shipped dependencies with the system libraries
 
	rm -r \
 
		${S}/module/lib/BeautifulSoup.py \
 
		${S}/module/lib/beaker \
 
		${S}/module/lib/feedparser.py \
 
		${S}/module/lib/simplejson \
 
		${S}/module/lib/jinja2 \
 

	
 
		${S}/module/lib/simplejson
 

	
 
	find ${S}/module/ -name "*.py" -type f -print0 | xargs -0 \
 
	sed -i \
 
		-e 's:from module.lib.BeautifulSoup:from BeautifulSoup:' \
 
		-e 's:from module.lib \(import feedparser.*\):\1:' \
 
		-e 's:from module.lib.simplejson:from simplejson:' \
 
		-e 's:from module:from pyload:' \
 
		-e 's:"module\(.*\)":"pyload\1":' \
 
		#${S}/module/**/*.py # globbing not working -> find
 

	
 
	sed -i -e 's:from module:from pyload:' pyLoadCore.py
 

	
 
    sed -i -e 's:from module:from pyload:' pyLoadCli.py
 

	
 
	if ! use qt4; then
 
		rm -r ${S}/module/gui
 
@@ -114,55 +97,39 @@ src_compile() {
 
}
 

	
 
src_install() {
 
    insinto $(python_get_sitedir)/${PN}
 
	doins -r ${S}/module/*
 
	insinto /usr/share/${PN}
 
	insinto "/opt/${PN}"
 
	doins -r ${S}/locale
 
	#doins -r ${S}/module
 
	doins -r ${S}/module
 
	doins -r ${S}/scripts
 
	exeinto /usr/bin/
 
	newexe ${S}/pyLoadCore.py pyLoadCore
 
	newexe ${S}/pyLoadCli.py pyLoadCli
 
	doins ${S}/pyLoadCore.py
 
	doins ${S}/pyLoadCli.py
 

	
 
	make_wrapper "pyloadcli" "/opt/${PN}/pyLoadCli.py"
 

	
 
	if use qt4; then
 
		doins -r ${S}/icons
 
		make_wrapper pyloadgui /opt/${PN}/pyLoadGui.py
 
	fi
 

	
 
	dodir ${PYLOAD_WORKDIR}
 
	# install default config
 
	if ! test -f ${PYLOAD_WORKDIR}/pyload.conf; then
 
		cp ${S}/module/config/default.conf ${D}/${PYLOAD_WORKDIR}/pyload.conf
 
		make_wrapper pyloadgui "/opt/${PN}/pyLoadGui.py"
 
	fi
 

	
 
	dodir "${PYLOAD_WORKDIR}"
 
	cp "${S}/module/config/default.conf" "${D}/${PYLOAD_WORKDIR}/pyload.conf"
 
	#fix tmpdir
 
	dosym /tmp ${PYLOAD_WORKDIR}/tmp
 
	ln -sf "/tmp" "${D}/${PYLOAD_WORKDIR}/tmp"
 

	
 
	newinitd ${FILESDIR}/pyload.init pyload
 
	newconfd ${FILESDIR}/pyload.confd pyload
 
	newinitd "${FILESDIR}/pyload" "pyload"
 

	
 
	if use systemd; then
 
		systemd_dounit ${FILESDIR}/pyload.service
 
		systemd_dounit "${FILESDIR}/pyload.service"
 
	fi
 

	
 
	python_convert_shebangs -q -r 2 "${D}"
 
}
 

	
 
pkg_postinst() {
 
	python_mod_optimize ${PN}
 
	if use ssl && ! test -f ${PYLOAD_WORKDIR}/ssl.key; then
 
		einfo "If you plan using pyLoad's XML-RPC via SSL, you'll have to create a key in pyloads work directory"
 
	if use ssl && ! test -f "${PYLOAD_WORKDIR}/ssl.key"; then
 
		einfo "If you want to use pyLoad's XML-RPC via SSL have to create a key in pyloads work directory"
 
		echo
 
		einfo "For the lazy, the list of needed commands is:"
 
		echo 
 
		einfo "cd ${PYLOAD_WORKDIR}"
 
		einfo "openssl genrsa 1024 > ssl.key"
 
		einfo "openssl req -new -key ssl.key -out ssl.csr"
 
		einfo "openssl req -days 36500 -x509 -key ssl.key -in ssl.csr > ssl.crt"
 
	fi
 
}
 

	
 
pkg_postrm() {
 
	python_mod_cleanup ${PN}
 
}
net-misc/pyload/pyload-0.4.9.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2011 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: $
 

	
 
EAPI=3
 

	
 
PYTHON_DEPEND="2"
 
PYTHON_USE_WITH="sqlite"
 

	
 
inherit base eutils python systemd
 

	
 
if [[ ${PV} == *9999 ]]; then
 
	EHG_REPO_URI="http://bitbucket.org/spoob/pyload/"
 
	inherit mercurial
 
else
 
	SRC_URI="http://get.pyload.org/static/${PN}-src-v${PV}.zip"
 
	KEYWORDS="~amd64 ~x86"
 
fi
 
DESCRIPTION="A fast, lightweight and full featured download manager for many One-Click-Hosters."
 
HOMEPAGE="http://www.pyload.org"
 
#Upstreams says GPL but part of the source is not available to users
 
#We need a review about this and find the right license.
 
LICENSE="freedist"
 
SLOT="0"
 
IUSE="captcha clicknload container qt4 rar ssl systemd"
 

	
 
DEPEND="app-arch/unzip"
 

	
 
RDEPEND="${DEPEND}
 
	dev-python/beautifulsoup
 
	dev-python/beaker
 
	dev-python/feedparser
 
	dev-python/simplejson
 
	dev-python/pycurl
 
	dev-python/jinja
 
	captcha? (
 
		dev-python/imaging
 
		app-text/tesseract
 
	)
 
	clicknload? (
 
	|| (
 
		dev-lang/spidermonkey
 
		dev-java/rhino
 
	)
 
	)
 
	container? ( dev-python/pycrypto )
 
	qt4? ( dev-python/PyQt4	)
 
	rar? ( app-arch/unrar )
 
	ssl? (
 
		dev-python/pycrypto
 
		dev-python/pyopenssl
 
	)"
 
#clicknload? ( || ( ... ossp-js pyv8 ) )
 

	
 
S=${WORKDIR}/${PN}
 

	
 
PYLOAD_WORKDIR=/var/lib/pyload # (/var/lib/ in lack of a better place)
 

	
 
pkg_setup() {
 
	python_set_active_version 2
 
	python_pkg_setup
 
	#enewuser pyload -1 -1 ${PYLOAD_WORKDIR}
 
}
 

	
 
src_unpack() {
 
	if [[ ${PV} == *9999 ]]; then
 
		mercurial_src_unpack
 
	else
 
		default
 
		#base_src_unpack
 
	fi
 

	
 
	cd "${S}"
 
}
 

	
 
src_prepare() {
 
	epatch "${FILESDIR}/${P}-sanitize-config.patch"
 
	# replace some shipped dependencies with the system libraries
 
	rm -r \
 
		${S}/module/lib/BeautifulSoup.py \
 
		${S}/module/lib/beaker \
 
		${S}/module/lib/feedparser.py \
 
		${S}/module/lib/simplejson \
 
		${S}/module/lib/jinja2 \
 

	
 

	
 
	find ${S}/module/ -name "*.py" -type f -print0 | xargs -0 \
 
	sed -i \
 
		-e 's:from module.lib.BeautifulSoup:from BeautifulSoup:' \
 
		-e 's:from module.lib \(import feedparser.*\):\1:' \
 
		-e 's:from module.lib.simplejson:from simplejson:' \
 
		-e 's:from module:from pyload:' \
 
		-e 's:"module\(.*\)":"pyload\1":' \
 
		-e 's:import module:import pyload:' \
 
		#${S}/module/**/*.py # globbing not working -> find
 

	
 
	sed -i -e 's:from module:from pyload:' \
 
	       -e 's:import module:import pyload:' pyLoadCore.py
 

	
 
    sed -i -e 's:from module:from pyload:' \
 
	       -e 's:import module: import pyload:' pyLoadCli.py
 

	
 
	if ! use qt4; then
 
		rm -r ${S}/module/gui
 
	fi
 
}
 

	
 
src_configure() {
 
	:
 
}
 

	
 
src_compile() {
 
	:
 
}
 

	
 
src_install() {
 
    insinto $(python_get_sitedir)/${PN}
 
	doins -r ${S}/module/*
 
	insinto /usr/share/${PN}
 
	doins -r ${S}/locale
 
	#doins -r ${S}/module
 
	doins -r ${S}/scripts
 
	exeinto /usr/bin/
 
	newexe ${S}/pyLoadCore.py pyLoadCore
 
	newexe ${S}/pyLoadCli.py pyLoadCli
 

	
 

	
 
	if use qt4; then
 
		doins -r ${S}/icons
 
		make_wrapper pyloadgui /opt/${PN}/pyLoadGui.py
 
	fi
 

	
 
	dodir ${PYLOAD_WORKDIR}
 
	# install default config
 
	if ! test -f /etc/pyload/pyload.conf; then
 
		cp ${FILESDIR}/default.conf ${D}/etc/pyload/pyload.conf
 
	fi
 

	
 
	#fix tmpdir
 
	dosym /tmp ${PYLOAD_WORKDIR}/tmp
 

	
 
	newinitd ${FILESDIR}/pyload.init pyload
 
	newconfd ${FILESDIR}/pyload.confd pyload
 

	
 
	if use systemd; then
 
		systemd_dounit ${FILESDIR}/pyload.service
 
	fi
 

	
 
	python_convert_shebangs -q -r 2 "${D}"
 
}
 

	
 
pkg_postinst() {
 
	python_mod_optimize ${PN}
 
	if use ssl && ! test -f ${PYLOAD_WORKDIR}/ssl.key; then
 
		einfo "If you plan using pyLoad's XML-RPC via SSL, you'll have to create a key in pyloads work directory"
 
		echo
 
		einfo "For the lazy, the list of needed commands is:"
 
		echo 
 
		einfo "cd ${PYLOAD_WORKDIR}"
 
		einfo "openssl genrsa 1024 > ssl.key"
 
		einfo "openssl req -new -key ssl.key -out ssl.csr"
 
		einfo "openssl req -days 36500 -x509 -key ssl.key -in ssl.csr > ssl.crt"
 
	fi
 
}
 

	
 
pkg_postrm() {
 
	python_mod_cleanup ${PN}
 
}
net-proxy/punjab/files/punjab.conf
Show inline comments
 
new file 100644
 
TAPDIR="/var/spool/jabber/punjab"
 
HOST="localhost"
 
PORT="5280"
 
USE_BINDING=1
 
USE_POLLING=1
 
USE_SOAP=1
 
USE_XMLRPC=1
 
HTMLDIR="//var/spool/jabber/punjab/html"
 
PIDFILE="/var/run/jabber/punjab.pid"
net-proxy/punjab/files/punjab.initd
Show inline comments
 
new file 100644
 
#!/sbin/runscript
 

	
 
depend() {
 
	need net
 
	need jabber-server
 
}
 

	
 
start() {
 
	ebegin "Starting punjab Jabber-HTTP-Polling"
 
	cd ${TAPDIR} || eerror "Could not cd to ${TAPDIR}"
 
	if [[ -e ${TAPDIR}/punjab.tap ]]
 
	then
 
		rm ${TAPDIR}/punjab.tap
 
	fi
 
	mktap punjab \
 
		--host=${HOST} \
 
		--port=${PORT} \
 
		--httpb=${USE_BINDING} \
 
		--httpp=${USE_POLLING} \
 
		--soap=${USE_SOAP} \
 
		--xmlrpc=${USE_XMLRPC} \
 
		--html_dir=${HTMLDIR}
 
	start-stop-daemon --start --quiet \
 
		--exec /usr/bin/twistd -- --quiet \
 
			--uid=jabber --gid=jabber --pidfile=${PIDFILE} \
 
			--syslog --no_save -f ${TAPDIR}/punjab.tap
 
	eend $?
 
}
 

	
 
stop() {
 
	ebegin "Stopping punjab Jabber-HTTP-Polling"
 
	start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
 
	eend $?
 
}
net-proxy/punjab/punjab-0.6.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2005 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: $
 

	
 
inherit distutils
 

	
 
DESCRIPTION="Jabber HTTP-Binding (JEP-0124)"
 
HOMEPAGE="http://punjab.sourceforge.net/"
 
SRC_URI="mirror://sourceforge/punjab/${P}.tar.gz"
 

	
 
LICENSE="GPL-2"
 
SLOT="0"
 
KEYWORDS="~x86"
 
IUSE=""
 

	
 
DEPEND=">=dev-python/twisted-xish-0.1.0
 
	>=dev-python/twisted-words-0.1.0
 
	>=dev-python/twisted-web-0.5.0
 
	>=dev-python/twisted-conch-0.5.0
 
	dev-python/soappy"
 
RDEPEND="virtual/jabber-server"
 

	
 
src_compile() {
 
	distutils_src_compile
 
}
 

	
 
src_install() {
 
	distutils_src_install
 
	insinto /etc/conf.d
 
	newins ${FILESDIR}/punjab.conf punjab
 

	
 
	exeinto /etc/init.d
 
	newexe ${FILESDIR}/punjab.initd punjab
 

	
 
	keepdir /var/spool/jabber/punjab
 
	fowners jabber:jabber /var/spool/jabber/punjab
 
	fperms 750 /var/spool/jabber/punjab
 
	keepdir /var/spool/jabber/punjab/html
 
	fowners jabber:jabber /var/spool/jabber/punjab/html
 
	fperms 750 /var/spool/jabber/punjab/html
 
}
 

	
 
pkg_postinst() {
 
	echo
 
	einfo "To be able to run punjab proxy server you need"
 
	einfo "to add it to the default runlevel using"
 
	einfo "rc-update add punjab default"
 
	einfo "and start it with /etc/init.d/punjab start"
 
	einfo "Don't forget to edit /etc/conf.d/punjab conf	file as appropriate"
 
	echo
 
}
sys-apps/hwinfo/files/hwinfo-13.11-makefile-fixes.patch
Show inline comments
 
new file 100644
 
diff -urN hwinfo-13.11/Makefile.common hwinfo-13.11.new/Makefile.common
 
--- hwinfo-13.11/Makefile.common	2006-09-11 11:36:57.000000000 +0100
 
+++ hwinfo-13.11.new/Makefile.common	2007-01-22 18:43:43.000000000 +0000
 
@@ -22,7 +22,7 @@
 
 
 
 CC	= gcc
 
 LD	= ld
 
-CFLAGS	= $(RPM_OPT_FLAGS) -Wall -Wno-pointer-sign -pipe -g $(SHARED_FLAGS) $(EXTRA_FLAGS) -I$(TOPDIR)/src/hd
 
+CFLAGS	= $(RPM_OPT_FLAGS) -Wall -pipe -g $(SHARED_FLAGS) $(EXTRA_FLAGS) -I$(TOPDIR)/src/hd
 
 SHARED_FLAGS	= -fPIC
 
 
 
 LDFLAGS	= -Lsrc
sys-apps/hwinfo/files/hwinfo-update-vm86.patch
Show inline comments
 
new file 100644
 
--- a/src/int10/i10_v86.c
 
+++ b/src/int10/i10_v86.c
 
@@ -27,6 +27,14 @@
 
 #include <string.h>
 
 #ifdef __i386__
 
 #include <sys/vm86.h>
 
+/* 2.6.26+ kernels don't define the legacy masks. */
 
+#if defined(__linux__) && !defined(TF_MASK)
 
+      #define TF_MASK X86_EFLAGS_TF
 
+      #define IF_MASK X86_EFLAGS_IF
 
+      #define NT_MASK X86_EFLAGS_NT
 
+      #define VIF_MASK X86_EFLAGS_VIF
 
+      #define VIP_MASK X86_EFLAGS_VIP
 
+#endif
 
 #else
 
 #include "vm86_struct.h"
 
 #endif
sys-apps/hwinfo/hwinfo-14.19-r1.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2008 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwinfo/hwinfo-14.19.ebuild,v 1.1 2008/07/14 00:30:54 robbat2 Exp $
 

	
 
inherit eutils
 

	
 
DESCRIPTION="hwinfo is the hardware detection tool used in SuSE Linux."
 
HOMEPAGE="http://www.suse.com"
 
DEBIAN_PV="2"
 
DEBIAN_BASE_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/"
 
SRC_URI="${DEBIAN_BASE_URI}/${PN}_${PV}.orig.tar.gz
 
		 ${DEBIAN_BASE_URI}/${PN}_${PV}-${DEBIAN_PV}.diff.gz"
 
LICENSE="GPL-2"
 
SLOT="0"
 
KEYWORDS="~ppc ~x86 ~amd64"
 
IUSE=""
 
RDEPEND=">=sys-fs/sysfsutils-2
 
		sys-apps/hal
 
		sys-apps/dbus"
 
# this package won't work on *BSD
 
DEPEND="${RDEPEND}
 
		>=sys-kernel/linux-headers-2.6.17"
 

	
 
src_unpack (){
 
	unpack ${PN}_${PV}.orig.tar.gz
 
	EPATCH_OPTS="-p1 -d ${S}" epatch "${DISTDIR}"/${PN}_${PV}-${DEBIAN_PV}.diff.gz
 
	rm "${S}"/debian/patches/series
 
	cd "${S}"
 
	EPATCH_SUFFIX="" EPATCH_FORCE="yes" epatch "${S}"/debian/patches/
 
	EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-13.11-makefile-fixes.patch
 
	#sed -i -e "s,^LIBS[ \t]*= -lhd,LIBS = -lhd -lsysfs," ${S}/Makefile
 
	#sed -i -e "s,^LIBDIR[ \t]*= /usr/lib$,LIBDIR = /usr/$(get_libdir)," ${S}/Makefile
 
	EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-update-vm86.patch
 
	echo 'libs: $(LIBHD) $(LIBHD_SO)' >>${S}/Makefile
 
}
 

	
 
src_compile(){
 
	# build is NOT parallel safe
 
	emake -j1 EXTRA_FLAGS="${CFLAGS}" || die "emake failed"
 
}
 

	
 
src_install() {
 
	emake install DESTDIR="${D}" || die
 
	[[ "$(get_libdir)" != "lib" ]] && mv "${D}"/usr/lib "${D}/usr/$(get_libdir)"
 
	dodoc VERSION README COPYING
 
	doman doc/hwinfo.8
 
}
sys-apps/rhash/rhash-1.2.9.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2009 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: $
 

	
 
DESCRIPTION="Recursive Hasher is a console utility for computing and verifying hash sums of files"
 
HOMEPAGE="http://rhash.anz.ru/"
 
SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
 

	
 
LICENSE="MIT"
 
SLOT="0"
 
KEYWORDS="~x86"
 
IUSE=""
 

	
 
DEPEND=""
 

	
 
src_unpack() {
 
	unpack ${A}
 
	sed -i 's/\(LDFLAGS = \)-s /\1/' "${S}"/Makefile || die "patching Makefile"
 
}
 

	
 
src_compile() {
 
	emake OPTFLAGS="${CFLAGS} -DNDEBUG" || die "compile failed"
 
}
 

	
 
src_install() {
 
	emake install DESTDIR="${D}" PREFIX=/usr || die "install failed"
 
	dodoc ChangeLog || die "dodoc failed"
 
}
www-apps/limesurvey/files/postinstall-en.txt
Show inline comments
 
new file 100644
 
You are almost done!
 

	
 
  1. Setup a database (e.g. MySQL: see 
 
                       http://www.gentoo.org/doc/en/mysql-howto.xml)
 

	
 
  2. Edit ${MY_INSTALLDIR}/config.php and set at least:
 
       - \$databasetype
 
       - \$databaselocation
 
       - \$databasename
 

	
 
  3. Login on http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/admin/install and
 
     finish the installation. The default login credentials are username
 
     'admin' and the password is 'password'.
 

	
 
  4. You can now launch your browser and point it to your LimeSurvey site e.g.
 
     http://${VHOST_HOSTNAME}/${VHOST_APPDIR} -> Main Site
 
     http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/admin/admin.php -> Admin
 

	
 
  You can log into the administration view using the username 'admin' 
 
  along with the password that was generated or you chose during the
 
  web based installation.
 

	
 
  Enjoy LimeSurvey
www-apps/limesurvey/limesurvey-1.8.2.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2009 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: Exp $
 

	
 
inherit webapp depend.php
 

	
 
LS_BUILD="plus-build6825-20090511"
 
MY_PV=${PV//./}
 

	
 
DESCRIPTION="LimeSurvey is a open source survey tool"
 
HOMEPAGE="http://www.limesurvey.org/"
 
SRC_URI="mirror://sourceforge/${PN}/${PN}${MY_PV}${LS_BUILD}.tar.gz"
 
LICENSE="GPL-2"
 
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
 
IUSE="mysql postgres"
 

	
 
need_httpd_cgi
 
need_php_httpd
 

	
 
S="${WORKDIR}"
 

	
 
pkg_setup () {
 
	local my_required_php_features="session"
 

	
 
	if ! use mysql && ! use postgres; then
 
		ewarn
 
		ewarn "You You need at least to enable one database backend. Please stop"
 
		ewarn "this build and enable one of the following USE flag:"
 
		ewarn "  - mysql"
 
		ewarn "  - postgres"
 
		ewarn
 
		ebeep 5
 
		epause 10
 
		die "PHP needs MySQL or PostgreSQL support"
 
	fi
 

	
 
	if use mysql; then
 
		my_required_php_features="${my_required_php_features} mysql"
 
	fi
 
	if use postgres; then
 
		my_required_php_features="${my_required_php_features} postgres"
 
	fi
 

	
 
	webapp_pkg_setup
 
	require_php_with_use ${my_required_php_features}
 

	
 
	if built_with_use virtual/httpd-php gd-external && ! built_with_use media-libs/gd truetype; then
 
		einfo "You have build media-libs/gd without 'truetype' USE flag. If you want"
 
		einfo "captchas to work then you need to enable 'truetype' USE flag for media-libs/gd."
 
		ebeep 5
 
		epause 10
 
        elif ! built_with_use virtual/httpd-php gd && ! built_with_use virtual/httpd-php truetype; then
 
		einfo "You have enabled PHP's gd library but not the 'truetype' USE flag. If you want"
 
		einfo "captchas to work then you need to enable 'truetype' USE flag for PHP."
 
		ebeep 5
 
		epause 10
 
        fi
 
	if ! built_with_use virtual/httpd-php ldap; then
 
		einfo "If you want to import tokens using LDAP, then consider building PHP with the"
 
		einfo "'ldap' USE flag."
 
		ebeep 5
 
		epause 10
 
	fi
 
}
 

	
 
src_install () {
 
	cd "${S}"/${PN}
 

	
 
	webapp_src_preinst
 

	
 
        # copy the app's main files
 
        #
 
        einfo "Installing main files"
 
	insinto "${MY_HTDOCSDIR}"
 
        doins -r .
 

	
 
	# set read/write access to certain directories
 
	einfo "Setting read/write permission(s)"
 
	for foo in tmp templates upload; do
 
		webapp_serverowned "${MY_HTDOCSDIR}"/${foo}
 
		cd "${S}"/${PN}/${foo}
 
		for bar in $(find .) ; do
 
			webapp_serverowned "${MY_HTDOCSDIR}"/${foo}/${bar}
 
		done
 
	done
 

	
 
	# set read only access to admin files
 
	einfo "Setting read-only permission(s)"
 
	for foo in admin; do
 
		cd "${S}"/${PN}/${foo}
 
		for bar in $(find . -type f) ; do
 
			fperms u=r,g=r,o=r "${MY_HTDOCSDIR}"/${foo}/${bar}
 
		done
 
		cd "${S}"/${PN}
 
	done
 

	
 
	webapp_configfile "${MY_HTDOCSDIR}"/config.php
 
	webapp_serverowned "${MY_HTDOCSDIR}"/config.php
 

	
 
	webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
 
	webapp_src_install
 
}
www-apps/limesurvey/limesurvey-1.91.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2009 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: Exp $
 

	
 
inherit webapp depend.php
 

	
 
LS_BUILD="plus-build10089-20110517"
 
MY_PV=${PV//./}
 

	
 
DESCRIPTION="LimeSurvey is a open source survey tool"
 
HOMEPAGE="http://www.limesurvey.org/"
 
SRC_URI="mirror://sourceforge/${PN}/${PN}${MY_PV}${LS_BUILD}.tar.gz"
 
LICENSE="GPL-2"
 
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
 
IUSE="mysql postgres"
 

	
 
need_httpd_cgi
 
need_php_httpd
 

	
 
S="${WORKDIR}"
 

	
 
pkg_setup () {
 
	if ! use mysql && ! use postgres; then
 
		ewarn
 
		ewarn "You You need at least to enable one database backend. Please stop"
 
		ewarn "this build and enable one of the following USE flag:"
 
		ewarn "  - mysql"
 
		ewarn "  - postgres"
 
		ewarn
 
		ebeep 5
 
		epause 10
 
		die "PHP needs MySQL or PostgreSQL support"
 
	fi
 

	
 
	webapp_pkg_setup
 
}
 

	
 
src_install () {
 
	cd "${S}"/${PN}
 

	
 
	webapp_src_preinst
 

	
 
        # copy the app's main files
 
        #
 
        einfo "Installing main files"
 
	insinto "${MY_HTDOCSDIR}"
 
        doins -r .
 

	
 
	# set read/write access to certain directories
 
	einfo "Setting read/write permission(s)"
 
	for foo in tmp templates upload; do
 
		webapp_serverowned "${MY_HTDOCSDIR}"/${foo}
 
		cd "${S}"/${PN}/${foo}
 
		for bar in $(find .) ; do
 
			webapp_serverowned "${MY_HTDOCSDIR}"/${foo}/${bar}
 
		done
 
	done
 

	
 
	# set read only access to admin files
 
	einfo "Setting read-only permission(s)"
 
	for foo in admin; do
 
		cd "${S}"/${PN}/${foo}
 
		for bar in $(find . -type f) ; do
 
			fperms u=r,g=r,o=r "${MY_HTDOCSDIR}"/${foo}/${bar}
 
		done
 
		cd "${S}"/${PN}
 
	done
 

	
 
	webapp_configfile "${MY_HTDOCSDIR}"/config.php
 
	webapp_serverowned "${MY_HTDOCSDIR}"/config.php
 

	
 
	webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
 
	webapp_src_install
 
}
0 comments (0 inline, 0 general)