# Contributor: William Pitcock # Maintainer: William Pitcock pkgname=xscreensaver pkgver=5.15 pkgrel=3 pkgdesc="screensavers for X11 environment" url="http://www.jwz.org/xscreensaver/" license="GPL" depends="bc" makedepends="gtk+-dev jpeg-dev mesa-dev gettext-dev libxmu-dev perl-dev libxml2-dev libglade-dev libxinerama-dev libxrandr-dev" install= subpackages="$pkgname-doc $pkgname-gl-extras:gl $pkgname-extras $pkgname-lang" source="http://www.jwz.org/$pkgname/$pkgname-$pkgver.tar.gz" arch="all" _builddir="$srcdir"/$pkgname-$pkgver _libexecdir=/usr/lib/xscreensaver _confdir=/usr/share/xscreensaver/config prepare() { cd "$_builddir" } build() { cd "$_builddir" export LIBS="-lintl" ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-gtk \ --libexecdir=$_libexecdir \ --with-xinerama-ext \ --with-xf86vmode-ext \ --with-randr-ext \ || return 1 make || return 1 } package() { cd "$_builddir" make install_prefix="$pkgdir" install } gl() { local _conf pkgdesc="An enhanced set of screensavers that require OpenGL" cd "$pkgdir" mkdir -p "$subpkgdir"/$_confdir scanelf -Rn . | awk '$2 ~ /libGL/ { print $3}' | while read f; do mkdir -p "$subpkgdir"/${f%/*} mv "$f" "$subpkgdir"/${f%/*} _conf=usr/share/xscreensaver/config/${f##*/}.xml if [ -f "$_conf" ]; then mv "$_conf" "$subpkgdir"/$_confdir fi done } extras() { pkgdesc="An enhanced set of screensavers" mkdir -p "$subpkgdir"/$_libexecdir \ "$subpkgdir"/$_confdir mv "$pkgdir"/$_libexecdir/* "$subpkgdir"/$_libexecdir mv "$pkgdir"/$_confdir/* "$subpkgdir"/$_confdir } md5sums="c0b8b2c817a9a7371f51a82e80602d10 xscreensaver-5.15.tar.gz"