summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fe21a4e2e7bd1628e2d3c4c0b9a85a778ea6c8a1 (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
36
37
38
39
40
41
42
# Contributor: Army
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: aksr <aksr at t-com dot me>

pkgname=sandy-git
pkgver=0.6.r166.50204e1
pkgrel=1
pkgdesc="An ncurses text editor with an easy-to-read, hackable C source."
arch=('i686' 'x86_64')
url="https://github.com/japanoise/sandy.git"
license=('custom:MIT/X')
depends=('ncurses')
makedepends=('git')
provides=('sandy')
conflicts=('sandy')
source=("git+$url")
md5sums=('SKIP')
sha1sums=('SKIP')

pkgver() {
  cd ${pkgname%-git}
  printf "%s.r%s.%s" "$(awk '/VERSION =/ {print $3}' config.mk)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd ${pkgname%-git}

  if [ -e "$srcdir"/config.h ];
  then
    msg "use custom config.h"
    cp "$srcdir"/config.h .
  else msg "use default config.h"
  fi
  make PREFIX=/usr
}

package() {
  cd ${pkgname%-git}
  make PREFIX=/usr DESTDIR="$pkgdir" install
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}