diff options
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 56 | ||||
-rw-r--r-- | kochmorse.install | 11 |
3 files changed, 87 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7e67c5c3d0da --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = kochmorse-git + pkgdesc = A simple morse tutor using the Koch method - GIT version. + pkgver = 3.1.0 + pkgrel = 1 + url = https://github.com/hmatuschek/kochmorse + install = kochmorse.install + arch = i686 + arch = x86_64 + license = GPL + makedepends = cmake + makedepends = git + depends = qt5-svg + depends = portaudio + depends = libxkbcommon-x11 + depends = desktop-file-utils + provides = kochmorse + conflicts = kochmorse + +pkgname = kochmorse-git + 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 +} diff --git a/kochmorse.install b/kochmorse.install new file mode 100644 index 000000000000..2eaa60550d51 --- /dev/null +++ b/kochmorse.install @@ -0,0 +1,11 @@ +post_install() { + update-desktop-database -q +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} |