tightvnc: use imake setup hook
This commit is contained in:
parent
5d9b3a8e8b
commit
38f1b48232
@ -10,15 +10,14 @@ stdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# for the builder script
|
# for the builder script
|
||||||
inherit xauth fontDirectories perl;
|
inherit fontDirectories;
|
||||||
gcc = stdenv.cc.cc;
|
|
||||||
|
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
buildInputs = [ xlibsWrapper zlib libjpeg imake gccmakedep libXmu libXaw
|
buildInputs = [ xlibsWrapper zlib libjpeg imake gccmakedep libXmu libXaw
|
||||||
libXpm libXp xauth openssh ];
|
libXpm libXp xauth openssh ];
|
||||||
|
|
||||||
patchPhase = ''
|
postPatch = ''
|
||||||
fontPath=
|
fontPath=
|
||||||
for i in $fontDirectories; do
|
for i in $fontDirectories; do
|
||||||
for j in $(find $i -name fonts.dir); do
|
for j in $(find $i -name fonts.dir); do
|
||||||
@ -27,37 +26,38 @@ stdenv.mkDerivation {
|
|||||||
done
|
done
|
||||||
|
|
||||||
sed -i "s@/usr/bin/ssh@${openssh}/bin/ssh@g" vncviewer/vncviewer.h
|
sed -i "s@/usr/bin/ssh@${openssh}/bin/ssh@g" vncviewer/vncviewer.h
|
||||||
'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
xmkmf
|
|
||||||
make World
|
|
||||||
sed -e 's@/usr/bin/perl@${perl}/bin/perl@' \
|
sed -e 's@/usr/bin/perl@${perl}/bin/perl@' \
|
||||||
-e 's@unix/:7100@'$fontPath'@' \
|
-e 's@unix/:7100@'$fontPath'@' \
|
||||||
-i vncserver
|
-i vncserver
|
||||||
|
|
||||||
cd Xvnc
|
sed -e 's@.* CppCmd .*@#define CppCmd cpp@' -i Xvnc/config/cf/linux.cf
|
||||||
sed -e 's@.* CppCmd .*@#define CppCmd '$gcc'/bin/cpp@' -i config/cf/linux.cf
|
sed -e 's@.* CppCmd .*@#define CppCmd cpp@' -i Xvnc/config/cf/Imake.tmpl
|
||||||
sed -e 's@.* CppCmd .*@#define CppCmd '$gcc'/bin/cpp@' -i config/cf/Imake.tmpl
|
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's@"uname","xauth","Xvnc","vncpasswd"@"uname","Xvnc","vncpasswd"@g' \
|
-e 's@"uname","xauth","Xvnc","vncpasswd"@"uname","Xvnc","vncpasswd"@g' \
|
||||||
-e "s@\<xauth\>@${xauth}/bin/xauth@g" \
|
-e "s@\<xauth\>@${xauth}/bin/xauth@g" \
|
||||||
../vncserver
|
vncserver
|
||||||
./configure
|
'';
|
||||||
make
|
|
||||||
cd ..
|
preInstall = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
mkdir -p $out/share/man/man1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
runHook preInstall
|
||||||
mkdir -p $out/share/man/man1
|
|
||||||
./vncinstall $out/bin $out/share/man
|
./vncinstall $out/bin $out/share/man
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
# fix HTTP client:
|
# fix HTTP client:
|
||||||
t=$out/share/tightvnc
|
mkdir -p $out/share/tightvnc
|
||||||
mkdir -p $t
|
cp -r classes $out/share/tightvnc
|
||||||
sed -i "s@/usr/local/vnc/classes@$out/vnc/classes@g" $out/bin/vncserver
|
substituteInPlace $out/bin/vncserver \
|
||||||
cp -r classes $t
|
--replace /usr/local/vnc/classes $out/share/tightvnc/classes
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
Loading…
Reference in New Issue
Block a user