From 4f2fe5ce923a4caa360544244605201f562bff58 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 25 May 2018 19:29:07 +0200 Subject: [PATCH] New package: barrier-2.1.1 Closes #14707. Signed-off-by: Enno Boland --- srcpkgs/barrier-gui | 1 + srcpkgs/barrier/files/barrierc/run | 5 ++++ srcpkgs/barrier/files/barriers/run | 4 +++ srcpkgs/barrier/patches/avahi.patch | 22 +++++++++++++++ srcpkgs/barrier/template | 43 +++++++++++++++++++++++++++++ 5 files changed, 75 insertions(+) create mode 120000 srcpkgs/barrier-gui create mode 100755 srcpkgs/barrier/files/barrierc/run create mode 100755 srcpkgs/barrier/files/barriers/run create mode 100644 srcpkgs/barrier/patches/avahi.patch create mode 100644 srcpkgs/barrier/template diff --git a/srcpkgs/barrier-gui b/srcpkgs/barrier-gui new file mode 120000 index 0000000000..cea14745a4 --- /dev/null +++ b/srcpkgs/barrier-gui @@ -0,0 +1 @@ +barrier \ No newline at end of file diff --git a/srcpkgs/barrier/files/barrierc/run b/srcpkgs/barrier/files/barrierc/run new file mode 100755 index 0000000000..f57a57edaf --- /dev/null +++ b/srcpkgs/barrier/files/barrierc/run @@ -0,0 +1,5 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +[ -z $SERVER_ADDR ] && exit 0 +[ -z $SKIP_X11_TEST ] && ! ps -C Xorg >/dev/null 2>&1 && exit 0 +exec barrierc --no-daemon ${OPTS:=--restart} $SERVER_ADDR diff --git a/srcpkgs/barrier/files/barriers/run b/srcpkgs/barrier/files/barriers/run new file mode 100755 index 0000000000..c59b48edf9 --- /dev/null +++ b/srcpkgs/barrier/files/barriers/run @@ -0,0 +1,4 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +[ -z $SKIP_X11_TEST ] && ! ps -C Xorg >/dev/null 2>&1 && exit 0 +exec barriers --no-daemon ${OPTS:=--restart} diff --git a/srcpkgs/barrier/patches/avahi.patch b/srcpkgs/barrier/patches/avahi.patch new file mode 100644 index 0000000000..fe5704552f --- /dev/null +++ b/srcpkgs/barrier/patches/avahi.patch @@ -0,0 +1,22 @@ +--- masterdir/builddir/barrier-2.1.1/CMakeLists.txt 2018-05-16 04:48:18.000000000 +0200 ++++ CMakeLists.txt 2018-05-25 18:57:40.584542261 +0200 +@@ -63,6 +63,7 @@ + include (CheckIncludeFileCXX) + include (CheckSymbolExists) + include (CheckCSourceCompiles) ++ include (FindPkgConfig) + + check_include_file_cxx (istream HAVE_ISTREAM) + check_include_file_cxx (ostream HAVE_OSTREAM) +@@ -162,6 +163,11 @@ + include_directories("/usr/local/include" "/usr/local/include/avahi-compat-libdns_sd") + link_directories("/usr/local/lib") + endif() ++ if (${PKG_CONFIG_FOUND}) ++ pkg_check_modules (LIBDNS_SD REQUIRED avahi-compat-libdns_sd) ++ include_directories (BEFORE SYSTEM ${LIBDNS_SD_INCLUDE_DIRS}) ++ set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${LIBDNS_SD_INCLUDE_DIRS}") ++ endif () + + set (XKBlib "X11/Xlib.h;X11/XKBlib.h") + set (CMAKE_EXTRA_INCLUDE_FILES "${XKBlib};X11/extensions/Xrandr.h") diff --git a/srcpkgs/barrier/template b/srcpkgs/barrier/template new file mode 100644 index 0000000000..d165a70516 --- /dev/null +++ b/srcpkgs/barrier/template @@ -0,0 +1,43 @@ +# Template file for 'barrier' +pkgname=barrier +version=2.1.1 +revision=1 +build_style=cmake +configure_args="-DBARRIER_REVISION=00000000 -DBARRIER_VERSION_STAGE=RELEASE" +hostmakedepends="pkg-config qt5-qmake qt5-host-tools" +makedepends="avahi-compat-libs-devel libcurl-devel qt5-devel + libSM-devel libXext-devel libXrandr-devel libXtst-devel libXinerama-devel" +short_desc="Open-source KVM software based on Synergy" +maintainer="John " +license="GPL-2.0-only" +homepage="https://github.com/debauchee/barrier" +distfiles="https://github.com/debauchee/barrier/archive/v${version}.tar.gz" +checksum=775d504db6091c4dc479657fc4fc566ceb9893426664ae60c9a2bb198b562774 + +pre_build() { + sed -i -e 's/__DATE__/"May 25 2018"/g' src/gui/src/AboutDialog.cpp +} + +do_install() { + vbin build/bin/barrier + vbin build/bin/barrierc + vbin build/bin/barriers + + vmkdir usr/share/examples/${pkgname} + install -m644 doc/barrier.conf.example* \ + ${DESTDIR}/usr/share/examples/${pkgname} + + vinstall res/barrier.desktop 644 usr/share/applications + vinstall res/barrier.png 644 usr/share/pixmaps + + vsv barrierc + vsv barriers + +} +barrier-gui_package() { + pkg_install() { + vmove usr/share/pixmaps + vmove usr/share/applications + vmove usr/bin/barrier + } +}