summaryrefslogtreecommitdiff
path: root/extra/freenx/PKGBUILD
blob: ba6a31b91c41733524618e910b67af77dd65b9b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# $Id: PKGBUILD 135657 2011-08-17 06:43:27Z tpowa $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
#Contributed: eliott <eliott@solarblue.net>, Andre Naumann <anaumann@SPARCed.org> 
pkgname=freenx
pkgver=0.7.3
pkgrel=9
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-fonts-misc' 'coreutils' 'xorg-xmessage' 'xorg-xrdb' 'xorg-xpr' 'xorg-xset' 'xorg-sessreg')
backup=(opt/NX/etc/node.conf)
install=freenx.install
source=(http://download.berlios.de/freenx/$pkgname-server-$pkgver.tar.gz
        keymap.patch
        nxagent-startup.patch
        freenx-latest-svn.patch
        remove-dialog.patch)


build() {
  # patch and install nxserver
  cd $startdir/src/$pkgname-server-$pkgver
  # add latest svn fixes
  patch -Np3 -i ../freenx-latest-svn.patch
  # patch from inside nx
  patch < gentoo-nomachine.diff 
  # patch broken keymap remapping
  patch -Np0 -i ${srcdir}/keymap.patch 
  # patch nxagent startup to avoid login issues
  patch -Np0 -i ${srcdir}/nxagent-startup.patch
  # remove broken dialog function
  patch -Np0 -i  ${srcdir}/remove-dialog.patch
  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,COMMAND_MD5SUM="openssl md5",COMMAND_MD5SUM="md5sum",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
  sed -i -e 's,libXcomp.so,libXcomp.so.3,g' nxloadconfig
  sed -i -e 's,libXcompext.so,libXcompext.so.3,g' nxloadconfig
  sed -i -e 's,libXrender.so.1.2,libXrender.so.1.2.2:$APPLICATION_LIBRARY_PATH/libXcompsh.so.3:$APPLICATION_LIBRARY_PATH/libXcompshad.so.3,g' nxloadconfig
  # fix key generation
  sed -i -e 's,AUTOMATIC="no",AUTOMATIC="yes",g' nxsetup
}

package() {
  cd $startdir/src/$pkgname-server-$pkgver  
  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
  # provided by nxclient!
  #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
}
md5sums=('856f597e139018f7ed62713c9d6c9ed5'
         'f0867659c925f6363fb2b7661f349248'
         '30dc16d8e2093ff71d5834a169ad9d00'
         '788f30322783cf2c2dc833e2e4d5e8ad'
         'cae1773312506eeefe6a8de07c492bd8')