desktop/synergy/PKGBUILD

97 lines
3.6 KiB
Bash
Raw Normal View History

2015-07-02 05:21:23 +08:00
# Arch contribution https://www.archlinux.org/packages/community/x86_64/synergy/
pkgname=synergy
2016-03-21 07:10:40 +08:00
pkgver=1.7.6
2015-07-02 05:21:23 +08:00
pkgrel=1
2013-11-22 09:12:18 +08:00
pkgdesc="Share your mouse and keyboard between several computers"
url="http://synergy-foss.org"
2013-11-22 09:12:18 +08:00
arch=('x86_64')
license=('GPL2')
2015-07-02 05:21:23 +08:00
depends=('gcc-libs' 'libxtst' 'libxinerama' 'crypto++' 'libxkbcommon' 'avahi' 'qt5-base')
2015-12-29 23:38:22 +08:00
makedepends=('libxt' 'cmake' 'qt5-base' 'unzip')
2014-12-17 08:12:53 +08:00
license=('GPL2')
2016-03-21 07:10:40 +08:00
source=("synergy-${pkgver}.tar.gz::https://github.com/symless/synergy/archive/v${pkgver}-stable.tar.gz"
2015-12-29 23:38:22 +08:00
"synergys_at.socket"
"synergys_at.service"
2015-07-02 05:21:23 +08:00
"fix-incompetence.patch"
2015-12-29 23:38:22 +08:00
"synergy.png"
"wrapper")
2016-03-21 07:10:40 +08:00
sha256sums=('a453b880606edbdaec82576bcb74189a7ae564feeee126b125063802a778411d'
2015-12-29 23:38:22 +08:00
'3754b87a9164b498ff2726668c2daced901692c2cc816a1594e5ea5b15b65dc5'
'af2d1d7622ea189d773577a92d13164ca6a33f052f39de3fe466314265e59e0f'
'9ff6798513f780d13d9c8bff2291d59e0317f1cadc0dc784466e5f4cbba29e16'
'0ce7f2e35da4f17daedc93c44266810ecdaa605a33432e2c596b17eb29aca061'
'cc0bfa75b0ee514eb6a349d5aebdc26e100ce6c88e6bf4270a237c223a2cd200')
2015-07-02 05:21:23 +08:00
prepare() {
cd "${srcdir}/synergy-${pkgver}-stable"
patch -p1 < ../fix-incompetence.patch
2014-12-17 08:12:53 +08:00
2015-07-02 05:21:23 +08:00
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"
2014-12-17 08:12:53 +08:00
2015-07-02 05:21:23 +08:00
cmake -DCMAKE_INSTALL_PREFIX=/usr .
make
2014-12-17 08:12:53 +08:00
2013-11-22 09:12:18 +08:00
cd src/gui
2014-12-17 08:12:53 +08:00
qmake-qt5
make
}
2015-07-02 05:21:23 +08:00
check() {
cd "${srcdir}/synergy-${pkgver}-stable/bin"
./unittests
}
package() {
2015-12-29 23:38:22 +08:00
cd synergy-${pkgver}-stable
2014-12-17 08:12:53 +08:00
# install binary
2015-12-29 23:38:22 +08:00
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"
2014-12-17 08:12:53 +08:00
2013-11-22 09:12:18 +08:00
# install config
2015-12-29 23:38:22 +08:00
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"
2014-12-17 08:12:53 +08:00
# install manfiles
2015-12-29 23:38:22 +08:00
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"
2014-12-17 08:12:53 +08:00
# install systemd service and socket
2015-12-29 23:38:22 +08:00
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"
2014-12-17 08:12:53 +08:00
# install desktop/icon stuff
2015-07-02 05:21:23 +08:00
install -Dm644 "$srcdir/synergy.png" "$pkgdir/usr/share/pixmaps/synergy.png"
2015-12-29 23:38:22 +08:00
install -Dm644 "res/synergy.desktop" "${pkgdir}/usr/share/applications/synergy.desktop"
2015-07-02 05:21:23 +08:00
sed -i s!/usr/share/icons/synergy.ico!synergy! \
$pkgdir/usr/share/applications/synergy.desktop
2016-03-21 07:10:40 +08:00
}