summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 13e8cab7975daf53055d02b172560c237d16642e (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: neolaner <neo.laner.official@gmail.com>
pkgname=pkgsync-tui
pkgver=0.1.0
pkgrel=1
pkgdesc="Interactive TUI for keeping explicitly-installed packages of two Arch Linux machines in sync"
arch=('x86_64')
url="https://github.com/NeoLaner/pkgsync"
license=('MIT')
depends=('gcc-libs')
makedepends=('cargo')
provides=('pkgsync')
conflicts=('pkgsync')
source=("$pkgname-$pkgver.tar.gz::https://github.com/NeoLaner/pkgsync/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('cf330df297aba23439ebd33495228aaed792508fd2ef2415dfef263da4c8d2a3')

_srcdir=pkgsync-$pkgver

prepare() {
    cd "$_srcdir"
    cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
    cd "$_srcdir"
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release
}

package() {
    cd "$_srcdir"
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/pkgsync"
    install -Dm0644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}