summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cbf70c2e2807006ecfea6ef69d66d2e25a3edbf3 (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
# Maintainer: <reg-archlinux AT klein DOT tuxli DOT ch> 
# Contributor: Samuel Walladge <samuel@swalladge.net>
pkgname=pc-git
_pkgname=pc
pkgver=v0.1.1.r1.gc1e90f8
pkgrel=1
pkgdesc="Command line client for pastebins"
arch=('i686' 'x86_64')
url="https://git.sr.ht/~swalladge/pc"
license=('GPL3')
provides=("pc")
conflicts=("pc")
makedepends=('cargo' 'git')
source=("${pkgname}::git+https://git.sr.ht/~swalladge/pc")
sha256sums=('SKIP')

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

pkgver() {
  cd "${pkgname}"
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

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