/[gentoo-x86]/net-im/mu-conference/mu-conference-0.7.ebuild
Gentoo

Contents of /net-im/mu-conference/mu-conference-0.7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun May 13 17:13:55 2012 UTC (2 years, 11 months ago) by pacho
Branch: MAIN
Changes since 1.3: +2 -2 lines
Drop old and make it depend on jabberd2.

(Portage version: 2.1.10.59/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-im/mu-conference/mu-conference-0.7.ebuild,v 1.3 2012/04/05 21:19:14 phajdan.jr Exp $
4
5 inherit eutils
6
7 DESCRIPTION="Multi-User Chat for jabberd"
8 HOMEPAGE="https://gna.org/projects/mu-conference/"
9 SRC_URI="http://download.gna.org/mu-conference/${PN}_${PV}.tar.gz"
10
11 LICENSE="GPL-2"
12 KEYWORDS="~amd64 ~ppc ~sparc x86"
13 SLOT="0"
14
15 DEPEND="dev-libs/expat
16 >=dev-libs/glib-2
17 net-dns/libidn
18 net-im/jabberd2
19 mysql? ( virtual/mysql )"
20 RDEPEND="${DEPEND}"
21 IUSE="mysql"
22
23 S="${WORKDIR}/${PN}_${PV}"
24
25 src_unpack() {
26 unpack ${A}
27 cd "${S}"
28
29 # Fix missing header in src/conference_user.c in order to
30 # make emerge happy and avoid QA notice.
31 sed -i "/conference.h/ i #define _XOPEN_SOURCE" src/conference_user.c
32
33 if use mysql; then
34 sed -i '/^CFLAGS/ a CFLAGS:=$(CFLAGS) -DHAVE_MYSQL' src/Makefile
35 else
36 # Makefile is broken. Should not always link against mysql
37 sed -i 's/`mysql_config --libs`//' src/Makefile
38 fi
39 }
40
41 src_compile() {
42 emake || die
43 }
44
45 src_install() {
46 exeinto /usr/bin
47 doexe src/mu-conference
48 fowners jabber:jabber /usr/bin/mu-conference
49 fperms 750 /usr/bin/mu-conference
50
51 newinitd "${FILESDIR}/${P}".init mu-conference
52
53 dodoc ChangeLog FAQ mu-conference.sql README
54 docinto scripts
55 dodoc scripts/*
56
57 for i in log spool; do
58 dodir /var/${i}/jabber/mu-conference
59 keepdir /var/${i}/jabber/mu-conference
60 fowners jabber:jabber /var/${i}/jabber/mu-conference
61 fperms 770 /var/${i}/jabber/mu-conference
62 done
63
64 insinto /etc/jabber
65 newins muc-default.xml mu-conference.xml
66 doins style.css
67
68 cd "${D}/etc/jabber/"
69 sed -i \
70 -e 's,./spool/chat.localhost,/var/spool/jabber/mu-conference,g' \
71 -e 's,./syslogs,/var/log/jabber,g' \
72 -e 's,./logs,/var/log/jabber/mu-conference,g' \
73 -e 's,./mu-conference.pid,/var/run/jabber/mu-conference.pid,g' \
74 -e "s,../style.css,/etc/jabber/style.css,g" \
75 -e "s,7009,5347,g" \
76 mu-conference.xml || die "sed failed"
77 }
78
79 pkg_postinst() {
80 elog
81 elog "For jabberd-2 connection:"
82 elog "1. Make sure that the ip and port in /etc/jabber/mu-conference.xml"
83 elog " match the address of your jabberd router."
84 elog "2. Set a common secret in mu-conference.xml and router.xml"
85 elog
86 }

  ViewVC Help
Powered by ViewVC 1.1.20