diff --git a/community/synergy/PKGBUILD b/community/synergy/PKGBUILD new file mode 100644 index 000000000..1bd769c8c --- /dev/null +++ b/community/synergy/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +# Contributor: Jelle van der Waa <jelle vdwaa nl> +# Contributor: Stéphane Gaudreault <stephane@archlinux.org> +# Contributor: Dale Blount <dale@archlinux.org> +# Contributor: Michael Düll <mail@akurei.me> + +# ALARM: Kevin Mihelich <kevin@archlinuxarm.org> +# - patch to use the system crypto++ library + +pkgname=synergy +pkgver=1.4.12 +pkgrel=1.2 +pkgdesc="Share a single mouse and keyboard between multiple computers" +url="http://synergy-foss.org" +arch=('i686' 'x86_64') +depends=('gcc-libs' 'libxtst' 'libxinerama' 'crypto++') +makedepends=('libxt' 'cmake' 'qt4' 'unzip') +optdepends=('qt4: gui support') +license=('GPL2') +source=("http://synergy.googlecode.com/files/$pkgname-$pkgver-Source.tar.gz" + "system-cryptopp.patch" + "synergys.socket" + "synergys.service" + "synergy.png" + "synergy.desktop") + +build() { + cd "${srcdir}/${pkgname}-${pkgver}-Source" + + patch -p1 -i ../system-cryptopp.patch + + # Unzip the crypto library + unzip -d tools/cryptopp562 tools/cryptopp562.zip + + cmake -D CMAKE_INSTALL_PREFIX=/usr . + make VERBOSE=1 + + cd src/gui + qmake-qt4 + make VERBOSE=1 +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}-Source/bin" + + # install binary + install -Dm755 synergy "$pkgdir/usr/bin/synergy" + install -Dm755 synergyc "$pkgdir/usr/bin/synergyc" + install -Dm755 synergys "$pkgdir/usr/bin/synergys" + + # install config + install -Dm644 "$srcdir/$pkgname-$pkgver-Source/doc/${pkgname}.conf.example" "${pkgdir}/etc/${pkgname}.conf.example" + + # install systemd service and socket + install -d "$pkgdir/usr/lib/systemd/system" + install -Dm644 "$srcdir/synergys.service" "$pkgdir/usr/lib/systemd/system/" + install -Dm644 "$srcdir/synergys.socket" "$pkgdir/usr/lib/systemd/system/" + + # install desktop/icon stuff + install -Dm644 "$srcdir/synergy.png" "$pkgdir/usr/share/pixmaps/synergy.png" + install -Dm644 "$srcdir/synergy.desktop" "$pkgdir/usr/share/applications/synergy.desktop" +} + +sha512sums=('5305e03d871e5408640ece55364067418f9b8b160dda31f994ebafe807b31291bdaa688a901f2e81710acb0857952c37f0c1823a50c927573feaec0c8659be9d' + '1a95d4b704ab4d54a7a9ec64eef3551752432c73540d94b69e2799fe615c5a4c61dc026bf40706030da0e649afa6b8ff3b8c26da245bb7e44846907f308566f1' + 'f7d918faf4a25654786f270fc48b6e4089ecd1b2f504bb90de543b47a862733f7be067e06fd613d621bba48d20dc63214966e2cfbd2cb3fcbfe623d6d41f10ad' + 'a10dfe5b24ac6f4a2ef3a3a9f8a6a3c432b91d5e59d1fae2258d37c5be00ac8f172656fa0d213012c7dc94ab8c04c3945ae33acfcd5db5fad8b37ccc9f5e980f' + 'cb3db9593c943bce11ce5ae962e120feb70e6afa9206887a6971c77491711afcebc78653e7413e87e33d031c43a507f4a9a6e8747d10b60c6642106ae1690f18' + 'c1c76ecfbed5c22f1a2a7562dce20971a784ff6b0edbf5c9b5f7c796f9ead882b82f970bb24f35533b928c341f87f66b0b10d9d96e122d14d74102cac8997445') diff --git a/community/synergy/synergy.desktop b/community/synergy/synergy.desktop new file mode 100644 index 000000000..e7bf87b9e --- /dev/null +++ b/community/synergy/synergy.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Synergy +Comment=The Synergy GUI is based on QSynergy by Volker Lanz. +Exec=synergy +Icon=synergy +Terminal=false +Type=Application +Categories=Utility;DesktopUtility;Qt diff --git a/community/synergy/synergy.png b/community/synergy/synergy.png new file mode 100644 index 000000000..5534f0fdf Binary files /dev/null and b/community/synergy/synergy.png differ diff --git a/community/synergy/synergys.service b/community/synergy/synergys.service new file mode 100644 index 000000000..56c1ac061 --- /dev/null +++ b/community/synergy/synergys.service @@ -0,0 +1,10 @@ +[Unit] +Description=Synergy Server Daemon +After=network.target + +[Service] +Type=forking +ExecStart=/usr/bin/synergys --config /etc/synergy.conf + +[Install] +WantedBy=multi-user.target diff --git a/community/synergy/synergys.socket b/community/synergy/synergys.socket new file mode 100644 index 000000000..dda1537ca --- /dev/null +++ b/community/synergy/synergys.socket @@ -0,0 +1,9 @@ +[Unit] +Conflicts=synergys.service + +[Socket] +ListenStream=24800 +Accept=false + +[Install] +WantedBy=sockets.target diff --git a/community/synergy/system-cryptopp.patch b/community/synergy/system-cryptopp.patch new file mode 100644 index 000000000..bad4b01bd --- /dev/null +++ b/community/synergy/system-cryptopp.patch @@ -0,0 +1,152 @@ +Description: Use system libcrypto++ if available + Rather than always use the included libcrypto++ zipped source, check + for and use the system's libcrypto++. +Author: Jeff Licquia <licquia@debian.org> +Forwarded: no +Last-Update: 2013-06-01 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: synergy-1.4.12/CMakeLists.txt +=================================================================== +--- synergy-1.4.12.orig/CMakeLists.txt 2013-06-02 02:22:35.000000000 +0000 ++++ synergy-1.4.12/CMakeLists.txt 2013-06-02 02:22:35.000000000 +0000 +@@ -75,6 +75,7 @@ + include(CheckIncludeFileCXX) + include(CheckSymbolExists) + include(CheckCSourceCompiles) ++ include(FindPkgConfig) + + check_include_file_cxx(istream HAVE_ISTREAM) + check_include_file_cxx(ostream HAVE_OSTREAM) +@@ -204,6 +205,8 @@ + check_library_exists("Xi" XISelectEvents "" HAVE_Xi) + check_library_exists("Xrandr" XRRQueryExtension "" HAVE_Xrandr) + ++ pkg_search_module(CRYPTOPP libcrypto++) ++ + if (HAVE_ICE) + + # Assume we have SM if we have ICE. +@@ -241,6 +244,10 @@ + list(APPEND libs Xrandr) + endif() + ++ if (HAVE_CRYPTOPP) ++ list(APPEND libs CRYPTOPP_LIBRARIES) ++ endif() ++ + endif() + + IF(HAVE_Xi) +Index: synergy-1.4.12/tools/CMakeLists.txt +=================================================================== +--- synergy-1.4.12.orig/tools/CMakeLists.txt 2013-06-02 02:22:35.000000000 +0000 ++++ synergy-1.4.12/tools/CMakeLists.txt 2013-06-02 02:25:44.000000000 +0000 +@@ -13,7 +13,7 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see <http://www.gnu.org/licenses/>. + +-set(cpp_dir cryptopp562) ++set(cpp_dir cryptopp) + + file(GLOB cpp_src ${cpp_dir}/*.cpp) + +@@ -22,14 +22,16 @@ + list(APPEND cpp_src ${cpp_hdr}) + endif() + +-file(GLOB cpp_ignore +- ${cpp_dir}/simple.cpp +- ${cpp_dir}/strciphr.cpp +- ${cpp_dir}/polynomi.cpp +- ${cpp_dir}/eprecomp.cpp +- ${cpp_dir}/eccrypto.cpp +- ${cpp_dir}/algebra.cpp) +-list(REMOVE_ITEM cpp_src ${cpp_ignore}) ++if (NOT CRYPTOPP_FOUND) ++ file(GLOB cpp_ignore ++ ${cpp_dir}/simple.cpp ++ ${cpp_dir}/strciphr.cpp ++ ${cpp_dir}/polynomi.cpp ++ ${cpp_dir}/eprecomp.cpp ++ ${cpp_dir}/eccrypto.cpp ++ ${cpp_dir}/algebra.cpp) ++ list(REMOVE_ITEM cpp_src ${cpp_ignore}) ++endif() + + # if 64-bit windows, compile asm file. + if (CMAKE_CL_64) +@@ -49,16 +51,20 @@ + endif() + + if (UNIX) +- add_definitions(-DCRYPTOPP_DISABLE_ASM) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -pipe") ++ if (NOT CRYPTOPP_FOUND) ++ add_definitions(-DCRYPTOPP_DISABLE_ASM) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -pipe") + +- if (APPLE) +- if (DARWIN_VERSION GREATER 10) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-tautological-compare") ++ if (APPLE) ++ if (DARWIN_VERSION GREATER 10) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-tautological-compare") ++ endif() ++ else() ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") + endif() +- else() +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") + endif() + endif() + +-add_library(cryptopp STATIC ${cpp_src}) ++if (NOT CRYPTOPP_FOUND) ++ add_library(cryptopp STATIC ${cpp_src}) ++endif() +Index: synergy-1.4.12/src/lib/synergy/CCryptoMode.h +=================================================================== +--- synergy-1.4.12.orig/src/lib/synergy/CCryptoMode.h 2013-06-02 02:22:35.000000000 +0000 ++++ synergy-1.4.12/src/lib/synergy/CCryptoMode.h 2013-06-02 02:22:35.000000000 +0000 +@@ -17,9 +17,9 @@ + + #pragma once + +-#include <cryptopp562/gcm.h> +-#include <cryptopp562/modes.h> +-#include <cryptopp562/aes.h> ++#include <cryptopp/gcm.h> ++#include <cryptopp/modes.h> ++#include <cryptopp/aes.h> + #include "ECryptoMode.h" + #include "CString.h" + +Index: synergy-1.4.12/src/lib/synergy/CCryptoStream.h +=================================================================== +--- synergy-1.4.12.orig/src/lib/synergy/CCryptoStream.h 2013-06-02 02:22:35.000000000 +0000 ++++ synergy-1.4.12/src/lib/synergy/CCryptoStream.h 2013-06-02 02:22:35.000000000 +0000 +@@ -20,8 +20,8 @@ + #include "BasicTypes.h" + #include "CStreamFilter.h" + #include "CCryptoMode.h" +-#include <cryptopp562/osrng.h> +-#include <cryptopp562/sha.h> ++#include <cryptopp/osrng.h> ++#include <cryptopp/sha.h> + + class CCryptoOptions; + +Index: synergy-1.4.12/tools/build/toolchain.py +=================================================================== +--- synergy-1.4.12.orig/tools/build/toolchain.py 2013-06-01 22:55:47.000000000 +0000 ++++ synergy-1.4.12/tools/build/toolchain.py 2013-06-02 02:25:00.000000000 +0000 +@@ -73,7 +73,7 @@ + macSdk = None + + # cryptoPP dir with version number +- cryptoPPDir = 'cryptopp562' ++ cryptoPPDir = 'cryptopp' + + win32_generators = { + 1 : Generator('Visual Studio 10'),