summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 236020732b5a87a09e0ced594b680bcd6f43b813 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Maintainer: Alex J. Malozemoff <amaloz@galois.com>
pkgname=matterhorn-git
_pkgname=matterhorn

pkgver=50200.0.0
pkgver() {
  cd "$_pkgname"
  git describe --long --tags | cut -d- -f1
}

pkgrel=1
pkgdesc='A terminal-based chat client for MatterMost'
arch=('x86_64')
url="https://github.com/matterhorn-chat/matterhorn"
license=('BSD')
makedepends=('git' 'cabal-install' 'ghc8.0')
source=("$_pkgname::git+https://github.com/matterhorn-chat/matterhorn.git")
sha1sums=('SKIP')
provides=('matterhorn')
conflicts=('matterhorn' 'matterhorn-bin')

build() {
  cd "$srcdir/$_pkgname"
  git submodule update --init
  cabal new-update
  cabal new-build -w /usr/bin/ghc-8.0
}

package() {
  cd "$srcdir/$_pkgname"
  mkdir -p $pkgdir/usr/bin
  mkdir -p $pkgdir/usr/share/licenses/$_pkgname
  cp $(find . -name $_pkgname -type f) $pkgdir/usr/bin
  cp LICENSE $pkgdir/usr/share/licenses/$_pkgname
}