archrelease: copy trunk to extra-x86_64
[arch-packages.git] / php-apcu / repos / extra-x86_64 / PKGBUILD
blob712b628edfcfe96cc1d94d975a45ce959045dbdd
1 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
3 pkgbase=php-apcu
4 pkgname=(php-apcu php7-apcu)
5 pkgver=5.1.21
6 pkgrel=2
7 arch=('x86_64')
8 pkgdesc='A userland caching module for PHP'
9 url='https://pecl.php.net/package/APCu'
10 makedepends=('php' 'php7')
11 license=('PHP')
12 source=("https://pecl.php.net/get/apcu-$pkgver.tgz"
13         'apcu.ini')
14 sha256sums=('1033530448696ee7cadec85050f6df5135fb1330072ef2a74569392acfecfbc1'
15             '18b2d904848b185bdc7c0c6a5f7c82ec809e9ed3f137cd6d3420160f4756630f')
17 prepare() {
18         cd "$srcdir/apcu-$pkgver"
20         rm tests/apc_entry_002.phpt
22         cp -a "$srcdir/apcu-$pkgver" "$srcdir/apcu7-$pkgver"
25 build() {
26         cd "$srcdir/apcu-$pkgver"
27         phpize
28         ./configure --prefix=/usr
29         make
31         cd "$srcdir/apcu7-$pkgver"
32         phpize7
33         ./configure --prefix=/usr
34         make
37 check() {
38         export REPORT_EXIT_STATUS=1
39         export NO_INTERACTION=1
40         export SKIP_ONLINE_TESTS=1
41         export SKIP_SLOW_TESTS=1
43         for dir in "$srcdir/apcu"{,7}-$pkgver; do
44                 pushd "$dir"
45                 make test
46                 popd
47         done
50 package_php-apcu() {
51         depends=(php)
52         backup=('etc/php/conf.d/apcu.ini')
54         cd "$srcdir/apcu-$pkgver"
56         make INSTALL_ROOT="$pkgdir" install
58         install -D -m644 "$srcdir/apcu.ini" "$pkgdir/etc/php/conf.d/apcu.ini"
59         install -D -m644 apc.php "$pkgdir/usr/share/webapps/php-apcu/apc.php"
62 package_php7-apcu() {
63         depends=(php7)
64         backup=('etc/php7/conf.d/apcu.ini')
66         cd "$srcdir/apcu7-$pkgver"
68         make INSTALL_ROOT="$pkgdir" install
70         install -D -m644 "$srcdir/apcu.ini" "$pkgdir/etc/php7/conf.d/apcu.ini"
71         install -D -m644 apc.php "$pkgdir/usr/share/webapps/php7-apcu/apc.php"