summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 04eced877beef3b84e961f6e5231213edc3f79b1 (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=clipboard-manager-git
pkgver=r105.d87bd4b
pkgrel=1
pkgdesc="Clipboard manager for COSMICâ„¢"
arch=('x86_64')
url="https://github.com/cosmic-utils/clipboard-manager"
license=('GPL3-or-later')
depends=('cosmic-applets')
makedepends=('cargo' 'git' 'just')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}" 'cosmic-clipboard-manager-git')
options=('!lto')  # sqlx crate fails with LTO enabled
source=('git+https://github.com/cosmic-utils/clipboard-manager.git')
sha256sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

prepare() {
  cd "${pkgname%-git}"
  export RUSTUP_TOOLCHAIN=stable
  cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
  cd "${pkgname%-git}"
  export RUSTUP_TOOLCHAIN=stable
  just build-release
}

package() {
  cd "${pkgname%-git}"
  just rootdir="$pkgdir" install
}