/[gentoo-x86]/net-misc/nxserver-freeedition/nxserver-freeedition-3.4.0.17.ebuild
Gentoo

Contents of /net-misc/nxserver-freeedition/nxserver-freeedition-3.4.0.17.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Sep 23 09:44:33 2011 UTC (8 years, 2 months ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Remove vulnerable versions, security bugs #378345 and #384097

(Portage version: 2.2.0_alpha59/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/nxserver-freeedition/nxserver-freeedition-3.4.0.17.ebuild,v 1.1 2011/03/02 15:27:35 voyageur Exp $
4
5 EAPI=2
6 inherit eutils versionator
7
8 MAJOR_PV="$(get_version_component_range 1-3)"
9 FULL_PV="${MAJOR_PV}-$(get_version_component_range 4)"
10 DESCRIPTION="Free edition NX server from NoMachine"
11 HOMEPAGE="http://www.nomachine.com/"
12 SRC_URI="amd64? ( http://64.34.161.181/download/${MAJOR_PV}/Linux/FE/nxserver-${FULL_PV}.x86_64.tar.gz )
13 x86? ( http://64.34.161.181/download/${MAJOR_PV}/Linux/FE/nxserver-${FULL_PV}.i386.tar.gz )"
14
15 LICENSE="nomachine"
16 SLOT="0"
17 KEYWORDS="-* ~amd64 ~x86"
18 IUSE=""
19 RESTRICT="strip"
20
21 DEPEND="=net-misc/nxnode-${MAJOR_PV}*"
22 RDEPEND="${DEPEND}
23 media-fonts/font-misc-misc
24 media-fonts/font-cursor-misc
25 x11-apps/xauth
26 x11-apps/xhost"
27
28 S="${WORKDIR}"/NX
29
30 pkg_preinst() {
31 enewuser nx -1 -1 /usr/NX/home/nx
32 }
33
34 src_prepare() {
35 epatch "${FILESDIR}"/nxserver-3.0.0-r4-setup.patch
36 epatch "${FILESDIR}"/nxserver-3.3.0-dontupdatekeys.patch
37 }
38
39 src_install() {
40 # we install nxserver into /usr/NX, to make sure it doesn't clash
41 # with libraries installed for FreeNX
42
43 into /usr/NX
44 dobin bin/nxserver
45
46 dodir /usr/NX/etc/keys
47 insinto /usr/NX/etc
48 doins etc/administrators.db.sample
49 doins etc/guests.db.sample
50 doins etc/passwords.db.sample
51 doins etc/profiles.db.sample
52 doins etc/users.db.sample
53 doins etc/server.lic.sample
54
55 newins etc/server-debian.cfg.sample server-gentoo.cfg.sample
56
57 cp -R home "${D}"/usr/NX || die "Unable to install home folder"
58 cp -R lib "${D}"/usr/NX || die "Unable to install lib folder"
59 cp -R scripts "${D}"/usr/NX || die "Unable to install scripts folder"
60 cp -R share "${D}"/usr/NX || die "Unable to install share folder"
61 cp -R var "${D}"/usr/NX || die "Unable to install var folder"
62
63 newinitd "${FILESDIR}"/nxserver-2.1.0-init nxserver
64 }
65
66 pkg_postinst () {
67 # Other NX servers ebuilds may have already created the nx account
68 # However they use different login shell/home directory paths
69 if [[ ${ROOT} == "/" ]]; then
70 usermod -s /usr/NX/bin/nxserver nx || die "Unable to set login shell of nx user!!"
71 usermod -d /usr/NX/home/nx nx || die "Unable to set home directory of nx user!!"
72 else
73 elog "If you had another NX server installed before, please make sure"
74 elog "the nx user account is correctly set to:"
75 elog " * login shell: /usr/NX/bin/nxserver"
76 elog " * home directory: /usr/NX/home/nx"
77 fi
78
79 # only run install when no configuration file is found
80 if [ -f /usr/NX/etc/server.cfg ]; then
81 einfo "Running NoMachine's update script"
82 "${ROOT}"/usr/NX/scripts/setup/nxserver --update || die "Update script failed"
83 else
84 einfo "Running NoMachine's setup script"
85 "${ROOT}"/usr/NX/scripts/setup/nxserver --install || die "Installation script failed"
86 fi
87
88 if ! has_version net-misc/openssh[pam]; then
89 elog ""
90 elog "net-misc/openssh was not built with PAM support"
91 elog "You will need to unlock the nx account by setting a password for it"
92 fi
93
94 elog "Remember to add nxserver to your default runlevel"
95 }

  ViewVC Help
Powered by ViewVC 1.1.20