| 1 |
# Copyright 1999-2004 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/linesrv/linesrv-2.1.20.ebuild,v 1.1 2004/10/08 14:17:53 squinky86 Exp $
|
| 4 |
|
| 5 |
inherit eutils
|
| 6 |
|
| 7 |
# if someone disables pam but wants user authentication
|
| 8 |
# to be supported, then crypt is needed.
|
| 9 |
IUSE="pam mysql crypt"
|
| 10 |
|
| 11 |
DESCRIPTION="Client/Server system to control the Internet link of a masquerading server"
|
| 12 |
HOMEPAGE="http://linecontrol.srf.ch/"
|
| 13 |
|
| 14 |
S=${WORKDIR}/${PN}-2.1
|
| 15 |
SRC_URI="http://linecontrol.srf.ch/down/${P}.src.tar.bz2"
|
| 16 |
|
| 17 |
# requesting glibc instead of virtual/libc
|
| 18 |
# because we might need crypt. And as far as I
|
| 19 |
# (S. Fuchs, author of linesrv) remember, there's
|
| 20 |
# glibc specific stuff in linesrv.
|
| 21 |
DEPEND=">=sys-libs/glibc-2.2.0
|
| 22 |
pam? ( >=sys-libs/pam-0.75 )
|
| 23 |
mysql? ( >=dev-db/mysql-4 )"
|
| 24 |
LICENSE="GPL-2"
|
| 25 |
SLOT="0"
|
| 26 |
KEYWORDS="~x86 ~sparc"
|
| 27 |
|
| 28 |
[ -z "$HTTPD_ROOT" ] && HTTPD_ROOT=/var/www/localhost
|
| 29 |
|
| 30 |
src_compile() {
|
| 31 |
local myauth mymysql
|
| 32 |
# sfuchs: configure script of linesrv 2 is quite bad...
|
| 33 |
# prefer pam, if disabled try crypt
|
| 34 |
# the configure script will disable authentication if
|
| 35 |
# neither pam nor crypt is available.
|
| 36 |
if ! ( use pam ); then
|
| 37 |
myauth="--disable-pamauth"
|
| 38 |
if use crypt; then
|
| 39 |
myauth="--enable-cryptauth"
|
| 40 |
fi
|
| 41 |
fi
|
| 42 |
# --enable-mysql is not supported... stupid, I know.
|
| 43 |
use mysql || mymysql="--disable-mysql"
|
| 44 |
econf ${myauth} ${mymysql} || die "bad configure"
|
| 45 |
emake || die
|
| 46 |
}
|
| 47 |
|
| 48 |
src_install() {
|
| 49 |
dodir /usr/share/linesrv /var/log/linesrv ${HTTPD_ROOT}/htdocs/lclog
|
| 50 |
|
| 51 |
dosbin server/linesrv
|
| 52 |
|
| 53 |
exeinto ${HTTPD_ROOT}/cgi-bin ; doexe lclog/lclog htmlstatus/htmlstatus
|
| 54 |
chmod 4755 ${D}${HTTPD_ROOT}/cgi-bin/htmlstatus
|
| 55 |
insinto ${HTTPD_ROOT}/htdocs/lclog ; doins lclog/html/*
|
| 56 |
|
| 57 |
mknod ${D}/usr/share/linesrv/logpipe p
|
| 58 |
exeinto /usr/share/linesrv ; doexe server/config/complete_syntax/halt-wrapper
|
| 59 |
|
| 60 |
dodoc server/{INSTALL,NEWS,README}
|
| 61 |
newdoc htmlstatus/README README.htmlstatus
|
| 62 |
newdoc lclog/INSTALL INSTALL.lclog
|
| 63 |
docinto complete_syntax ; dodoc server/config/complete_syntax/*
|
| 64 |
|
| 65 |
exeinto /etc/init.d ; newexe ${FILESDIR}/linesrv.rc6 linesrv
|
| 66 |
insinto /etc ; newins ${FILESDIR}/linesrv.conf linesrv.conf.sample
|
| 67 |
insinto /etc/pam.d ; newins ${FILESDIR}/linecontrol.pam linecontrol
|
| 68 |
insinto /etc/pam.d ; newins ${FILESDIR}/lcshutdown.pam lcshutdown
|
| 69 |
}
|