summaryrefslogtreecommitdiffstats
path: root/main/xscreensaver/APKBUILD
blob: 7c543d8c46c51b339c784855cb582f2fe23bfb59 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=xscreensaver
pkgver=5.29
pkgrel=0
pkgdesc="screensavers for X11 environment"
url="http://www.jwz.org/xscreensaver/"
license="GPL"
depends="bc"
makedepends="gtk+-dev libjpeg-turbo-dev mesa-dev gettext-dev libxmu-dev perl
	libxml2-dev libglade-dev libxinerama-dev libxrandr-dev glu-dev sed"
install=
subpackages="$pkgname-doc $pkgname-gl-extras:gl $pkgname-extras $pkgname-lang"
source="http://www.jwz.org/$pkgname/$pkgname-$pkgver.tar.gz
	intl-libs.patch"
arch="all"

_builddir="$srcdir"/$pkgname-$pkgver
_libexecdir=/usr/lib/xscreensaver
_confdir=/usr/share/xscreensaver/config

prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--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="14f9104fa03f85371f885bdad956764d  xscreensaver-5.29.tar.gz
7ab63bb0d5b5d043c94128dbd98cf311  intl-libs.patch"
sha256sums="c418f5750696b578df6d4fd62c8260c018667653ece97f2bb90612046bf0f294  xscreensaver-5.29.tar.gz
d13e51b406e84f02901bd16f401c9ae897400b0567182f4b8092df1fcd51e754  intl-libs.patch"
sha512sums="4eff49f58f9159d86ef765a6e5c3355d1d337237cd938fa5c486cb2b019acdf231047e8f51425b9658e7447023d2a71d8d790ee8205f9faa0c7525a2e3af320e  xscreensaver-5.29.tar.gz
3a4d750350bb1e5248fb03ea094001797e0628fb38c0ef854b9d30efd5d7a7f5a5b31fbac73816ae26a221201119be954c74fddbb863216ced4a5a63609720a2  intl-libs.patch"