1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 23:20:55 +00:00
nixpkgs/pkgs/tools/admin/tightvnc/builder.sh
Eelco Dolstra c556a6ea46 * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless
function, so obsolete it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2012-01-18 20:16:00 +00:00

46 lines
1 KiB
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() {
mkdir -p $out/bin
mkdir -p $out/share/man/man1
./vncinstall $out/bin $out/share/man
# fix HTTP client:
t=$out/share/tightvnc
mkdir -p $t
sed -i "s@/usr/local/vnc/classes@$out/vnc/classes@g" $out/bin/vncserver
cp -r classes $t
}
genericBuild