diff options
author | not_anonymous | 2015-07-05 18:09:18 -0600 |
---|---|---|
committer | not_anonymous | 2015-07-05 18:09:18 -0600 |
commit | 8cffe1bff3e9194cce7749f2803870fe9b0c4bf9 (patch) | |
tree | 7234508b3fd570b7cd4df3b62ff63566dee92be0 /PKGBUILD | |
download | aur-8cffe1bff3e9194cce7749f2803870fe9b0c4bf9.tar.gz |
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6f60c16e068f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: not_anonymous <nmlibertarian@gmail.com> + +pkgname=kochmorse-git +_pkgname=kochmorse +pkgver=3.1.0 +pkgrel=1 +pkgdesc="A simple morse tutor using the Koch method - GIT version." +arch=('i686' 'x86_64') +url="https://github.com/hmatuschek/kochmorse" +license=('GPL') +depends=('qt5-svg' 'portaudio' 'libxkbcommon-x11' 'desktop-file-utils') +makedepends=('cmake' 'git') +provides=('kochmorse') +conflicts=('kochmorse') +install=$_pkgname.install + +_gitroot=https://github.com/hmatuschek/kochmorse.git +_gitname=master + +pkgver() { + cd "$srcdir/${_gitname}-build" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "$srcdir" + msg "Connecting to GIT server...." + + if [[ -d "$_gitname" ]]; then + cd "$_gitname" && git pull origin + msg "The local files are updated." + else + git clone "$_gitroot" "$_gitname" + fi + + msg "GIT checkout done or server timeout" + msg "Starting build..." + + rm -rf "$srcdir/$_gitname-build" + git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" +} + +build() { + cd "$srcdir/${_gitname}-build" + msg "Starting build..." + + cmake -DCMAKE_INSTALL_PREFIX=/usr + make +} + +package() { + cd "$srcdir/$_gitname-build" + msg "Starting packaging..." + + make DESTDIR="$pkgdir/" install +} |