Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 318727 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/net-misc/nxnode/nxnode-3.4.0.13.ebuild (-12 / +21 lines)
Lines 37-43 Link Here
37
37
38
pkg_preinst()
38
pkg_preinst()
39
{
39
{
40
	enewuser nx -1 -1 /usr/NX/home/nx
40
	enewuser nx -1 -1 /var/lib/NX
41
}
41
}
42
42
43
src_prepare()
43
src_prepare()
Lines 55-64 Link Here
55
		dobin bin/$x
55
		dobin bin/$x
56
	done
56
	done
57
57
58
	dodir /usr/NX/etc
58
	dodir /etc/NX
59
	cp etc/node-debian.cfg.sample "${D}"/usr/NX/etc/node-gentoo.cfg.sample || die
59
	dosym /etc/NX /usr/NX/etc
60
	sed -e 's|COMMAND_FUSER = .*|COMMAND_FUSER = "/usr/bin/fuser"|;' -i "${D}"/usr/NX/etc/node-gentoo.cfg.sample || die
60
	cp etc/node-debian.cfg.sample "${D}"/etc/NX/node-gentoo.cfg.sample || die
61
	cp etc/node.lic.sample "${D}"/usr/NX/etc/node.lic.sample || die
61
	sed -e 's|COMMAND_FUSER = .*|COMMAND_FUSER = "/usr/bin/fuser"|;' -i "${D}"/etc/NX/node-gentoo.cfg.sample || die
62
	cp etc/node.lic.sample "${D}"/etc/NX/node.lic.sample || die
62
63
63
	dodir /usr/NX/lib
64
	dodir /usr/NX/lib
64
	cp -R lib "${D}"/usr/NX || die
65
	cp -R lib "${D}"/usr/NX || die
Lines 70-76 Link Here
70
	cp -R share "${D}"/usr/NX || die
71
	cp -R share "${D}"/usr/NX || die
71
72
72
	dodir /usr/NX/var
73
	dodir /usr/NX/var
73
	cp -R var "${D}"/usr/NX || die
74
	dodir /usr/NX/home
75
	dodir /var/db/NX
76
	dosym /var/db/NX /usr/NX/var/db
77
	dodir /var/lib/NX
78
	dosym /var/lib/NX /usr/NX/home/nx
79
	dodir /var/log/NX
80
	dosym /var/log/NX /usr/NX/var/log
81
	dodir /var/run/NX
82
	dosym /var/run/NX /usr/NX/var/run
74
83
75
	dodir /etc/init.d
84
	dodir /etc/init.d
76
	newinitd "${FILESDIR}"/nxnode-3.0.0-init nxsensor
85
	newinitd "${FILESDIR}"/nxnode-3.0.0-init nxsensor
Lines 79-92 Link Here
79
pkg_postinst()
88
pkg_postinst()
80
{
89
{
81
	# Only install license file if none is found
90
	# Only install license file if none is found
82
	if [ ! -f /usr/NX/etc/node.lic ]; then
91
	if [ ! -f "${ROOT}"/etc/NX/node.lic ]; then
83
		cp "${ROOT}"/usr/NX/etc/node.lic.sample "${ROOT}"/usr/NX/etc/node.lic || die
92
		cp "${ROOT}"/etc/NX/node.lic.sample "${ROOT}"/etc/NX/node.lic || die
84
		chmod 0400 "${ROOT}"/usr/NX/etc/node.lic
93
		chmod 0400 "${ROOT}"/etc/NX/node.lic
85
		chown nx:0 "${ROOT}"/usr/NX/etc/node.lic
94
		chown nx:0 "${ROOT}"/etc/NX/node.lic
86
	fi
95
	fi
87
96
88
	# only run install on the first time
97
	# only run install on the first time
89
	if [ -f /usr/NX/etc/node.cfg ]; then
98
	if [ -f "${ROOT}"/etc/NX/node.cfg ]; then
90
		einfo "Running NoMachine's update script"
99
		einfo "Running NoMachine's update script"
91
		"${ROOT}"/usr/NX/scripts/setup/nxnode --update
100
		"${ROOT}"/usr/NX/scripts/setup/nxnode --update
92
	else
101
	else
Lines 98-102 Link Here
98
	elog
107
	elog
99
	elog "  rc-update add nxsensor default"
108
	elog "  rc-update add nxsensor default"
100
	elog
109
	elog
101
	elog "You will also need to change EnableSensor to 1 in /usr/NX/etc/node.cfg"
110
	elog "You will also need to change EnableSensor to 1 in /etc/NX/node.cfg"
102
}
111
}

Return to bug 318727