summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b26ae5fef7eb6e3e7d78caaaa125dffd375765be (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Maintainer: jetomev <jetomev@gmail.com>
# Co-developer: Claude (Anthropic)

pkgname=nog
pkgver=1.0.2
pkgrel=1
pkgdesc="A tier-aware package manager for Arch Linux — pacman with a safety net, written in Rust"
arch=('x86_64')
url="https://github.com/jetomev/nog"
license=('GPL-3.0-or-later')
depends=('pacman' 'pacman-contrib')
makedepends=('rust' 'cargo')
optdepends=(
    'yay: AUR helper integration (preferred if installed)'
    'paru: AUR helper integration (alternative)'
)
# Preserve user modifications to these files across upgrades — pacman will
# write .pacnew next to them instead of overwriting. Without this, running
# `nog pin` to customize tier-pins.toml would get silently clobbered the next
# time the AUR ships a new nog version with a different default.
backup=('etc/nog/nog.conf' 'etc/nog/tier-pins.toml')
# SKIP is the submission-time placeholder. Before pushing to AUR, run
# `updpkgsums` in the AUR clone to replace SKIP with the real sha256 of the
# v1.0.0 GitHub source tarball.
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('06456d96506b97238febf4078f3b6a2b6ceed9c8fdf9786641a952248d435343')

build() {
    cd "$pkgname-$pkgver"
    cargo build --release --locked
}

check() {
    cd "$pkgname-$pkgver"
    cargo test --release --locked
}

package() {
    cd "$pkgname-$pkgver"

    # Binary
    install -Dm755 target/release/nog "$pkgdir/usr/bin/nog"

    # Default configs under /etc/nog/
    install -Dm644 config/nog.conf        "$pkgdir/etc/nog/nog.conf"
    install -Dm644 config/tier-pins.toml  "$pkgdir/etc/nog/tier-pins.toml"

    # Man page
    install -Dm644 nog.1 "$pkgdir/usr/share/man/man1/nog.1"

    # License
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}