summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 42c0b5355f661f45c99b0f60aebacc6970085e0c (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
# Maintainer: Max Struebing <mxstrbng@gmail.com>

pkgname=editorconfig-checker-git
pkgver=2.0.0
pkgrel=1
pkgdesc="A tool to verify that your files are in harmony with your .editorconfig"
arch=(any)
url="https://github.com/editorconfig-checker/editorconfig-checker"
license=('MIT')
depends=()
makedepends=('git' 'go')
source=("git+$url")
md5sums=('SKIP')
provides=('ec' 'editorconfig-checker')

pkgver() {
    cd "$srcdir/editorconfig-checker" || exit
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/^v//g'
}

build() {
    cd "$srcdir/editorconfig-checker" 
    go get -u github.com/editorconfig-checker/editorconfig-checker
    make build
}

package() {
    cd "$srcdir/editorconfig-checker/bin" || exit
    install -Dm755 ec "$pkgdir/usr/bin/ec"
    install -Dm755 ec "$pkgdir/usr/bin/editorconfig-checker"
    cd "$srcdir/editorconfig-checker" || exit
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/editorconfig-checker/LICENSE"
}