summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a6e3633cc945d46d27d1c1d58861254d4bcec459 (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
pkgname=protobuf-rust-git
pkgver=1.4.1.12.gdf787b8
pkgrel=1
pkgdesc="Rust Support for Google's protocol buffers"
arch=('x86_64' 'i686')
url="https://github.com/stepancheg/rust-protobuf"
license=('MIT' 'Apache-2.0')
depends=('protobuf')
makedepends=('cargo')
optdepends=()
provides=('protobuf-rust')
conflicts=('protobuf-rust')
source=($pkgname::git+https://github.com/stepancheg/rust-protobuf.git)
sha256sums=('SKIP')

pkgver() {
    cd "$pkgname"
    git describe --tags | sed -e 's/-/./g' -e 's/^v//'
}

build() {
    cd "$pkgname"
    cargo build \
        --package protoc \
        --package protoc-rust \
        --package protobuf \
        --release
}

package() {
    cd "$pkgname"
    install -D -m755 "$srcdir/$pkgname/target/release/protoc-gen-rust" "$pkgdir/usr/bin/protoc-gen-rust"
}