2 # Maintainer: Thomas Martin Klein <kleintamasmarton@gmail.com> (Dino Krtanjek <krtanjekdino@gmail.com>)
6 pkgdesc="A fast and stable PHP opcode cacher"
8 url="http://xcache.lighttpd.net/"
11 install=$pkgname.install
12 backup=('etc/php/conf.d/xcache.ini')
13 source=(http://xcache.lighttpd.net/pub/Releases/$pkgver/xcache-$pkgver.tar.gz
15 md5sums=('205e2209f24e18a6b0844a4b6c52f2e4'
16 '579d19aaef125c763b0e5b56de8378ed')
17 _admindir=/srv/http/xcache-admin
20 cd "$srcdir/xcache-$pkgver"
22 ./configure --prefix=/usr --enable-xcache --enable-xcache-optimizer \
23 --enable-xcache-coverager || return 1
25 make INSTALL_ROOT=$pkgdir install || return 1
27 msg "XCache administration panel:"
29 XCache has a admin panel written in php. The administration panel displays
30 useful information about cached scripts and memory usage. If u choose to
31 install it, it will be installed in the $_admindir directory. If you keep
32 your web documents elsewhere, just make a symlink (ln -s) to the $_admindir
33 directory. You could also copy the content of $_admindir to
34 the desired location, but then remember to manually copy the content again
37 NOTE: the administration is protected with a builtin http authentication
38 that does't always work. If you can't access the admin panel, try to
39 disable the authentification by setting xcache.admin.enable_auth to Off in
40 xcache.ini. However, this is not recommended, because then anybody can
41 access you're XCache admin panel. Try to set up some alternative
42 authentication approach.
45 while [[ "$install_admin" != "y" && "$install_admin" != "n" ]]; do
46 read -p "Include XCache admin panel in the package? [y/n] " -n 1 install_admin
49 if [ "$install_admin" == "y" ]; then
50 mkdir -p "$pkgdir$_admindir/"
51 install -Dm644 admin/* "$pkgdir$_admindir/"
52 msg "The administration will be installed in $_admindir."
54 install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
55 install -Dm644 $srcdir/xcache.ini "$pkgdir/etc/php/conf.d/xcache.ini"