summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: eebb408e192c6e336607a3d5f6f0d33aee48dc52 (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
# Maintainer: Gustavo Castro < gustawho [ at ] gmail [ dot ] com >

pkgname=corrosion-git
pkgver=0.4.3.r10.gafe12e3
pkgrel=1
pkgdesc="Integrate Rust into existing CMake projects"
arch=('x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64')
url="https://github.com/AndrewGaspar/corrosion"
license=('MIT')
depends=('rust' 'cmake')
makedepends=('git')
provides=('corrosion')
conflicts=('corrosion')
source=("git+${url}.git")
sha256sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCORROSION_BUILD_TESTS=OFF -B build -S "${pkgname%-git}"
  cmake --build build --config Release
}

package() {
  DESTDIR="${pkgdir}" cmake --install build --config Release
}