summaryrefslogtreecommitdiff
blob: dde0964f9b59cb769cc53affb050052488890c7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
# Updated by Sebastian Werner <sebastian@werner-productions.de>
# /home/cvsroot/gentoo-x86/net-print/cups/cups-1.1.6.ebuild,v 1.1 2001/04/28 04:19:58 achim Exp
# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.1.9.ebuild,v 1.3 2001/08/31 03:23:39 pm Exp $


S=${WORKDIR}/${P}
DESCRIPTION="The Common Unix Printing System"
SRC_URI="ftp://ftp.easysw.com/pub/cups/${PV}/${P}-source.tar.bz2"

HOMEPAGE="http://www.cups.org"

PROVIDE="virtual/lpr"

DEPEND="virtual/glibc
	pam? ( >=sys-libs/pam-0.72 )
	ssl? ( >=dev-libs/openssl-0.9.6 )
	>=media-libs/libpng-1.0.9
	>=media-libs/tiff-3.5.5
	!net-print/LPRng"


src_compile() {

    local myconf
    if [ "`use pam`" ]
    then
      myconf="--enable-pam"
    fi
    if [ "`use ssl`" ]
    then
      myconf="${myconf} --enable-ssl"
    fi
    try ./configure --prefix=/ -exec-prefix=/usr \
		    --mandir=/usr/share/man --host=${CHOST} ${myconf}
    cp config.h config.h.orig
    sed  -e "s:/usr/share/doc/cups:/usr/share/cups/doc:" \
	config.h.orig > config.h
    cp Makedefs Makedefs.orig
    sed -e "s:/usr/share/doc/cups:/usr/share/cups/doc:" \
	Makedefs.orig > Makedefs 
    try make 
}

src_install () {

    cd ${S}
    try make exec_prefix=${D}/usr  prefix=${D}/ \
	datadir=${D}/usr/share localstatedir=${D}/var \
	includedir=${D}/usr/include sysconfdir=${D}/etc \
	MANDIR=${D}/usr/share/man PAMDIR=${D}/etc/pam.d \
	INITDIR=${D}/etc/rc.d DOCDIR=${D}/usr/share/cups/doc \
	install 
    rm -rf ${D}/etc/rc.d
    rm -rf ${D}/usr/man/cat*
    cd ${S}
    dodoc *.txt 
    docinto html
    dodoc LICENSE.html

    insinto /etc/rc.d/init.d
    insopts -m 755
    doins ${FILESDIR}/cupsd
    insinto /etc/pam.d
    insopts -m 644
    doins ${FILESDIR}/cups

}