PKGBUILDs/extra/freenx/PKGBUILD

60 lines
2.9 KiB
Bash
Raw Normal View History

2009-10-10 02:23:22 +00:00
# $Id: PKGBUILD 43178 2009-06-20 15:49:48Z andyrtr $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
#Contributed: eliott <eliott@solarblue.net>, Andre Naumann <anaumann@SPARCed.org>
pkgname=freenx
pkgver=0.7.3
pkgrel=4
pkgdesc="Free Software (GPL) Implementation of the NX Server"
arch=(i686 x86_64)
url="http://freenx.berlios.de"
license=('GPL')
depends=('nxserver' 'gnu-netcat' 'openssh' 'expect' 'xorg-xauth' 'xorg-apps' 'xorg-fonts-misc' 'coreutils')
backup=(opt/NX/etc/node.conf)
install=freenx.install
source=(http://download.berlios.de/freenx/$pkgname-server-$pkgver.tar.gz kde-config.patch
keymap.patch)
md5sums=('856f597e139018f7ed62713c9d6c9ed5'
'70788a41f6c965ce117e9f5a8809df2a'
'f0867659c925f6363fb2b7661f349248')
build() {
# patch and install nxserver
cd $startdir/src/$pkgname-server-$pkgver
# patch from inside nx
patch < gentoo-nomachine.diff || return 1
# patch broken keymap remapping
patch -Np0 -i ${srcdir}/keymap.patch || return 1
# fixed for archlinux
### Broken by kde4 at the moment!
#patch -Np0 -i ../kde-config.patch || return 1
sed -i -e 's,authorized_keys2,authorized_keys,g' nxloadconfig
sed -i -e 's,/usr/NX,/opt/NX,g' nxloadconfig
sed -i -e 's,netcat,nc,g' nxloadconfig
sed -i -e 's/utmp/nx/g' nxsetup
sed -i -e 's,/usr/X11R6/bin/xauth,/usr/bin/xauth,g' nxloadconfig
sed -i -e 's,COMMAND_FOOMATIC="/usr/lib/cups/driver/foomatic-ppdfile",COMMAND_FOOMATIC="/usr/bin/foomatic-ppdfile",g' nxloadconfig
sed -i -e 's|AGENT_EXTRA_OPTIONS_X=""|AGENT_EXTRA_OPTIONS_X="-co /usr/share/X11/rgb -fp /usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 -xkbdir /usr/share/X11/xkb"|g' nxloadconfig
sed -i -e 's/ENABLE_AUTORECONNECT_BEFORE_140="1"/ENABLE_AUTORECONNECT_BEFORE_140="0"/g' nxloadconfig
sed -i -e 's,/etc/init.d/ssh,/etc/rc.d/sshd,g' nxsetup
# fix key generation
sed -i -e 's,AUTOMATIC="no",AUTOMATIC="yes",g' nxsetup
install -D -m755 nxnode $startdir/pkg/opt/NX/bin/nxnode
install -D -m755 nxserver $startdir/pkg/opt/NX/bin/nxserver
install -D -m755 nxsetup $startdir/pkg/opt/NX/bin/nxsetup
install -D -m755 nxkeygen $startdir/pkg/opt/NX/bin/nxkeygen
install -D -m755 nxnode-login $startdir/pkg/opt/NX/bin/nxnode-login
install -D -m755 nxloadconfig $startdir/pkg/opt/NX/bin/nxloadconfig
install -D -m755 nxdialog $startdir/pkg/opt/NX/bin/nxdialog
install -D -m755 nxviewer_helper $startdir/pkg/opt/NX/bin/nxviever_helper
install -D -m755 nxcups-gethost $startdir/pkg/opt/NX/bin/nxcups-gethost
install -D -m755 nxdesktop_helper $startdir/pkg/opt/NX/bin/nxdesktop_helper
#install -D -m755 nxprint $startdir/pkg/opt/NX/bin/nxprint
install -D -m755 node.conf.sample $startdir/pkg/opt/NX/etc/node.conf
# install nxhelper
cd nxserver-helper
make
install -D -m755 nxserver-helper $startdir/pkg/opt/NX/bin/nxserver-helper
# create nxserver homedir
mkdir -m700 -p $startdir/pkg/opt/NX/home/nx
}