aboutsummaryrefslogtreecommitdiffstats
path: root/main/php5-phalcon/APKBUILD
blob: 4d5f843dec0d259ace7d9433612496011d72e93c (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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_php=php5
pkgname=${_php}-phalcon
_pkgreal=phalcon
pkgver=2.0.13
_pkgver=v$pkgver
pkgrel=0
pkgdesc="PHP extension that provides web framework delivered as a C-extension"
url="https://github.com/$_pkgreal/c$_pkgreal"
arch="all"
license="PHP"
depends="${_php}-pdo ${_php}-json"
makedepends="${_php}-dev autoconf re2c pcre-dev"
source="https://github.com/$_pkgreal/c$_pkgreal/archive/$_pkgreal-$_pkgver.tar.gz"
builddir="$srcdir/c$_pkgreal-$_pkgreal-$_pkgver/build"

prepare() {
	cd "$builddir"
	local bits=$(echo '#include <limits.h>' | ${CC:-gcc} -dM -E - | awk '$2 == "LONG_BIT" {print $3}')
	ln -s ${bits}bits arch
}

build() {
	cd "$builddir"/arch
	phpize || return 1
	./configure --prefix=/usr || return 1
	make || return 1
}

package() {
	cd "$builddir"/arch
	make INSTALL_ROOT="$pkgdir"/ install || return 1
	install -d "$pkgdir"/etc/php/conf.d || return 1
	echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php/conf.d/$_pkgreal.ini
	[ -d "$pkgdir"/usr/include ] && rm -fr "$pkgdir"/usr/include
	return 0
}

md5sums="4afa8dacd3badc0e770cde79636d1522  phalcon-v2.0.13.tar.gz"
sha256sums="0a1bd6afe902c6f2f68cf5e2f2785503f5ad95d1d2cf1b66c77154c483a08a35  phalcon-v2.0.13.tar.gz"
sha512sums="1e0ebe955e9522d780ada874cce87a7c12ac26dd7ade3847592d63f3b81cb64d7e2a3c9745ecdc50dfb5ea238f470ce2ae2408396c32ecdf915fe6d690c742ff  phalcon-v2.0.13.tar.gz"