PKGBUILDs/extra/libphonenumber/PKGBUILD
2016-12-01 13:58:07 +00:00

45 lines
969 B
Bash

# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - make -j1
pkgname=libphonenumber
pkgver=7.7.4
pkgrel=2
pkgdesc="Google's common library for parsing, formatting, and validating international phone numbers"
url="https://github.com/googlei18n/libphonenumber"
arch=(i686 x86_64)
depends=(icu protobuf boost-libs)
makedepends=(boost cmake gtest git java-environment)
license=("Apache")
_commit=fedbc7020703e479d61d907419217bb1f8da5348 # tags/v7.7.4^0
source=("git+$url#commit=$_commit")
sha256sums=('SKIP')
pkgver() {
cd $pkgname
git describe --tags | sed 's/^libphonenumber-\|^v//;s/-/+/g'
}
prepare() {
mkdir -p build
}
build() {
cd build
CXXFLAGS+=" -Wno-error=deprecated-declarations" # readdir_r deprecation
cmake -DCMAKE_INSTALL_PREFIX=/usr ../$pkgname/cpp
make -j1
}
check() {
cd build
make tests
}
package() {
cd build
make DESTDIR="$pkgdir" install
}