summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 66b1654676d798448bf2f25d67cbcc1b25fe75be (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
43
44
45
46
47
48
49
# Maintainer: aksr <aksr at t-com dot me>
pkgname=rc-git
pkgver=1.7.4.r579.9c62112
pkgrel=1
epoch=
pkgdesc="Independent re-implementation for Unix of the Plan 9 shell (from circa 1992)."
arch=('i686' 'x86_64')
url="https://github.com/rakitzis/rc"
license=('zlib')
groups=()
depends=()
makedepends=('git')
optdepends=('readline')
checkdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
changelog=
install=${pkgname}.install
source=("$pkgname::git+https://github.com/rakitzis/rc.git")
noextract=()
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$pkgname"
  # there must be a cleaner way?
  VER=$(awk 'NR==2 {print $2}' configure.ac | sed 's/\[//;s/\]//;s/)//')
  printf "$VER.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/$pkgname"
  autoreconf -vi
  ./configure --prefix=/usr --with-edit=readline
  make
}

package() {
  cd "$srcdir/$pkgname"
  make DESTDIR="$pkgdir/" install
  install -Dm644 history.1 $pkgdir/usr/share/man/man1/rc-history.1
  install -Dm644 README $pkgdir/usr/share/doc/${pkgname%-*}/README
  install -Dm644 NEWS $pkgdir/usr/share/doc/${pkgname%-*}/NEWS
  install -Dm644 EXAMPLES $pkgdir/usr/share/doc/${pkgname%-*}/EXAMPLES
  install -Dm644 COPYING $pkgdir/usr/share/licenses/${pkgname%-*}/COPYING
}