]> Pileus Git - ~andy/sunrise/blob - www-servers/webcit/webcit-8.14.ebuild
add missing die
[~andy/sunrise] / www-servers / webcit / webcit-8.14.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=4
6 inherit user
7
8 DESCRIPTION="Groupdav compliant AJAX'ed Blog/Forum/Wiki/Webserver for Citadel groupware"
9 HOMEPAGE="http://www.citadel.org/"
10 SRC_URI="http://easyinstall.citadel.org/${P}.tar.gz"
11
12 LICENSE="GPL-2 MIT LGPL-3 LGPL-2.1"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="ssl"
16
17 DEPEND=">=dev-libs/libical-0.43
18         >=dev-libs/libcitadel-${PV}
19         ssl? ( dev-libs/openssl )
20         sys-libs/zlib"
21 RDEPEND="${DEPEND}"
22
23 WWWDIR="/usr/share/citadel-webcit"
24
25 pkg_setup() {
26         #Homedir needs to be the same as --with-datadir
27         einfo "Adding Citadel User/Group"
28         enewgroup webcit
29         enewuser webcit -1 -1 ${WWWDIR} webcit
30 }
31
32 src_configure() {
33         econf \
34                 $(use_with ssl) \
35                 --prefix=/usr/sbin/ \
36                 --with-datadir=/var/run/citadel \
37                 --with-editordir=/usr/share/citadel-webcit/tiny_mce/ \
38                 --with-localedir=/usr/share/ \
39                 --with-rundir=/var/run/citadel \
40                 --with-ssldir=/etc/ssl/webcit/ \
41                 --with-wwwdir="${WWWDIR}"
42 }
43
44 src_install() {
45         emake DESTDIR="${D}" install
46         newinitd "${FILESDIR}"/webcit.init.d webcit
47         newconfd "${FILESDIR}"/webcit.conf.d webcit
48
49         ##House cleaning...
50         #We don't use the setup program, settings are in /etc/conf.d/webcit
51         rm "${D}"/usr/sbin/setup || die "Removing upstreams setup bin failed"
52
53         dodoc *.txt
54 }
55
56 pkg_postinst() {
57         elog "You can now connect more than one Citadel server with different configs:"
58         elog "Make sure to configure webcit under /etc/conf.d/webcit(.yourinstance)."
59         elog "Then start the server with /etc/init.d/webcit(.yourinstance) start"
60         elog
61         elog "Webcit will listen on port 2000 by default"
62 }