1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/xrdp/xrdp-0.3.1.ebuild,v 1.4 2007/07/12 02:52:15 mr_bones_ Exp $
5 inherit eutils multilib
7 DESCRIPTION="An open source remote desktop protocol(rdp) server."
8 HOMEPAGE="http://xrdp.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
23 DESTDIR="/usr/$(get_libdir)/${PN}"
26 if has_version ${1}; then
27 if ! built_with_use ${1} server; then
29 eerror "You must have your VNC implementation (currently ${1}) built"
30 eerror "with the \"server\" USE flag to use ${PN}."
32 die "Please rebuild ${1} with USE=server"
40 valid_vnc_server "net-misc/vnc"
41 valid_vnc_server "net-misc/tightvnc"
48 #epatch "${FILESDIR}/01sans_font.dpatch"
49 #epatch "${FILESDIR}/02makefile_sesman_fix.dpatch"
50 #epatch "${FILESDIR}/03path_fix.dpatch"
51 #epatch "${FILESDIR}/05rpath_fix.dpatch"
52 #epatch "${FILESDIR}/04quiet_start.dpatch"
53 #epatch "${FILESDIR}/06keygen.dpatch"
54 #epatch "${FILESDIR}/07fr_de_layout.dpatch"
55 find . -name "Makefile" -exec sed -i -e "s:-Wall -O2:\$\(MYCFLAGS\):g" {} \;
56 epatch "${FILESDIR}/${P}-curdir.patch"
58 sed -ie '/instfiles\/xrdp_control1.sh/ d' Makefile
59 sed -ie "s:/usr/xrdp:${DESTDIR}:g" Makefile */Makefile
61 sed -ie "s:rpath,.:rpath,${DESTDIR}:" xrdp/Makefile
65 emake MYCFLAGS="${CFLAGS}" DESTDIR="${DESTDIR}" || die "emake failed"
69 emake DESTDIRDEB="${D}" installdeb || die "emake installdeb failed"
70 dodoc design.txt readme.txt "${D}${DESTDIR}/startwm.sh"
71 doman "${D}/usr/man/"*/*
72 keepdir /var/log/${PN}
73 rm -rf "${D}${DESTDIR}/startwm.sh" "${D}/usr/man"
75 doexe "${FILESDIR}/startwm.sh"
76 newinitd "${FILESDIR}/${PN}-initd" ${PN}
77 newconfd ${FILESDIR}/${PN}-confd ${PN}
78 sed -i "s:LIBDIR:$(get_libdir):" "${D}/etc/init.d/${PN}"