summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8eb27736a013468fdf605ac1cf0dfc70dc1a99b0 (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
# Maintainer: Marcel O'Neil <marcel@marceloneil.com>

_pkgname=hadolint
pkgname=hadolint-git
pkgver=r257.85789f3
pkgrel=1
pkgdesc='Dockerfile linter written in Haskell'
url='http://hadolint.lukasmartinelli.ch/'
license=('GPL')
source=('git+https://github.com/lukasmartinelli/hadolint.git')
sha256sums=('SKIP')
arch=('any')
makedepends=('git' 'stack')
provides=('hadolint')

pkgver() {
  cd "${srcdir}/${_pkgname}"

  # Get the version number.
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd "${srcdir}/${_pkgname}"

  # Build
  stack build hadolint

  # Install the program.
  install -Dm755 .stack-work/install/*/*/*/bin/hadolint "${pkgdir}/usr/bin/hadolint"
}

# vim: ft=sh ts=2 sw=2 et