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.6.ebuild (-13 / +16 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 69-76 Link Here
69
	dodir /usr/NX/share
70
	dodir /usr/NX/share
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 /var/run/NX
73
	cp -R var "${D}"/usr/NX || die
74
	dosym /var/run/NX /usr/NX/var/run
75
	dodir /var/log/NX
76
	dosym /var/log/NX /usr/NX/var/log
74
77
75
	dodir /etc/init.d
78
	dodir /etc/init.d
76
	newinitd "${FILESDIR}"/nxnode-3.0.0-init nxsensor
79
	newinitd "${FILESDIR}"/nxnode-3.0.0-init nxsensor
Lines 79-92 Link Here
79
pkg_postinst()
82
pkg_postinst()
80
{
83
{
81
	# Only install license file if none is found
84
	# Only install license file if none is found
82
	if [ ! -f /usr/NX/etc/node.lic ]; then
85
	if [ ! -f /etc/NX/node.lic ]; then
83
		cp "${ROOT}"/usr/NX/etc/node.lic.sample "${ROOT}"/usr/NX/etc/node.lic || die
86
		cp "${ROOT}"/etc/NX/node.lic.sample "${ROOT}"/etc/NX/node.lic || die
84
		chmod 0400 "${ROOT}"/usr/NX/etc/node.lic
87
		chmod 0400 "${ROOT}"/etc/NX/node.lic
85
		chown nx:0 "${ROOT}"/usr/NX/etc/node.lic
88
		chown nx:0 "${ROOT}"/etc/NX/node.lic
86
	fi
89
	fi
87
90
88
	# only run install on the first time
91
	# only run install on the first time
89
	if [ -f /usr/NX/etc/node.cfg ]; then
92
	if [ -f /etc/NX/node.cfg ]; then
90
		einfo "Running NoMachine's update script"
93
		einfo "Running NoMachine's update script"
91
		"${ROOT}"/usr/NX/scripts/setup/nxnode --update
94
		"${ROOT}"/usr/NX/scripts/setup/nxnode --update
92
	else
95
	else
Lines 98-102 Link Here
98
	elog
101
	elog
99
	elog "  rc-update add nxsensor default"
102
	elog "  rc-update add nxsensor default"
100
	elog
103
	elog
101
	elog "You will also need to change EnableSensor to 1 in /usr/NX/etc/node.cfg"
104
	elog "You will also need to change EnableSensor to 1 in /etc/NX/node.cfg"
102
}
105
}

Return to bug 318727