summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: babfe83b74d1c31179d9a8fdb52f00cb8c7be9fd (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
# Maintainer:
# Contributor: Yamada Hayao <development@fascode.net>

_pkgname="getoptions"
pkgname="${_pkgname}-git"
pkgver=3.3.2.r0.g139d121
pkgrel=1
pkgdesc="An elegant option/argument parser for shell scripts"
url="https://github.com/ko1nksm/getoptions"
license=('CC0-1.0')
arch=('any')

depends=(
  'bash'
)
makedepends=(
  'git'
)

provides=("$_pkgname")
conflicts=("$_pkgname")

_pkgsrc="$_pkgname"
source=("$_pkgsrc"::"git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgsrc"
  git describe --long --tags --abbrev=7 \
    | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g'
}

build() {
  cd "$_pkgsrc"
  make
}

package() {
  cd "$_pkgsrc"
  make install PREFIX="$pkgdir/usr"
}