pkgname=icu
pkgver=77.1
pkgdesc="International Components for Unicode library"
arch=(x86_64)
homepage="https://icu.unicode.org"
license=('LicenseRef-Unicode-3.0'
         'BSD-2-Clause'
         'BSD-3-Clause'
         'NAIST-2003')
sources=("icu4c-77_1-src.tgz")
urls=("https://github.com/unicode-org/icu/releases/download/release-77-1/icu4c-77_1-src.tgz")
md5sums=("bc0132b4c43db8455d2446c3bae58898")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  pushd source &&
  ./configure --prefix=/usr &&
  make &&
  popd
}

src_check() {
  pushd source
  make check
  popd
}

src_install() {
  pushd source
  make DESTDIR="${pkgdir}" install
  install -Dm644 ../LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
  popd
}
