summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3d25c7455a06c5b4dc638d9843cf8583f7a0a0b4 (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
# Maintainer: Morgan <morganamilo@archlinux.org>
pkgname=paccat
pkgver=0.2.0
pkgrel=1
pkgdesc='Print pacman package files'
url='https://github.com/morganamilo/paccat'
source=("$pkgname-$pkgver.tar.gz::https://github.com/Morganamilo/paccat/archive/v$pkgver.tar.gz")
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64')
license=('GPL3')
makedepends=('cargo')
depends=('pacman')
sha256sums=('fb47c95307d94927b19f9377aa0ed06a98ed8e398ecf6ad7c02c21ca49f8d2fd')

build () {
  cd "$srcdir/$pkgname-$pkgver"
  COMPLETIONS_DIR=target cargo build --locked --release --target-dir target
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  install -Dm755 target/release/paccat -t "${pkgdir}/usr/bin/"

  install -Dm644 man/$pkgname.1 -t "$pkgdir/usr/share/man/man1/"
  install -Dm644 target/$pkgname.bash -t "$pkgdir/usr/share/bash-completion/completions"
  install -Dm644 target/$pkgname.fish -t "$pkgdir/usr/share/fish/completions"
  install -Dm644 target/_$pkgname -t "$pkgdir/usr/share/zsh/site-functions"
}