3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/admin/tightvnc/builder.sh
Lluís Batlle i Rossell 9f34ef8cf5 Making tightvnc use given fonts, instead of depending of an X Font Server started
at the usual unix socket.

svn path=/nixpkgs/trunk/; revision=15624
2009-05-16 23:04:06 +00:00

40 lines
856 B
Bash

source $stdenv/setup
patchPhase() {
fontPath=
for i in $fontDirectories; do
for j in $(find $i -name fonts.dir); do
addToSearchPathWithCustomDelimiter "," fontPath $(dirname $j)
done
done
}
buildPhase() {
xmkmf
make World
sed -e 's@/usr/bin/perl@'$perl'/bin/perl@' \
-e 's@unix/:7100@'$fontPath'@' \
-i vncserver
cd Xvnc
sed -e 's@.* CppCmd .*@#define CppCmd '$gcc'/bin/cpp@' -i config/cf/linux.cf
sed -e 's@.* CppCmd .*@#define CppCmd '$gcc'/bin/cpp@' -i config/cf/Imake.tmpl
sed -i \
-e 's@"uname","xauth","Xvnc","vncpasswd"@"uname","Xvnc","vncpasswd"@g' \
-e "s@\<xauth\>@$xauth/bin/xauth@g" \
../vncserver
./configure
make
cd ..
}
installPhase() {
ensureDir $out/bin
ensureDir $out/man/man1
./vncinstall $out/bin $out/man
}
genericBuild