blob: 7a0d6e8ac61b62e39f4480ec8278cf715b9431fa (
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
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=yajl
pkgver=2.0.3
pkgrel=0
pkgdesc="Yet Another JSON Library (YAJL)"
url="http://lloyd.github.com/yajl/"
arch="all"
license="BSD"
depends=""
makedepends="cmake"
install=""
subpackages="$pkgname-dev $pkgname-tools"
# How to create archive from git. pkgver needs to be a git tag.
#
# git clone https://github.com/lloyd/yajl.git
# cd yajl
# git archive --format tar.gz --prefix yajl-$pkgver/ -o yajl-$pkgver.tar.gz $pkgver
# scp yajl-$pkgver.tar.gz dev.alpinelinux.org:/archive/yajl/
source="http://dev.alpinelinux.org/archive/yajl/yajl-$pkgver.tar.gz
libm.patch"
_builddir="$srcdir"/yajl-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
cmake -DCMAKE_INSTALL_PREFIX="/usr" . || return 1
make
}
package() {
cd "$_builddir"
make install DESTDIR="$pkgdir" || return 1
mv "$pkgdir"/usr/share/pkgconfig "$pkgdir"/usr/lib/
}
tools() {
pkgdesc="JSON tools based on Yajl"
mkdir -p "$subpkgdir"/usr/
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
md5sums="f5d31df70eb7cc522a5fa2fe06336022 yajl-2.0.3.tar.gz
64ae0008a567c3246ce805b6495d4c54 libm.patch"
|