Skip to content

Instantly share code, notes, and snippets.

@Ashark
Last active January 1, 2018 20:58
Show Gist options
  • Save Ashark/11f5fcaf2254627bd58c64d6cd5db92d to your computer and use it in GitHub Desktop.
Save Ashark/11f5fcaf2254627bd58c64d6cd5db92d to your computer and use it in GitHub Desktop.
Xneurchecker-git package build script for ArchLinux (needs review before publish in AUR)
# Maintainer: Andrew Shark <ashark@linuxcomp.ru>
pkgname=xneurchecker-git
pkgver=r141.da341f5
pkgrel=1
pkgdesc="xneurchecker for xneur (Auto Keyboard Layout Switcher)"
arch=('x86_64')
url="https://xneur.ru/"
license=('GPL')
depends=('xneur') # xneurchecker wants to use its headers at build time. And maybe it is needed at runtime.
makedepends=('git' 'gcc' 'make' 'cmake')
optdepends=()
provides=('xneurchecker')
conflicts=('xneurchecker')
source=( # 'git+https://github.com/AndrewCrewKuznetsov/xneur-devel' # Choose only one of these sources
# 'git+https://github.com/Ashark/xneur-devel' # I use it when developing
)
sha1sums=( # 'SKIP'
)
pkgver() {
cd xneur-devel
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
mkdir -p ${srcdir}/xneur-devel/xneurchecker/build
# cd ${srcdir}/xneur-devel/xneur # I use it when developing
# git checkout transition-to-cmake # I use it when developing
}
build() {
cd ${srcdir}/xneur-devel/xneurchecker/build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
}
package() {
cd ${srcdir}/xneur-devel/xneurchecker/build
make DESTDIR=${pkgdir} install
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment