aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-protobuf/APKBUILD
blob: da692d10c0bccee8449d90ff35b5cc5ba407cd28 (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
# Maintainer: Corentin Henry <corentinhenry@gmail.com>
# Contributor: Corentin Henry <corentinhenry@gmail.com>
pkgname=py-protobuf
_pkgname=${pkgname#py-}
pkgver=2.6.1
pkgrel=2
pkgdesc="Google's data interchange format."
url="https://github.com/google/protobuf"
arch="noarch"
license="BSD"
depends="python py-six>=1.9"
makedepends="python-dev py-setuptools py-google-apputils"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	cd "$builddir"
	python setup.py build
}

package() {
	cd "$builddir"

	python setup.py install --prefix=/usr --root="$pkgdir" || return 1

	# Workaround for https://github.com/google/protobuf/issues/737.
	# The files under protobuf.egg-info lack read permission for "other",
	# which causes `python setup.py build` failures for other packages.
	chmod o+r "$pkgdir"/usr/lib/python2.7/site-packages/$_pkgname-$pkgver-py2.7.egg-info/*
}

md5sums="6bf843912193f70073db7f22e2ea55e2  py-protobuf-2.6.1.tar.gz"
sha256sums="8faca1fb462ee1be58d00f5efb4ca4f64bde92187fe61fde32615bbee7b3e745  py-protobuf-2.6.1.tar.gz"
sha512sums="c345b5b2822e7142e27cd6ff4ca4e8cc307acd3673043428073ed260a899c48ac6afa32e290b2d2f0ee54316d1a0f0ec72287604fb372992715a2191fe5623d4  py-protobuf-2.6.1.tar.gz"