| 1 |
# Copyright 1999-2005 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: $
|
| 4 |
|
| 5 |
inherit eutils
|
| 6 |
|
| 7 |
DESCRIPTION="YaCS server daemon"
|
| 8 |
HOMEPAGE="http://yacs.trapni-akane.org/"
|
| 9 |
SRC_URI="http://upstream.trapni-akane.org/yacs/yacs-${PV/_/-}.tar.gz"
|
| 10 |
LICENSE="GPL-2"
|
| 11 |
SLOT="0"
|
| 12 |
KEYWORDS="~x86 ~amd64"
|
| 13 |
IUSE="debug logrotate bash-completion"
|
| 14 |
|
| 15 |
DEPEND=">=dev-libs/swl-0.4.0_rc5
|
| 16 |
>=dev-libs/libyacsutil-${PV}
|
| 17 |
>=dev-libs/libyacs-${PV}"
|
| 18 |
|
| 19 |
S="${WORKDIR}/${PN}-standalone"
|
| 20 |
|
| 21 |
src_unpack() {
|
| 22 |
unpack ${A} || die
|
| 23 |
mv -v "${WORKDIR}/yacs-${PV/_/-}/server/${PN}" "${S}" || die
|
| 24 |
rm -r "${WORKDIR}/yacs-${PV/_/-}" || die
|
| 25 |
}
|
| 26 |
|
| 27 |
src_compile() {
|
| 28 |
use debug && append-flags -g3
|
| 29 |
use debug || append-flags -DNDEBUG=1
|
| 30 |
|
| 31 |
econf --sysconfdir=/etc/yacs || die "econf failed"
|
| 32 |
emake || die "emake failed"
|
| 33 |
}
|
| 34 |
|
| 35 |
src_install() {
|
| 36 |
make DESTDIR=${D} install || die
|
| 37 |
dodoc AUTHORS ChangeLog* COPYING* INSTALL* NEWS* README*
|
| 38 |
|
| 39 |
dodir /etc/yacs
|
| 40 |
insinto /etc/yacs
|
| 41 |
doins src/yacsd.conf-dist
|
| 42 |
|
| 43 |
newinitd "${FILESDIR}/yacsd.rc6" yacsd || die "couldn't install yacsd.rc6"
|
| 44 |
|
| 45 |
if useq bash-completion; then
|
| 46 |
true # TODO: the script already exists; need to fit it in here
|
| 47 |
fi
|
| 48 |
|
| 49 |
if useq logrotate; then
|
| 50 |
true # TODO: here, too
|
| 51 |
fi
|
| 52 |
|
| 53 |
keepdir /var/log/yacs
|
| 54 |
}
|
| 55 |
|
| 56 |
pkg_postinst() {
|
| 57 |
echo
|
| 58 |
einfo "Please edit /etc/yacs/yacsd.conf and watch out for configuration layout updates"
|
| 59 |
einfo "in /etc/yacs/yacsd.conf-dist."
|
| 60 |
einfo
|
| 61 |
einfo "Use the following command (as usual) to start yacsd permanent."
|
| 62 |
einfo
|
| 63 |
einfo " /etc/init.d/yacsd start"
|
| 64 |
einfo " rc-update add yacsd default"
|
| 65 |
einfo
|
| 66 |
einfo "Support contact can be found at: http://yacs.mylair.de/report/1"
|
| 67 |
echo
|
| 68 |
}
|