git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/bongo@583 6952d904-891a-0410-993b-d76249ca496b
108 lines
2.5 KiB
Bash
108 lines
2.5 KiB
Bash
# Copyright 1999-2008 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: $
|
|
|
|
inherit eutils mailer multilib flag-o-matic
|
|
|
|
DESCRIPTION="A calendar and webmail application, which includes its own MTA"
|
|
|
|
SRC_URI="http://download.gna.org/bongo/release/${P}.tar.bz2"
|
|
HOMEPAGE="http://bongo-project.org/"
|
|
|
|
LICENSE="LGPL-2"
|
|
SLOT="0"
|
|
|
|
IUSE="libgcrypt"
|
|
|
|
KEYWORDS="-alpha -amd64 ~arm ~hppa -ia64 -mips ~ppc -ppc64 ~s390 ~sh ~x86"
|
|
|
|
RDEPEND="net-nds/openldap
|
|
net-libs/gnutls
|
|
<=dev-cpp/clucene-0.9.17
|
|
net-misc/curl
|
|
>=dev-db/sqlite-3
|
|
libgcrypt? ( dev-libs/libgcrypt )"
|
|
|
|
DEPEND="${RDEPEND}"
|
|
|
|
pkg_setup() {
|
|
enewgroup bongo
|
|
enewuser bongo -1 -1 -1 bongo
|
|
filter-ldflags -Wl,--as-needed --as-needed
|
|
}
|
|
|
|
src_compile() {
|
|
use libgcrypt && myconf="${myconf} --with-libgcrypt-prefix=/usr"
|
|
|
|
./configure \
|
|
--prefix=/usr \
|
|
--with-user=bongo \
|
|
--localstatedir=/var/lib \
|
|
--sysconfdir=/etc \
|
|
--libdir=/usr/$(get_libdir) \
|
|
--with-clucene=/usr \
|
|
--with-sqlite3=/usr \
|
|
--with-libcurl=/usr \
|
|
${myconf} || die
|
|
|
|
emake || die "emake failed"
|
|
}
|
|
|
|
src_install() {
|
|
make DESTDIR=${D} install || die "make failed"
|
|
|
|
dodir /etc/init.d
|
|
exeinto /etc/init.d
|
|
newexe ${FILESDIR}/bongo.init bongo
|
|
|
|
dodir /etc/conf.d
|
|
insinto /etc/conf.d
|
|
newins ${FILESDIR}/bongo.conf.d bongo
|
|
|
|
dodir /etc/env.d
|
|
insinto /etc/env.d
|
|
newins ${FILESDIR}/70bongo 70bongo
|
|
|
|
dodir /var/lib/bongo
|
|
keepdir /var/lib/bongo
|
|
fowners bongo:bongo /var/lib/bongo
|
|
fperms 770 /var/lib/bongo
|
|
|
|
dodir /var/run/bongo
|
|
keepdir /var/run/bongo
|
|
fowners bongo:bongo /var/run/bongo
|
|
fperms 770 /var/run/bongo
|
|
|
|
if use mailwrapper ; then
|
|
dosym /usr/sbin/bongo-sendmail /usr/bin/sendmail.bongo-sendmail
|
|
dosym /usr/sbin/bongo-sendmail /usr/bin/mailq.bongo-sendmail
|
|
dosym /usr/sbin/bongo-sendmail /usr/bin/newaliases.bongo-sendmail
|
|
mailer_install_conf
|
|
else
|
|
dosym /usr/sbin/bongo-sendmail /usr/sbin/sendmail
|
|
dosym /usr/sbin/bongo-sendmail /usr/lib/sendmail
|
|
dosym /usr/sbin/bongo-sendmail /usr/bin/sendmail
|
|
dosym /usr/sbin/bongo-sendmail /usr/sbin/mailq
|
|
dosym /usr/sbin/bongo-sendmail /usr/sbin/newaliases
|
|
fi
|
|
}
|
|
|
|
pkg_postinst() {
|
|
elog "Bongo must be setup."
|
|
elog "Please run:"
|
|
elog " emerge /usr/sbin/bongo-setup"
|
|
elog ""
|
|
elog "For more information on bongo-setup run /usr/sbin/bongo-setup --help"
|
|
elog ""
|
|
elog "After bongo is set up run /etc/init.d/bongo start to start the service"
|
|
elog ""
|
|
elog "The default login settings are as follows:"
|
|
elog "username: admin"
|
|
elog "password: bongo"
|
|
}
|
|
|
|
pkg_config() {
|
|
einfo "Setting up Bongo..."
|
|
/usr/sbin/bongo-setup
|
|
}
|