summaryrefslogtreecommitdiff
path: root/tightvnc/PKGBUILD
blob: 1cf8b440a82d96384169d1640ab3c5a70353f48d (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Paul Mattal <paul@archlinux.org>
# Contributor: Andrew Hills <hills.as@gmail.com>
# Contributor: John <graysky@archlinux.us>

pkgname=tightvnc
pkgver=1.3.10
pkgrel=19
pkgdesc='VNC server and viewer'
arch=('x86_64' 'i686' 'pentium4')
license=('GPL')
url='http://www.tightvnc.com/'
_pinned_dependencies=(
  'glibc>=2.31'
  'libice=1.0.10'
  'libjpeg-turbo=2.0.5'
  'libsm=1.2.3'
  'libx11=1.6.11'
  'libxaw=1.0.13'
  'libxext=1.3.4'
  'libxmu=1.1.3'
  'libxpm=3.5.13'
  'libxt=1.2.0'
  'zlib=1:1.2.11'
)
depends=('libjpeg' 'libxp' 'xorg-xauth' 'perl' "${_pinned_dependencies[@]}")
makedepends=('imake' 'setconf' 'gendesk')
options=('!makeflags')
source=("http://downloads.sf.net/sourceforge/vnc-tight/$pkgname-${pkgver}_unixsrc.tar.bz2"
        'http://people.csail.mit.edu/jaffer/Color/rgb.txt'
        'vncserver.service'
        'tightvnc.png::http://www.tightvnc.com/logo/tightvnc-logo-90x90.png')
sha256sums=('f48c70fea08d03744ae18df6b1499976362f16934eda3275cead87baad585c0d'
            'af6c056a95ae725f98534db22b9a4916d17f2356fdca84a4a038211a82fa8a73'
            'ccadf1fc708fad601e6113464d6c533a629f6dc9116f6071347cd0b465c1f48b'
            '9059bdfe62231fc645a35c3fe694c7e97e2bdeb5e3e23ce8eab2961e583219a8')

prepare() {
  gendesk -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" --exec vncviewer \
    --name 'TightVNC Viewer' --categories 'Application;Network'

  cd vnc_unixsrc
  setconf vncserver '$vncClasses' \"/usr/share/tightvnc\"\;
  setconf vncserver '$fontPath' \
    \"/usr/share/fonts/misc/,/usr/share/fonts/75dpi/,/usr/share/fonts/100dpi/,/usr/share/fonts/Type1/\"\;
  sed -i 's:/lib/cpp:/usr/bin/cpp:' Xvnc/config/cf/linux.cf
}

build() {
  cd vnc_unixsrc

  export CFLAGS+=' -fcommon'
  export CPPFLAGS+=' -fcommon'
  export CXXFLAGS+=' -fcommon'
  export LDFLAGS+=' -fcommon'

  xmkmf
  make World

  cd Xvnc
  ./configure
  setconf programs/Xserver/dix/Makefile DEFAULTRGBDATABASE '/usr/share/tightvnc/rgb'
  setconf programs/Xserver/os/Makefile PROTO_DEFINES "-D_XOPEN_SOURCE=500L"
  setconf lib/font/fc/Makefile PROTO_DEFINES "-D_XOPEN_SOURCE=500L"

  make
}

package() {
  cd vnc_unixsrc

  install -d "$pkgdir/usr/bin"
  install -d "$pkgdir/usr/share/man/man1"
  install -d "$pkgdir/usr/share/$pkgname"

  ./vncinstall "$pkgdir/usr/bin" "$pkgdir/usr/share/man"

  cd "$srcdir"
  install -Dm644 vnc_unixsrc/classes/* \
    $pkgdir/usr/share/$pkgname
  install -Dm644 rgb.txt $pkgdir/usr/share/$pkgname/rgb.txt
  install -Dm644 $pkgname.desktop \
    $pkgdir/usr/share/applications/$pkgname.desktop
  install -Dm644 $pkgname.png \
    $pkgdir/usr/share/pixmaps/$pkgname.png
  install -Dm644 vncserver.service \
    $pkgdir/usr/lib/systemd/system/vncserver.service
}

# vim:set ts=2 sw=2 et: