blob: 9eb0634d39aad661b9a482e01a27780d149a065c (
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
55
56
57
|
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
pkgname=icu-git
pkgver=72.1.r149.g981c182a7f
pkgrel=2
pkgdesc="International Components for Unicode library"
arch=('i686' 'x86_64')
url="https://icu.unicode.org/"
license=('custom:icu')
depends=('glibc' 'sh')
makedepends=('git' 'git-lfs')
provides=("icu=$pkgver" libicu{data,i18n,io,test,tu,uc}.so)
conflicts=('icu')
_source=("https://github.com/unicode-org/icu.git")
prepare() {
# workaround for `makepkg` failing `git clone` with git-lfs
if [ ! -d "icu" ]; then
git clone "$_source"
fi
}
pkgver() {
cd "icu"
_tag=$(git tag -l --sort -v:refname | grep -E '^release-[0-9-]+$' | head -n1)
_rev=$(git rev-list --count $_tag..HEAD)
_hash=$(git rev-parse --short HEAD)
printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^release-//;s/-/./g'
}
build() {
cd "icu/icu4c/source"
export \
CC=gcc \
CXX=g++
./configure \
--prefix="/usr" \
--sbindir="/usr/bin" \
--sysconfdir="/etc"
make
}
check() {
cd "icu/icu4c/source"
make check
}
package() {
cd "icu/icu4c/source"
make DESTDIR="$pkgdir" install
install -Dm644 "$srcdir/icu/icu4c/LICENSE" -t "$pkgdir/usr/share/licenses/icu"
}
|