summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 81c72ad2db9d5b2e5cfc91f06794014b00d58f3c (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
42
43
44
45
46
# Maintainer : nikp123 <pavlica.nikola@gmail.com>
# Contributor : Daniel Chesters <daniel.chesters@gmail.com>

pkgname=kalker-git
_pkgname=kalker
pkgver=v2.1.1.r7.g74d787f
pkgrel=1
pkgdesc="A calculator program that supports user-defined variables, functions, derivation, and integration."
url="https://github.com/PaddiM8/kalker"
depends=('gcc-libs' 'mpfr' 'gmp' 'libmpc' 'glibc')
makedepends=('cargo' 'git')
arch=('i686' 'x86_64' 'aarch64')
license=('MIT')
source=(
  'git+https://github.com/PaddiM8/kalker'
  "build.patch"
)
conflicts=('kalker')

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

prepare() {
	cd "$_pkgname"
	patch -p1 <../build.patch
	cargo fetch --target "$CARCH-unknown-linux-gnu"
}

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

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

# vim:set ts=2 sw=2 et:
b2sums=(
  'SKIP'
  '21b518490cd68c2d6f1bd46326ed734ccab767537f91a66635c89125db5d191c6444a74e80c98fc77c5c47747b436f9e6f8c2bb485fb461fc132a030a4266d6c'
  )