aboutsummaryrefslogtreecommitdiffstats
path: root/main/xscreensaver/APKBUILD
blob: 272576e8c6d4779327c484232a142a2aeb8e633e (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
# Contributor: 
# Maintainer: 
pkgname=xscreensaver
pkgver=5.40
pkgrel=0
pkgdesc="screensavers for X11 environment"
url="https://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="https://www.jwz.org/$pkgname/$pkgname-$pkgver.tar.gz"
arch="all"
options="suid"

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

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
	make
}

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
}

sha512sums="e3b5fe03ee56596fd5b0bf4e805ec341906db9665d553a110b4e874e37406fbb596f7bd29da57871c59e8d90bcc97eba9ba92afd79c48139ac021eb9cf6af68d  xscreensaver-5.40.tar.gz"