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

_pkgname=tombs
pkgname=php-$_pkgname-git
pkgver=r53.b6c5c65
pkgrel=1
pkgdesc="Detect unused code in production"
arch=('i686' 'x86_64')
url="https://github.com/krakjoe/tombs"
license=('PHP')
depends=('php')
makedepends=('git')
source=(git://github.com/krakjoe/tombs.git)
md5sums=('SKIP')
_ininame="tombs.ini"
_inifile="etc/php/conf.d/$_ininame"
backup=("$_inifile")

pkgver() {
  cd "$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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
;zend_extension=tombs.so
;tombs.slots     # 10000 # Set to (a number greater than) the maximum number of functions
;tombs.strings   = 32M # Set size of string buffer (supports suffixes, be generous)
;tombs.socket    = /path/to/zend.tombs.socket # Set path to socket, setting to 0 disables socket
;tombs.dump      = 0    # Set to a file descriptor for dump on shutdown
;tombs.namespace = N/A  # Set to restrict recording to a namespace
EOF

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