summaryrefslogtreecommitdiff
blob: a6a597e65510afaa5371d982dc28c2a411295af6 (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/net-misc/pxes/pxes-1.2.ebuild,v 1.1 2006/11/17 22:48:18 wolf31o2 Exp $

inherit eutils perl-app

URL_BASE="http://downloads.2x.com/pxes/${PV}/dist/"

DESCRIPTION="PXES is a package for building thin clients using multiple types of clients"
HOMEPAGE="http://www.2x.com/pxes/"
SRC_URI="${URL_BASE}/${PN}-base-i586-${PV}-4.tar.gz
	${URL_BASE}/pxesconfig-${PV}-4.tar.gz"

KEYWORDS="~amd64 ~x86"
IUSE="cdr dvdr"
SLOT="0"
LICENSE="GPL-2"
DEPEND=">=dev-lang/perl-5.8.0-r12
	>=dev-perl/glade-perl-0.61
	dev-perl/gtk-perl"

RDEPEND="${DEPEND}
	sys-fs/squashfs-tools
	cdr? ( virtual/cdrtools )
	dvdr? ( virtual/cdrtools )"

dir=/opt/${P}
Ddir=${D}/${dir}

die_from_busted_gtk-perl() {
	ewarn "PXES requires that gtk-perl was built with USE=gnome. You can"
	ewarn "fix this by doing the following:"
	echo
	einfo "mkdir -p /etc/portage"
	einfo "echo 'dev-perl/gtk-perl gnome' >> /etc/portage/package.use"
	einfo "emerge --oneshot dev-perl/gtk-perl"
	die "gtk-perl requires USE=gnome"
}

pkg_setup() {
	built_with_use dev-perl/gtk-perl gnome || die_from_busted_gtk-perl
}

src_compile() {
	cd ${WORKDIR}/pxesconfig-${PV}
	SRC_PREP="yes"
	perl Makefile.PL PREFIX=${D}/usr INSTALLDIRS=vendor DESTDIR=${D}
	perl-app_src_compile || die
}

src_install() {
	dodir ${dir}
	cp -r ${S}/stock ${Ddir} || die "Copying files"
	cp -pPR ${S}/tftpboot ${D} || die "Copying tftpboot"
	dodir ${dir}/tools
	dosym /usr/bin/mksquashfs ${dir}/tools/mksquashfs
	dodoc Documentation/ChangeLog
	dohtml -r Documentation/html/*
	cd ${WORKDIR}/pxesconfig-${PV}
	perl-module_src_install || die
	# Cleanup from improper install
	cp -r ${D}/${D}/usr ${D}
	rm -rf ${D}/var
}