--- ../../nx-overlay/net-misc/nxserver-freenx/nxserver-freenx-0.4.4-r1.ebuild 2006-03-25 10:44:26.000000000 +0100 +++ nxserver-freenx/nxserver-freenx-0.4.4-r2.ebuild 2006-03-25 11:33:40.000000000 +0100 @@ -11,19 +11,22 @@ SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" RESTRICT="nomirror strip" -IUSE="nxclient" +IUSE="nxclient esd arts cups" DEPEND="virtual/ssh dev-tcltk/expect sys-apps/gawk net-analyzer/gnu-netcat - x86? ( commercial? ( >=net-misc/nxclient-1.4.0 ) - !commercial? ( !net-misc/nxclient ) ) - amd64? ( commercial? ( >=net-misc/nxclient-1.4.0 ) - !commercial? ( !net-misc/nxclient ) ) + x86? ( nxclient? ( >=net-misc/nxclient-1.4.0 ) + !nxclient? ( !net-misc/nxclient ) ) + amd64? ( nxclient? ( >=net-misc/nxclient-1.4.0 ) + !nxclient? ( !net-misc/nxclient ) ) !x86? ( !amd64? ( !net-misc/nxclient ) ) >=net-misc/nxproxy-1.4.0 || ( >=net-misc/nx-x11-1.4.0 >=net-misc/nx-x11-bin-1.4.0 ) + arts? ( kde-base/arts ) + esd? ( media-sound/esound ) + cups? ( net-print/cups ) !net-misc/nxserver-personal !net-misc/nxserver-business !net-misc/nxserver-enterprise" @@ -46,14 +49,38 @@ has_multilib_profile && \ sed -i "/PATH_LIB=/s/lib/$(get_abi_LIBDIR x86)/" nxloadconfig + [ -f "/usr/NX/etc/node.conf" ] && cp /usr/NX/etc/node.conf . # Automatically enable the 1.5 backend if it's installed. if has_version "~net-misc/nx-x11-1.5.0" || has_version "~net-misc/nx-x11-bin-1.5.0" ; then - sed '/^ENABLE_1_5_0_BACKEND=/s/"0"/"1"' nxloadconfig - sed '/^#ENABLE_1_5_0_BACKEND=/s/"0"/"1"' node.conf.sample - cat < node.conf -# For more configure options see node.conf.sample -ENABLE_1_5_0_BACKEND="1" -EOF + sed -i '/ENABLE_1_5_0_BACKEND=/s/"0"/"1"/' nxloadconfig + sed -i '/ENABLE_1_5_0_BACKEND=/s/"0"/"1"/' node.conf.sample + [ -f "node.conf" ] && sed -i '/ENABLE_1_5_0_BACKEND=/s/"0"/"1"/' node.conf + else + [ -f "node.conf" ] && sed -i '/ENABLE_1_5_0_BACKEND=/s/"1"/"0"/' node.conf + fi + + if use esd ; then + sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' nxloadconfig + sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' node.conf.sample + [ -f "node.conf" ] && sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' node.conf + else + [ -f "node.conf" ] && sed -i '/ENABLE_ESD_PRELOAD=/s/"1"/"0"/' node.conf + fi + + if use arts ; then + sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' nxloadconfig + sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' node.conf.sample + [ -f "node.conf" ] && sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' node.conf + else + [ -f "node.conf" ] && sed -i '/ENABLE_ARTSD_PRELOAD=/s/"1"/"0"/' node.conf + fi + + if use cups ; then + sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' nxloadconfig + sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' node.conf.sample + [ -f "node.conf" ] && sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' node.conf + else + [ -f "node.conf" ] && sed -i '/ENABLE_KDE_CUPS=/s/"1"/"0"/' node.conf fi } @@ -75,8 +102,8 @@ dobin nxkeygen dobin nxloadconfig dobin nxsetup - ( ( use x86 || use amd64 ) && use commercial ) || dobin nxprint - ( ( use x86 || use amd64 ) && use commercial ) || dobin nxclient + ( ( use x86 || use amd64 ) && use nxclient ) || dobin nxprint + ( ( use x86 || use amd64 ) && use nxclient ) || dobin nxclient dodir ${NX_ETC_DIR} for x in passwords passwords.orig ; do @@ -86,10 +113,7 @@ insinto ${NX_ETC_DIR} doins node.conf.sample - - if has_version "~net-misc/nx-x11-1.5.0" || has_version "~net-misc/nx-x11-bin-1.5.0" ; then - doins node.conf - fi + [ -f "node.conf" ] && doins node.conf ssh-keygen -f ${D}${NX_ETC_DIR}/users.id_dsa -t dsa -N "" -q