net-irc/qwebirc: Add package as found online
[wtk-overlay.git] / net-irc / qwebirc / qwebirc-9999.ebuild
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=2
6
7 EHG_REPO_URI=http://hg.qwebirc.org/qwebirc/
8
9 inherit eutils mercurial
10
11 DESCRIPTION="qwebirc is a fast, easy to use, free and open source IRC client designed by and originally just for the QuakeNet IRC network."
12 HOMEPAGE="http://www.qwebirc.org"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE=""
18
19 RDEPEND=">=dev-lang/python-2.5
20         dev-python/simplejson
21         >=dev-python/twisted-mail-8.2
22         >=dev-python/twisted-names-8.2
23         >=dev-python/twisted-web-8.2
24         >=dev-python/twisted-words-8.2
25         >=virtual/jre-1.6
26 "
27 DEPEND="${RDEPEND}"
28
29 pkg_setup() {
30         enewgroup qwebirc
31         enewuser qwebirc -1 /bin/true /var/lib/qwebirc qwebirc -r -d /var/www/qwebirc
32 }
33
34 src_compile() {
35         ./compile.py
36 }
37
38 src_install() {
39         mkdir -p ${D}/var/www
40         # copy the whole repository, including the .hg stuff
41         cp -rp ${S} ${D}/var/www/qwebirc
42         chown -R qwebirc:qwebirc ${D}/var/www/qwebirc
43
44         # create the logfile as qwebirc does not have the permission to create it itself
45         mkdir -p ${D}/var/log
46         touch ${D}/var/log/qwebirc
47         chown qwebirc:qwebirc ${D}/var/log/qwebirc
48         chmod 640  ${D}/var/log/qwebirc
49
50         mkdir -p ${D}/etc/init.d
51         cp ${FILESDIR}/init-script ${D}/etc/init.d/qwebirc
52         chmod 755  ${D}/etc/init.d/qwebirc
53
54         mkdir -p ${D}/etc/conf.d
55         echo "PORT=9090" > ${D}/etc/conf.d/qwebirc
56 }