summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6ee2589e52e2085b8fced979eb45fe4e780ef9eb (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
# Maintainer: Boris Momčilović <boris.momcilovic@gmail.com>

_pkgname=componere
pkgname=php-$_pkgname-git
pkgver=v3.1.0.r0.g9ea864e
pkgrel=1
pkgdesc="Complex Type Composition and Manipulation http://docs.php.net/intro.componere"
arch=('i686' 'x86_64')
url="https://github.com/krakjoe/componere"
license=('PHP')
depends=('php')
makedepends=('git')
source=(git://github.com/krakjoe/componere.git#branch=release)
md5sums=('SKIP')
_ininame="componere.ini"
_inifile="etc/php/conf.d/$_ininame"
backup=("$_inifile")

pkgver() {
  cd "$_pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir/$_pkgname"

  phpize
  ./configure --prefix=/usr
  make
  #TEST_PHP_EXECUTABLE=`which php` php run-tests.php
}

package() {
  cd "$srcdir/$_pkgname"
  make PREFIX=/usr INSTALL_ROOT="$pkgdir" install
  cat >> "$_ininame" <<EOF
;extension=componere.so
EOF

  install -vDm644 "$_ininame" "$pkgdir/$_inifile"
}