archrelease: copy trunk to testing-x86_64
[arch-packages.git] / php-apcu / repos / extra-x86_64 / PKGBUILD
blob8590bcbf4f8d8a4adb9e487af88ab1cac6c74d27
1 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
3 pkgbase=php-apcu
4 pkgname=('php-apcu' 'php-legacy-apcu')
5 pkgver=5.1.22
6 pkgrel=3
7 arch=('x86_64')
8 pkgdesc='A userland caching module for PHP'
9 url='https://pecl.php.net/package/APCu'
10 makedepends=('php' 'php-legacy')
11 license=('PHP')
12 source=("https://pecl.php.net/get/apcu-$pkgver.tgz"
13         'apcu.ini')
14 sha256sums=('010a0d8fd112e1ed7a52a356191da3696a6b76319423f7b0dfdeaeeafcb41a1e'
15             '18b2d904848b185bdc7c0c6a5f7c82ec809e9ed3f137cd6d3420160f4756630f')
17 prepare() {
18         cd "$srcdir/apcu-$pkgver"
20         cp -a "$srcdir/apcu-$pkgver" "$srcdir/apcu-legacy-$pkgver"
23 build() {
24         cd "$srcdir/apcu-$pkgver"
25         phpize
26         ./configure --prefix=/usr
27         make
29         cd "$srcdir/apcu-legacy-$pkgver"
30         phpize-legacy
31         ./configure --prefix=/usr
32         make
35 check() {
36         export REPORT_EXIT_STATUS=1
37         export NO_INTERACTION=1
38         export SKIP_ONLINE_TESTS=1
39         export SKIP_SLOW_TESTS=1
41         for dir in "$srcdir/apcu"{,-legacy}-$pkgver; do
42                 pushd "$dir"
43                 make test
44                 popd
45         done
48 package_php-apcu() {
49         depends=('php')
50         backup=('etc/php/conf.d/apcu.ini')
52         cd "$srcdir/apcu-$pkgver"
54         make INSTALL_ROOT="$pkgdir" install
56         install -D -m644 "$srcdir/apcu.ini" "$pkgdir/etc/php/conf.d/apcu.ini"
57         install -D -m644 apc.php "$pkgdir/usr/share/webapps/php-apcu/apc.php"
60 package_php-legacy-apcu() {
61         depends=('php-legacy')
62         backup=('etc/php-legacy/conf.d/apcu.ini')
64         cd "$srcdir/apcu-legacy-$pkgver"
66         make INSTALL_ROOT="$pkgdir" install
68         install -D -m644 "$srcdir/apcu.ini" "$pkgdir/etc/php-legacy/conf.d/apcu.ini"
69         install -D -m644 apc.php "$pkgdir/usr/share/webapps/php-legacy-apcu/apc.php"