upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / cargo-pgrx / trunk / PKGBUILD
blob0cac89d0d37c04fa65a6ae3c0756a1c9bd378d74
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
3 pkgname=cargo-pgrx
4 pkgver=0.8.3
5 pkgrel=1
6 pkgdesc='Build PostgreSQL extensions with Rust'
7 arch=('x86_64')
8 url='https://github.com/tcdi/pgrx'
9 license=('MIT')
10 depends=('gcc-libs' 'openssl' 'clang' 'llvm' 'bzip2')
11 makedepends=('git' 'rust')
12 optdepends=('postgresql: to compile with system postgresql')
13 replaces=('cargo-pgx')
14 options=('!lto')
15 _commit='92750b42529aa5221640823a91e78c34a3821eed'
16 source=("$pkgname::git+$url.git#commit=$_commit")
17 b2sums=('SKIP')
19 pkgver() {
20   cd "$pkgname"
22   git describe --tags | sed 's/^v//'
25 prepare() {
26   cd "$pkgname"
28   # download dependencies
29   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
32 build() {
33   cd "$pkgname"
35   cargo build --release --frozen --package "$pkgname"
38 package() {
39   cd "$pkgname"
41   # binary
42   install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
44   # documentation
45   install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
47   # license
48   install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE