archrelease: copy trunk to community-any
[ArchLinux/community.git] / editorconfig-checker / trunk / PKGBUILD
blob897fa80564afd239e8ec0b76d536e6353224ae9b
1 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
4 pkgname=editorconfig-checker
5 pkgver=2.7.0
6 pkgrel=1
7 pkgdesc='A tool to verify that your files are in harmony with your .editorconfig'
8 arch=('x86_64')
9 url="https://github.com/editorconfig-checker/$pkgname"
10 license=(MIT)
11 depends=(glibc)
12 makedepends=(go)
13 provides=(ec)
14 source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
15 sha256sums=('6f7f842e04117c0124638973e0f0f49d669daa6e6dcec7e0ecf86109b2c51e99')
17 build() {
18         cd "$pkgname-$pkgver"
19         export CGO_CPPFLAGS="$CPPFLAGS"
20         export CGO_CFLAGS="$CFLAGS"
21         export CGO_CXXFLAGS="$CXXFLAGS"
22         export CGO_LDFLAGS="$LDFLAGS"
23         export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
24         go build -o "$pkgname" ./cmd/...
27 check() {
28         cd "$pkgname-$pkgver"
29         go test ./...
32 package() {
33         cd "$pkgname-$pkgver"
34         install -Dm755 -t "$pkgdir/usr/bin/" "$pkgname"
35         ln -sf "$pkgname" "$pkgdir/usr/bin/ec"
36         install -Dm644 -t  "$pkgdir/usr/share/licenses/$pkgname" LICENSE
39 # vim: ts=2 sw=2 et: