summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: def3c9dd58974bfcf67e540a6abeb5a550a4d083 (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: asm0dey <pavel.finkelshtein@gmail.com>

pkgname=cb-git
_pkgname=cb
pkgver=0.1.0.r1.g036df74
pkgrel=4
arch=('i686' 'x86_64')
url="https://github.com/yaa110/cb"
license=("MIT")

pkgdesc='Command line interface to manage clipboard'

source=("$_pkgname::git://github.com/yaa110/cb.git")
sha512sums=('SKIP')
makedepends=('rust' 'python3')
depends=('gcc-libs' 'libxcb')
conflicts=('cb' 'cb-bin')
provides=('cb')

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

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

package() {
    install -Dm755 "$_pkgname/target/release/cli" "$pkgdir/usr/bin/cb"
    install -Dm644 "$_pkgname/LICENSE-MIT" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}