summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9f7f6148e9b8fc71ed8aa3b82d7a2e67e9911d74 (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
# shellcheck shell=bash disable=SC2034,SC2154
# Maintainer: Mateen Ulhaq <mulhaq2005+aur at gmail dot com>

pkgname=uq-git
_pkgname=uq
pkgver=0.0.0.r0.g118bc2f
pkgrel=1
pkgdesc="uniq in Rust without needing to sort the input"
arch=("x86_64")
url="https://github.com/lostutils/uq"
license=("MIT")
depends=("gcc-libs")
makedepends=("cargo" "git")
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("$pkgname::git+https://github.com/lostutils/uq")
sha256sums=("SKIP")

pkgver() {
    cd "$pkgname" || exit 1
    git rev-parse --short HEAD | sed 's/^/0.0.0.r0.g/'
    # git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "$pkgname" || exit 1
    cargo build --release
}

package() {
    cd "$pkgname" || exit 1
    install -Dm755 "target/release/${_pkgname}" "$pkgdir/usr/bin/${_pkgname}"
    install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE"
    install -Dm644 "README.md" "$pkgdir/usr/share/doc/${_pkgname}/README.md"
}