APKBUILD 2.03 KB
Newer Older
1 2 3
# Contributor: John Boehr <jbboehr@gmail.com>
# Maintainer: Rafael del Valle <rvalle@privaz.io>
pkgname=handlebars
4
_pkgname=handlebars.c
5
pkgver=0.6.4
6
pkgrel=1
7 8 9
_mustachespec_ver="1.1.3"
_handlebarsspec_ver="4.0.5-p1"
pkgdesc="C implementation of handlebars.js"
10 11 12
url="https://github.com/jbboehr/handlebars.c"
license="LGPLv2.1+"
arch="all"
13 14
makedepends="autoconf automake bison check-dev flex json-c-dev libtool lmdb-dev
	pcre-dev talloc-dev yaml-dev"
15
subpackages="$pkgname-dev $pkgname-utils"
16
source="$_pkgname-$pkgver.tar.gz::https://github.com/jbboehr/$_pkgname/archive/v$pkgver.tar.gz
17
	mustache-spec-$_mustachespec_ver.tar.gz::https://github.com/mustache/spec/archive/v$_mustachespec_ver.tar.gz
18 19
	handlebars-spec-$_handlebarsspec_ver.tar.gz::https://github.com/jbboehr/handlebars-spec/archive/v$_handlebarsspec_ver.tar.gz
	fix-test-failure-on-ppc64le.patch"
20
builddir="$srcdir/$_pkgname-$pkgver"
21 22

prepare() {
23 24 25 26 27 28
	cd "$builddir"

	mkdir -p spec
	ln -sf "$srcdir"/spec-$_mustachespec_ver spec/mustache
	ln -sf "$srcdir"/handlebars-spec-$_handlebarsspec_ver spec/handlebars

29
	default_prepare
30 31

	./bootstrap
32 33 34 35
}

build() {
	cd "$builddir"
36 37 38 39

	./configure \
		--prefix=/usr \
		--disable-refcounting
40 41 42 43 44
	make
}

check() {
	cd "$builddir"
45
	make test
46 47 48 49 50 51 52 53 54
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

utils() {
	pkgdesc="Handlebars command line utilities"
55

56 57 58 59
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

60
sha512sums="fae85ac30ce85b089c79c8b67cbf96cc94527d6b1ee2e83d05e638662c85b9bb1bd2aee06168dcd1ae2a15879f9f218dbecac012c25b583749d61f0921e0af16  handlebars.c-0.6.4.tar.gz
61
801a9cbf8a39080b183b20fbf327b420bcd6ed162bb58165dabafeb45fae277a9da506b6639ee7b955f6c206f0b8826d39588a43ffd86ab5ef4be6e9be2bc842  mustache-spec-1.1.3.tar.gz
62 63
81f0ff5ffc2d6b72465bdcbd2325d022faf73ec79586f3d8dfb07b7a6ec9147280872a82184b8d7ecdd8b22611b6b420c02ab437794bcd0aba67d2bf2082bc5d  handlebars-spec-4.0.5-p1.tar.gz
41a75d3e48d9eee2a404f41d5779d104895b72d4e8f9d00b207b468fc832ddc76fcd268fee3939cfb89f1dbba8149b39a7cef3b781c0f0da0b7abbbab55d3fec  fix-test-failure-on-ppc64le.patch"