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

pkgname=dotenv-linter-git
pkgver=1.1.0.r4.g61ff93d
pkgrel=1
pkgdesc="Linter for .env files. Written in Rust"
arch=(any)
url="https://github.com/mgrachev/dotenv-linter"
license=('MIT')
depends=()
makedepends=('git' 'cargo')
source=("git+$url")
md5sums=('SKIP')
provides=('dotenv-linter')

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

build() {
    cd "$srcdir/dotenv-linter" || exit
    git clone https://github.com/mgrachev/dotenv-linter.git
    cd dotenv-linter || exit
    cargo build --release

}

package() {
    cd "$srcdir/dotenv-linter/dotenv-linter/target/release" || exit
    install -Dm755 dotenv-linter "$pkgdir/usr/bin/dotenv-linter"
    cd "$srcdir/dotenv-linter/dotenv-linter" || exit
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/dotenv-linter/LICENSE"
}