From ba5e290c46f6420c6e87aafcc89c276952b00991 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Tue, 16 Jun 2015 20:31:43 +0000 Subject: Provide a sample configuration for the libvnc.so extension of X.Org --- tigervnc/build/tigervnc.SlackBuild | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tigervnc') diff --git a/tigervnc/build/tigervnc.SlackBuild b/tigervnc/build/tigervnc.SlackBuild index 613a4975..d1a0420d 100755 --- a/tigervnc/build/tigervnc.SlackBuild +++ b/tigervnc/build/tigervnc.SlackBuild @@ -252,6 +252,7 @@ cd build echo -e "\n*** Building vnc client ***\n" cmake \ -G "Unix Makefiles" \ + -Wno-dev \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ @@ -327,6 +328,11 @@ cd build/unix/xserver/ DESTDIR=$PKG install cd - +# Provide a sample configuration for the libvnc.so extension of X.Org, +# documentation is available inside the file: +mkdir -p $PKG/etc/X11/xorg.conf.d +install -m644 $CWD/10-libvnc.conf $PKG/etc/X11/xorg.conf.d/10-libvnc.conf.new + # Install menu entry: mkdir -p $PKG/usr/share/{applications,icons/hicolor/{16x16,24x24,32x32,48x48}/apps} for PSIZE in 16 24 32 48; do @@ -354,6 +360,24 @@ EOT # Add this to the doinst.sh: ! [ -d $PKG/install ] && mkdir -p $PKG/install cat <> $PKG/install/doinst.sh +# Handle the incoming configuration files: +config() { + for infile in \$1; do + NEW="\$infile" + OLD="\`dirname \$NEW\`/\`basename \$NEW .new\`" + # If there's no config file by that name, mv it over: + if [ ! -r \$OLD ]; then + mv \$NEW \$OLD + elif [ "\`cat \$OLD | md5sum\`" = "\`cat \$NEW | md5sum\`" ]; then + # toss the redundant copy + rm \$NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... + done +} + +config etc/X11/xorg.conf.d/10-libvnc.conf.new + # Update the desktop database: if [ -x usr/bin/update-desktop-database ]; then chroot . /usr/bin/update-desktop-database usr/share/applications 1>/dev/null 2>&1 -- cgit v1.2.3-79-gdb01