summaryrefslogtreecommitdiff
blob: 69275dec5ba6d0639bd7ce75a723a3cd3d7b5c6b (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-libs/libtermcap-compat/libtermcap-compat-2.0.8-r2.ebuild,v 1.13 2006/12/23 21:41:14 dertobi123 Exp $

# we only want this for binary-only packages, so we will only be installing
# the lib used at runtime; no headers and no files to link against

inherit eutils multilib

PATCHVER=1

MY_P="termcap-${PV}"
DESCRIPTION="Compatibility package for old termcap-based programs"
HOMEPAGE="http://www.catb.org/~esr/terminfo/"
SRC_URI="http://www.catb.org/~esr/terminfo/termtypes.tc.gz
	mirror://gentoo/${MY_P}.tar.bz2
	mirror://gentoo/${MY_P}-patches-${PATCHVER}.tar.bz2"

LICENSE="freedist"
SLOT="0"
KEYWORDS="alpha amd64 hppa ppc sparc x86"
IUSE=""

DEPEND=""

S=${WORKDIR}/${MY_P}

src_unpack() {
	unpack ${A}

	EPATCH_SOURCE="${WORKDIR}/patch"
	EPATCH_SUFFIX="patch"

	cd "${WORKDIR}"
	mv termtypes.tc termcap || die
	epatch "${EPATCH_SOURCE}"/tc.file

	cd "${S}"
	epatch "${EPATCH_SOURCE}"
}

src_compile() {
	emake prefix="/" CFLAGS="${CFLAGS} -I." || die
}

src_install() {
	dodir /lib /include
	emake prefix="${D}" OWNER="root:root" install || die
	dodoc ChangeLog README

	insinto /etc
	doins "${WORKDIR}"/termcap

	# now punt everything used for compiling
	cd "${D}"
	rm -r include || die

	if [[ $(get_libdir) != "lib" ]] ; then
		mv lib $(get_libdir) || die
	fi
	dosym libtermcap.so.${PV} /$(get_libdir)/libtermcap.so.2
	cd $(get_libdir)
	rm -f libtermcap.{a,so}
}