core/libutf8proc/PKGBUILD

47 lines
1.3 KiB
Bash
Raw Normal View History

# Contributions from Arch:
# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
pkgname=libutf8proc
2018-07-21 19:32:30 +08:00
pkgver=2.1.1
pkgrel=1
pkgdesc='C library for processing UTF-8 encoded Unicode strings'
arch=('x86_64')
2018-07-21 19:32:30 +08:00
url='https://julialang.org/utf8proc/'
license=('custom')
makedepends=('cmake' 'git' 'ninja')
2018-07-21 19:32:30 +08:00
source=("git+https://github.com/JuliaStrings/utf8proc#tag=v$pkgver"
'libutf8proc.pc.in')
sha256sums=('SKIP'
2018-07-21 19:32:30 +08:00
'0fc49af11c4e77675d307bcee442c3582db805f7c17c32284d0620131b1007d1')
prepare() {
2018-07-21 19:32:30 +08:00
sed "s#@VERSION@#$pkgver#" libutf8proc.pc.in > libutf8proc.pc
}
build() {
mkdir -p build
cd build
2018-07-21 19:32:30 +08:00
cmake ../utf8proc \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-G Ninja
ninja
}
package() {
2018-07-21 19:32:30 +08:00
# The install command does not work for libutf8proc
# DESTDIR="$pkgdir" ninja -C "$pkgname-$pkgver/build" install
2018-07-21 19:32:30 +08:00
cd utf8proc
install -Dm644 utf8proc.h "$pkgdir/usr/include/utf8proc.h"
install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
install -Dm644 "$srcdir/libutf8proc.pc" \
"$pkgdir/usr/lib/pkgconfig/libutf8proc.pc"
2018-07-21 19:32:30 +08:00
install -Dm644 ../build/libutf8proc.so.$pkgver \
"$pkgdir/usr/lib/libutf8proc.so.$pkgver"
2018-07-21 19:32:30 +08:00
ln -s /usr/lib/libutf8proc.so.$pkgver "$pkgdir/usr/lib/libutf8proc.so"
ldconfig -n "$pkgdir/usr/lib"
}