summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 52095d606c513ba9cf73345d773ec5b911ad8b09 (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=cdir-git
pkgver=1.4.r51.05c8730
pkgrel=1
pkgdesc="A faster way to navigate folders and browse files in Windows and Linux shells."
arch=('any')
url="https://github.com/EskelinenAntti/cdir"
license=('MIT')
depends=('python')
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-wheel'
)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/EskelinenAntti/cdir.git')
sha256sums=('SKIP')

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

prepare() {
  git -C "${pkgname%-git}" clean -dfx
}

build() {
  cd "${pkgname%-git}"
  python -m build --wheel --no-isolation
}

package() {
  cd "${pkgname%-git}"
  python -m installer --destdir="$pkgdir" dist/*.whl

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