summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f142be4a7b6d5f422a0ad30f129d4aecb89f2415 (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
# Maintainer: Bernat Gabor <gaborjbernat@gmail.com>

pkgname=python-launcher
pkgver=1.0.0
pkgrel=3
pkgdesc="Launch your Python interpreter the lazy/smart way!"
arch=('x86_64')
license=('MIT')
url="https://github.com/brettcannon/python-launcher"

makedepends=('rust' 'cargo')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha512sums=('ff37ebce5532b37ac073d3fb9decc2c40b9cf5b04da5d0fdbf13bf2d04364beb97c0015210977b889d3c366b74225904da71bc0a66f386240ee66ff7c0648357')

build() {
  cd $pkgname-$pkgver
  cargo build --release --locked --all-features
}

package() {
  cd $pkgname-$pkgver
  install -Dm 755 target/release/py "$pkgdir"/usr/bin/py
  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
  install -Dm 644 docs/man-page/py.1 "$pkgdir"/usr/share/man/man1/py.1
  install -Dm 644 completions/py.fish "$pkgdir"/usr/share/fish/vendor_functions.d/py.fish
}