summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1796c5879de60412e03c1c7082cd7437ff1507a0 (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
# Maintainer: Stefan Auditor <stefan.auditor@erdfisch.de>
# Please report issues at https://github.com/sanduhrs/arch-aur-php-uploadprogress-git

_pkgname=uploadprogress
pkgname=php-${_pkgname}-git
pkgver=r57.95d8a0f
pkgrel=1
pkgdesc="An extension to track progress of a file upload"
arch=('i686' 'x86_64')
url="http://pecl.php.net/package/uploadprogress"
license=('PHP')
depends=('php')
makedepends=('php' 'git' 'autoconf')
provides=("php-${_pkgname}")
conflicts=("php-${_pkgname}")
install=${_pkgname}.install
source=("${_pkgname}"::"git+https://git.php.net/repository/pecl/php/uploadprogress.git")
sha512sums=('SKIP')

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

build() {
  cd "${srcdir}/${_pkgname}"
  phpize
  ./configure
  make
}

package() {
  cd "${srcdir}/${_pkgname}"
  echo ";extension=${_pkgname}.so" > ${_pkgname}.ini
  install -Dm644 ${_pkgname}.ini "${pkgdir}/etc/php/conf.d/${_pkgname}.ini"
  make install INSTALL_ROOT="${pkgdir}/"
}