summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0a4b356a1c57135f734187f1f40e4ec1f4df31e6 (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
# Maintainer: Ivy Foster <ivy.foster@gmail.com>

pkgname='libutf8proc-git'
pkgver=1.3.1.2.r0.g81ce692
pkgrel=2
pkgdesc='C library for processing UTF-8 encoded Unicode strings'
url='http://git.netsurf-browser.org/libutf8proc.git/'
license=('MIT')

makedepends=('git' 'netsurf-buildsystem-git')
provides=('libutf8proc')
conflicts=('libutf8proc')

arch=('x86_64' 'i686')
source=('git://git.netsurf-browser.org/libutf8proc.git')
sha256sums=('SKIP')

pkgver() {
	cd libutf8proc
	git describe --long | sed 's:release/::; s:-\([0-9]\+\)-\([0-9]\+\)-:.\1.r\2.:'
}

prepare() {
	sed 's:-D_BSD_SOURCE::' -i libutf8proc/Makefile
}

build() {
	make -C libutf8proc PREFIX=/usr INCLUDEDIR=include \
		LIBDIR=lib COMPONENT_TYPE=lib-shared
}

check() {
	make -C libutf8proc PREFIX=/usr INCLUDEDIR=include \
		LIBDIR=lib COMPONENT_TYPE=lib-shared test
}

package() {
	cd libutf8proc
	make DESTDIR="$pkgdir" PREFIX=/usr INCLUDEDIR=include \
		LIBDIR=lib COMPONENT_TYPE=lib-shared install
	install -Dm644 LICENSE.md \
		"$pkgdir/usr/share/licenses/netsurf/libutf8proc"
}