aboutsummaryrefslogtreecommitdiffstats
path: root/main/protobuf/APKBUILD
blob: 7507d8520a6f9b32bedeeed2c3317009c7100f3c (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
47
48
49
50
51
52
53
54
# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=protobuf
pkgver=3.1.0
pkgrel=0
pkgdesc="Library for extensible, efficient structure packing"
url="https://github.com/google/protobuf"
arch="all"
license="BSD"
depends=""
depends_dev="zlib-dev"
makedepends="$depends_dev autoconf automake libtool"
subpackages="$pkgname-dev $pkgname-vim"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare || return 1

	cd "$builddir"
	./autogen.sh
}

build() {
	cd "$builddir"

	CXXFLAGS="$CXXFLAGS -fno-delete-null-pointer-checks" \
		./configure --prefix=/usr \
			--sysconfdir=/etc \
			--mandir=/usr/share/man \
			--infodir=/usr/share/info \
			--localstatedir=/var \
		|| return 1
	make || return 1
	make check || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
}

vim() {
	pkgdesc="Vim syntax for $pkgname"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel vim"

	install -Dm644 "$builddir"/editors/proto.vim \
		"$subpkgdir"/usr/share/vim/vimfiles/syntax/proto.vim
}

md5sums="14a532a7538551d5def317bfca41dace  protobuf-3.1.0.tar.gz"
sha256sums="0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7  protobuf-3.1.0.tar.gz"
sha512sums="8d3289a16944c255bd1cceab696e515e52467f2bfe1cc10f6b32fabdf082d5acdc248ec9cadc572223a24d04d431f75921076153109cea2f90ee533f502ab47a  protobuf-3.1.0.tar.gz"