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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
# $Id: PKGBUILD 184415 2013-05-06 19:38:57Z foutrelis $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgbase=nx
pkgname=('libxcomp' 'nxproxy' 'nx-x11' 'nx-xcompext' 'nxagent' 'x2go-agent' 'nx-headers')
pkgver=3.5.0.20
pkgrel=2
arch=('i686' 'x86_64')
url="http://wiki.x2go.org/"
license=('GPL')
#options=('!makeflags') # '!strip')
makedepends=('libjpeg-turbo' 'libpng' 'bash' 'perl' 'libxml2' # runtime dependencies from subpackages
'xproto' 'freetype2' 'libxaw' 'libxrender' 'libxp' 'libxpm' 'libxdamage' 'libxrandr' 'libxcomposite' 'libxtst' 'xorg-sessreg' # makedepends
)
source=(http://code.x2go.org/releases/source/nx-libs/nx-libs-$pkgver-full.tar.gz
keyboard_rule.diff)
md5sums=('9dd4b22579cf048c14c9c75302553f18'
'f681bc66827cd7ddff4b81b983c20401')
build() {
cd "${srcdir}/nx-libs-$pkgver"
# fix keyboard layout with xkeyboard-config >= 2.6 - doesn't solve proper layout detection
# upstream needs to do much more work in that area
patch -Np1 -i ${srcdir}/keyboard_rule.diff
# debug flags
# export CFLAGS="-march=x86-64 -O1 -g -pipe"
# export CXXFLAGS="-march=x86-64 -O1 -g -pipe"
# honour CFLAGS in X11 build - upstream fixed so far only the other libs
# From xorg-x11-6.9.0-r3.ebuild
pushd "${srcdir}/nx-libs-$pkgver/nx-X11"
HOSTCONF="config/cf/host.def"
echo "#define OptimizedCDebugFlags ${CFLAGS} GccAliasingArgs" >> ${HOSTCONF}
echo "#define OptimizedCplusplusDebugFlags ${CXXFLAGS} GccAliasingArgs" >> ${HOSTCONF}
# Respect LDFLAGS
echo "#define ExtraLoadFlags ${LDFLAGS}" >> ${HOSTCONF}
echo "#define SharedLibraryLoadFlags -shared ${LDFLAGS}" >> ${HOSTCONF}
popd
# fix a broken Makefiles
sed -i "s:-o root -g root ::" nxcompshad/Makefile.in
make \
PREFIX=/usr \
CONFIGURE="./configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --includedir=/usr/include"
# fake install
mkdir $srcdir/fakeinstall
make PREFIX=/usr DESTDIR="$srcdir/fakeinstall" install
}
package_libxcomp() {
pkgdesc="NX X compression library"
depends=('libjpeg-turbo' 'libpng' 'gcc-libs')
install -dm755 ${pkgdir}/usr/lib/nx
cp -a ${srcdir}/fakeinstall/usr/lib/nx/libXcomp.so* ${pkgdir}/usr/lib/nx
# symlinks
cd ${pkgdir}/usr/lib/
ln -sv /usr/lib/nx/libXcomp.so{,.3,.3.5.0} .
}
package_nxproxy() {
pkgdesc="NX proxy"
depends=('libxcomp')
install -dm755 ${pkgdir}/usr/{bin,share/man/man1,lib/nx/bin}
cp -a ${srcdir}/fakeinstall/usr/lib/nx/bin/nxproxy ${pkgdir}/usr/lib/nx/bin/nxproxy
cp -a ${srcdir}/fakeinstall/usr/share/man/man1/nxproxy.1 ${pkgdir}/usr/share/man/man1
# the wrapper
cp -a ${srcdir}/fakeinstall/usr/bin/nxproxy ${pkgdir}/usr/bin
}
package_nx-xcompext() {
pkgdesc="Xcompext/Xcompshad library for NX"
depends=('libxcomp' 'nx-x11')
install -dm755 ${pkgdir}/usr/lib/nx
cp -a ${srcdir}/fakeinstall/usr/lib/nx/libXcompext.so* ${pkgdir}/usr/lib/nx
#cp -a ${srcdir}/fakeinstall/usr/lib/nx/libXcompshad.so* ${pkgdir}/usr/lib/nx
# symlinks
cd ${pkgdir}/usr/lib/
ln -sv /usr/lib/nx/libXcompext.so{,.3,.3.5.0} .
#ln -sv /usr/lib/nx/libXcompshad.so{,.3,.3.5.0} .
}
package_nx-x11() {
pkgdesc="NX-X11 lib for the NX framework"
depends=('libxcomp')
install -dm755 ${pkgdir}/{usr/bin,usr/lib/nx/{X11,bin}}
cp -aR ${srcdir}/fakeinstall/usr/lib/nx/X11/* ${pkgdir}/usr/lib/nx/X11
# nxauth
cp -a ${srcdir}/fakeinstall/usr/lib/nx/bin/nxauth ${pkgdir}/usr/lib/nx/bin
# the wrapper
cp -a ${srcdir}/fakeinstall/usr/bin/nxauth ${pkgdir}/usr/bin
}
package_nxagent() {
pkgdesc="NX X server based on Xnest"
depends=('nx-xcompext' 'libxml2')
install -dm755 ${pkgdir}/usr/{bin,lib/nx/bin,share/nx}
cp -a ${srcdir}/fakeinstall/usr/lib/nx/bin/nxagent ${pkgdir}/usr/lib/nx/bin
# the wrapper
cp -a ${srcdir}/fakeinstall/usr/bin/nxagent ${pkgdir}/usr/bin
# additional files for documentation
cp -a ${srcdir}/fakeinstall/usr/share/nx/SecurityPolicy ${pkgdir}/usr/share/nx
cp -a ${srcdir}/fakeinstall/usr/lib/nx/libXcompshad.so* ${pkgdir}/usr/lib/nx
# symlinks
cd ${pkgdir}/usr/lib/
ln -sv /usr/lib/nx/libXcompshad.so{,.3,.3.5.0} . # files should move to nx-compext pkg
}
package_x2go-agent() {
pkgdesc="Wrapper arround nxagent to use with x2goserver"
depends=('nxagent')
provides=('x2goagent')
replaces=('x2goagent')
install -dm755 ${pkgdir}/usr/{bin,lib/x2go/bin,share/{pixmaps,x2go/versions}}
# this is a nxagent symlink
ln -sv /usr/lib/nx/bin/nxagent ${pkgdir}/usr/lib/x2go/bin/x2goagent
# the wrapper
cp -a ${srcdir}/fakeinstall/usr/bin/x2goagent ${pkgdir}/usr/bin
cp -a ${srcdir}/fakeinstall/usr/share/pixmaps/x2go.xpm ${pkgdir}/usr/share/pixmaps
cp -a ${srcdir}/fakeinstall/usr/share/x2go/rgb ${pkgdir}/usr/share/x2go
cp -a ${srcdir}/fakeinstall/usr/share/x2go/versions/VERSION.x2goagent ${pkgdir}/usr/share/x2go/versions
}
package_nx-headers() {
pkgdesc="NX headers"
install -dm755 ${pkgdir}/usr/include/nx
cp -aR ${srcdir}/fakeinstall/usr/include/nx/* ${pkgdir}/usr/include/nx
}
|