desktop/protobuf/PKGBUILD

50 lines
1.5 KiB
Bash

pkgbase=protobuf
pkgname=('protobuf' 'python2-protobuf' 'python3-protobuf')
pkgver=2.6.1
pkgrel=2
pkgdesc="A way of encoding structured data in an efficient yet extensible format"
arch=('x86_64')
url="http://code.google.com/p/protobuf/"
license=('APACHE')
depends=('gcc-libs' 'zlib')
makedepends=('python2-setuptools' 'python3')
options=(!libtool)
source=("https://github.com/google/protobuf/releases/download/v$pkgver/protobuf-$pkgver.tar.bz2")
sha512sums=('8b092b87fcd79223db199cd3d330f3d43689b47f345aa4e34028dcf1680d609a5d5a89ab08588e817b566d3b265834c38f1db580bc1c144b512ce74d35f2a174')
build() {
cd $srcdir/$pkgname-$pkgver
# ./autogen.sh
# ./configure --prefix=/usr --disable-static
./configure --prefix=/usr
make
}
package_protobuf() {
cd $pkgbase-$pkgver
make DESTDIR="$pkgdir" install
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
install -Dm644 editors/protobuf-mode.el \
"$pkgdir"/usr/share/emacs/site-lisp/protobuf-mode.el
}
package_python2-protobuf() {
pkgdesc="protobuf python2 API"
depends=("python2" "protobuf=${pkgver}")
provides=("protobuf-python")
conflicts=("protobuf-python")
replaces=("protobuf-python")
cd $srcdir/protobuf-$pkgver/python
python2 setup.py install --prefix=/usr --root $pkgdir
}
package_python3-protobuf() {
pkgdesc="protobuf python3 API"
depends=("python3" "protobuf=${pkgver}")
cd $srcdir/protobuf-$pkgver/python
python3 setup.py install --prefix=/usr --root $pkgdir
}