summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4454076491dcaeec06aa4b37d971d38e01c427c2 (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
# Maintainer: Kemel Zaidan <kemelzaidan@gmail.com>
pkgname=gitnr
pkgver=0.2.2
pkgrel=1
makedepends=('rust' 'cargo' 'wget')
depends=('glibc' 'gcc-libs' 'openssl')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
pkgdesc="A CLI to generate .gitignore files using one or more templates"
url="https://github.com/reemus-dev/gitnr"
license=('MIT')

prepare() {
    cd "$srcdir"
    mkdir -p "usr/share/licenses/$pkgname"
    wget https://raw.githubusercontent.com/reemus-dev/gitnr/refs/heads/main/LICENSE --directory-prefix "usr/share/licenses/$pkgname"
}

build() {
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cd "$srcdir"
    cargo install --root="$srcdir" --git="$url" --no-track --all-features
}

package() {
    install -Dm 755 "$srcdir/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
    install -D "$srcdir/usr/share/licenses/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}