Skip to content

Instantly share code, notes, and snippets.

@dlintw
Created February 27, 2017 04:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlintw/304426e3e134ef99772cc7b7639216e0 to your computer and use it in GitHub Desktop.
Save dlintw/304426e3e134ef99772cc7b7639216e0 to your computer and use it in GitHub Desktop.
strange abuild failed at line 8
# Contributor: Daniel YC Lin <dlin.tw@gmail.com>
# Maintainer: Daniel YC Lin <dlin.tw@gmail.com>
pkgname=synergy
pkgver=1.8.7
pkgrel=1
pkgdesc='Share a single mouse and keyboard between multiple computers'
url='https://symless.com/synergy/'
arch=('x86' 'x86_64')
license=('GPL2')
depends=('gcc-libs' 'libxtst' 'libxinerama' 'libxkbcommon-x11' 'avahi' 'curl' 'openssl')
makedepends=('libxt' 'cmake' 'qt5-base' 'gmock' 'gtest')
#install=""
subpackages="$pkgname-doc"
source=(synergy-${pkgver}.tar.gz::https://github.com/symless/synergy/archive/v${pkgver}-stable.tar.gz)
builddir="$srcdir/"
# cd synergy-${pkgver}-stable
build() {
cd "$builddir"
msg2 "Building core..."
(cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
# unittests don't pass with optimization (segfault on nullptr)
sed 's|\-O2|\-O0|g' -i src/test/unittests/CMakeFiles/unittests.dir/{flags.make,link.txt}
make
)
msg2 "Building GUI..."
(cd src/gui
qmake
make
)
}
package() {
cd "$builddir"
cd synergy-${pkgver}-stable
# install binary
install -Dm 755 bin/{synergy,synergyc,synergyd,synergys,syntool,usynergy} -t "${pkgdir}/usr/bin"
# install config
install -Dm 644 doc/${pkgname}.conf* -t "${pkgdir}/etc"
# 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.{service,socket} -t "${pkgdir}/usr/lib/systemd/user"
# install desktop/icon stuff
install -Dm 644 "res/synergy.ico" -t "${pkgdir}/usr/share/icons"
install -Dm 644 "res/synergy.desktop" -t "${pkgdir}/usr/share/applications"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment