desktop/synergy/PKGBUILD
AlmAck 0af05b343a kde applications 16.12.0
renamed checksums to kdeapps.sums
added for all packages the pgp signature
for new/removed packages check: https://community.kde.org/Applications/16.12_Release_Notes#Tarballs_that_we_have_split
2016-12-20 21:48:24 +00:00

95 lines
3.6 KiB
Bash

# Arch contribution https://www.archlinux.org/packages/community/x86_64/synergy/
pkgname=synergy
pkgver=1.7.6
pkgrel=2
pkgdesc="Share your mouse and keyboard between several computers"
url="http://synergy-foss.org"
arch=('x86_64')
license=('GPL2')
depends=('gcc-libs' 'libxtst' 'libxinerama' 'crypto++' 'libxkbcommon' 'avahi' 'qt5-base')
makedepends=('libxt' 'cmake' 'qt5-base' 'unzip')
license=('GPL2')
source=("synergy-${pkgver}.tar.gz::https://github.com/symless/synergy/archive/v${pkgver}-stable.tar.gz"
"synergys_at.socket"
"synergys_at.service"
"fix-incompetence.patch"
"synergy.png"
"wrapper")
sha256sums=('a453b880606edbdaec82576bcb74189a7ae564feeee126b125063802a778411d'
'3754b87a9164b498ff2726668c2daced901692c2cc816a1594e5ea5b15b65dc5'
'af2d1d7622ea189d773577a92d13164ca6a33f052f39de3fe466314265e59e0f'
'9ff6798513f780d13d9c8bff2291d59e0317f1cadc0dc784466e5f4cbba29e16'
'0ce7f2e35da4f17daedc93c44266810ecdaa605a33432e2c596b17eb29aca061'
'cc0bfa75b0ee514eb6a349d5aebdc26e100ce6c88e6bf4270a237c223a2cd200')
prepare() {
cd "${srcdir}/synergy-${pkgver}-stable"
patch -p1 < ../fix-incompetence.patch
cd ext
unzip gmock-1.6.0.zip -d gmock-1.6.0
unzip gtest-1.6.0.zip -d gtest-1.6.0
}
build() {
cd "${srcdir}/synergy-${pkgver}-stable"
cmake -DCMAKE_INSTALL_PREFIX=/usr .
make
cd src/gui
qmake-qt5
make
}
check() {
cd "${srcdir}/synergy-${pkgver}-stable/bin"
./unittests
}
package() {
cd synergy-${pkgver}-stable
# install binary
install -Dm 755 bin/synergy "${pkgdir}/usr/lib/synergy/synergy"
install -Dm 755 bin/synergyc "${pkgdir}/usr/lib/synergy/synergyc"
install -Dm 755 bin/synergyd "${pkgdir}/usr/lib/synergy/synergyd"
install -Dm 755 bin/synergys "${pkgdir}/usr/lib/synergy/synergys"
install -Dm 755 bin/syntool "${pkgdir}/usr/lib/synergy/syntool"
install -Dm 755 bin/usynergy "${pkgdir}/usr/lib/synergy/usynergy"
# unfuck wrapper
install -Dm 755 "${srcdir}/wrapper" "${pkgdir}/usr/lib/synergy/wrapper"
install -d "${pkgdir}/usr/bin"
ln -sf /usr/lib/synergy/wrapper "${pkgdir}/usr/bin/synergy"
ln -sf /usr/lib/synergy/wrapper "${pkgdir}/usr/bin/synergyc"
ln -sf /usr/lib/synergy/wrapper "${pkgdir}/usr/bin/synergyd"
ln -sf /usr/lib/synergy/wrapper "${pkgdir}/usr/bin/synergys"
ln -sf /usr/lib/synergy/wrapper "${pkgdir}/usr/bin/syntool"
ln -sf /usr/lib/synergy/wrapper "${pkgdir}/usr/bin/usynergy"
# plugin
install -Dm 755 bin/plugins/libns.so "${pkgdir}/usr/lib/${pkgname}/libns.so"
# install config
install -Dm 644 "doc/${pkgname}.conf.example" "${pkgdir}/etc/${pkgname}.conf.example"
install -Dm 644 "doc/${pkgname}.conf.example-advanced" "${pkgdir}/etc/${pkgname}.conf.example-advanced"
install -Dm 644 "doc/${pkgname}.conf.example-basic" "${pkgdir}/etc/${pkgname}.conf.example-basic"
# install manfiles
install -Dm 644 "doc/${pkgname}c.man" "${pkgdir}/usr/share/man/man1/${pkgname}c.1"
install -Dm 644 "doc/${pkgname}s.man" "${pkgdir}/usr/share/man/man1/${pkgname}s.1"
# install systemd service and socket
install -Dm 644 "${srcdir}/synergys_at.service" "${pkgdir}/usr/lib/systemd/system/synergys@.service"
install -Dm 644 "${srcdir}/synergys_at.socket" "${pkgdir}/usr/lib/systemd/system/synergys@.socket"
# install desktop/icon stuff
install -Dm644 "$srcdir/synergy.png" "$pkgdir/usr/share/pixmaps/synergy.png"
install -Dm644 "res/synergy.desktop" "${pkgdir}/usr/share/applications/synergy.desktop"
sed -i s!/usr/share/icons/synergy.ico!synergy! \
$pkgdir/usr/share/applications/synergy.desktop
}