git.schokokeks.org
Repositories
Help
Report an Issue
keks-overlay.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
60d29f9
Branches
Tags
master
keks-overlay.git
net-im
ejabberd
ejabberd-1.1.2-r5.ebuild
Upgrade to ejabberd-1.1.3
Lars Strojny
commited
60d29f9
at 2007-03-18 16:29:14
ejabberd-1.1.2-r5.ebuild
Blame
History
Raw
# Copyright 2005-2006 BreakMyGentoo.net # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils multilib ssl-cert versionator JABBER_ETC="/etc/jabber" JABBER_RUN="/var/run/jabber" JABBER_SPOOL="/var/spool/jabber" JABBER_LOG="/var/log/jabber" E_MYSQL_V="0.1" E_MYSQL_N="mysql" E_MYSQL=${E_MYSQL_N}-${E_MYSQL_V} E_PGSQL_V="0.0.1" E_PGSQL_N="pgsql-cvs" E_PGSQL=${E_PGSQL_N}-${E_PGSQL_V} DESCRIPTION="The Erlang Jabber Daemon" HOMEPAGE="http://ejabberd.jabber.ru/" SRC_URI="http://process-one.net/en/projects/ejabberd/download/${PV}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 amd64" IUSE="${IUSE} irc ldap muc odbc postgres pubsub web mysql httpbind proxy" DEPEND="${RDEPEND} >=net-im/jabber-base-0.00 >=dev-libs/expat-1.95 >=dev-lang/erlang-10.2.0 odbc? ( dev-db/unixODBC ) ldap? ( =net-nds/openldap-2* ) postgres? ( =dev-erl/${E_PGSQL} ) mysql? ( =dev-erl/${E_MYSQL} )" RDEPEND="postgres? ( dev-db/postgresql ) mysql? ( dev-db/mysql )" PROVIDE="virtual/jabber-server" S=${WORKDIR}/${P}/src src_unpack() { unpack ${A} MYSQL_P=$(best_version dev-db/mysql) MYSQL_PV=${MYSQL_P/dev-db\/mysql-/} # # If we have to work with MySQL 4.1 or greater, ejabberd's native # MySQL-driver has to be patched to query "SET NAMES 'utf8'" on connecting # the database. # if use mysql && \ (( \ [ $(get_major_version ${MYSQL_PV}) -eq 4 ] && \ [ $(get_major_version $(get_after_major_version ${MYSQL_PV})) -ge 1] \ ) \ || \ [ $(get_major_version ${MYSQL_PV}) -ge 5 ] \ ); then epatch ${FILESDIR}/${P}-mysql-connect-utf8.patch || die fi cd ${S} if use httpbind; then epatch ${FILESDIR}/${P}-http_binding.patch || die fi if use proxy; then epatch ${FILESDIR}/${P}-proxy65.patch || die fi epatch ${FILESDIR}/${P}-mod_irc-utf-8.patch || die } src_compile() { local myconf if ! use mysql && ! use postgres && ! use odbc; then myconf="--disable-odbc" else myconf="--enable-odbc" fi # # configure ejabberd # econf ${myconf} \ --enable-roster-gateway-workaround \ $(use_enable irc mod_irc) \ $(use_enable ldap eldap) \ $(use_enable muc mod_muc) \ $(use_enable pubsub mod_pubsub) \ $(use_enable ssl tls) \ $(use_enable web web) \ || die "econf failed" # # Build ejabberd core # emake || die "compiling ejabberd core failed" } src_install() { # # Install ejabberd # make \ DESTDIR=${D} \ EJABBERDDIR=${D}/usr/$(get_libdir)/erlang/lib/${P} \ ETCDIR=${D}${JABBER_ETC} \ LOGDIR=${D}${JABBER_LOG} \ install \ || die "install failed" insinto /usr/share/doc/${PF} use postgres && doins odbc/pg.sql use mysql && doins odbc/mysql.sql dodoc doc/release_notes_${PV}.txt dohtml doc/*.{html,png} use postgres && { pa="-pa /usr/$(get_libdir)/erlang/lib/${E_PGSQL}/ebin" } use mysql && { pa=${pa}" -pa /usr/$(get_libdir)/erlang/lib/${E_MYSQL}/ebin" } # # Create /usr/bin/ejabberd # cat <<EOF > ${T}/ejabberd #!/bin/bash erl -pa /usr/$(get_libdir)/erlang/lib/${P}/ebin \\ ${pa} \\ -sname ejabberd \\ -s ejabberd \\ -ejabberd config \"${JABBER_ETC}/ejabberd.cfg\" \\ log_path \"${JABBER_LOG}/ejabberd.log\" \\ -kernel inetrc \"${JABBER_ETC}/inetrc\" \\ -sasl sasl_error_logger \{file,\"${JABBER_LOG}/sasl.log\"\} \\ -mnesia dir \"${JABBER_SPOOL}\" \\ \$@ EOF # # Create /usr/bin/ejabberdctl # cat <<EOF > ${T}/ejabberdctl #!/bin/sh exec env HOME=${JABBER_RUN} \\ erl -pa /usr/$(get_libdir)/erlang/lib/${P}/ebin \\ ${pa} \\ -noinput \\ -sname ejabberdctl \\ -s ejabberd_ctl \\ -extra \$@ EOF dobin ${T}/ejabberdctl dobin ${T}/ejabberd newinitd ${FILESDIR}/${P}.initd ${PN} newconfd ${FILESDIR}/${P}.confd ${PN} insinto ${JABBER_ETC} if use ssl; then docert ssl rm -f ${D}${JABBER_ETC}/ssl.{crt,csr,key} fowners jabber:jabber ${JABBER_ETC}/ssl.pem fi doins ${FILESDIR}/inetrc } pkg_postinst() { if [ ! -e ${JABBER_ETC}/ejabberd.cfg ] then einfo "Configuration file has been installed in ${JABBER_ETC}/ejabberd.cfg." einfo "Edit it according to your needs. For configuration instructions," einfo "please see /usr/share/doc/${PF}/html/guide.html" fi if use ssl ; then einfo "A script to generate a ssl key has been installed in" einfo "${JABBER_ETC}/self-cert.sh . Use it and change the config file to" einfo "point to the full path" fi if ! use web ; then einfo "The web USE flag is off, this will disable the web admin interface," einfo "if this was not the intention then add web to your USE flags." fi }