aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/xrdp-git/APKBUILD
blob: 74de1776a86a57b85f7439ac53191d376e2bbd10 (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
85
86
87
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=xrdp-git
pkgver=20150719
pkgrel=1
pkgdesc="an open source RDP server"
url="http://www.xrdp.org/"
arch="x86_64"
license="GPLv2"
depends=""
depends_dev=""
makedepends="$depends_dev autoconf automake libtool openssl-dev libx11-dev
        libxfixes-dev libxrandr-dev libjpeg-turbo-dev fuse-dev linux-headers
	perl jq nasm xorg-server-dev"
install=""
subpackages="$pkgname-doc $pkgname-xorgxrdp"
source="http://dev.alpinelinux.org/archive/xrdp-git/xrdp-git-2015-01-08.tar.gz
	cd077979ebeb81a6e85a9ba7f9c463beda1606ba.patch"

_builddir="$srcdir"/xrdp

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

build() {
	cd "$_builddir"
	./bootstrap
        ./configure \
                --prefix=/usr \
                --disable-static \
                --sysconfdir=/etc \
                --localstatedir=/var \
                --sbindir=/usr/sbin \
                --enable-nopam \
                --enable-fuse \
                --enable-jpeg \
                || return 1
	make || return 1

	# xorgxrpd drivers
	msg "Building xorgxrdp drivers"
	cd "$_builddir"/xorgxrdp
	./bootstrap
	./configure \
		--prefix=/usr \
		--disable-static \
		--sysconfdir=/etc \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

xorgxrdp() {
	pkgdesc="$pkgdesc (xorg drivers)"
	cd "$_builddir"/xorgxrdp
	make DESTDIR="$subpkgdir" install || return 1
}

snapshot() {
	abuild clean
	abuild deps
	mkdir "$srcdir" && cd "$srcdir"
	git clone --recursive https://github.com/neutrinolabs/xrdp.git
	local sha=$(curl -s https://api.github.com/repos/neutrinolabs/xrdp/git/refs/heads/master | jq -r '.object.sha')
	local date=$(curl -s https://api.github.com/repos/neutrinolabs/xrdp/git/commits/$sha | jq -r '.committer.date')
	date=${date%%T*}
	tar zcvf xrdp-git-${date}.tar.gz xrdp

	msg "Set \$pkgver to $date"
}
md5sums="fa1dd8c18a9da6dd3aebe0fc42fab681  xrdp-git-2015-01-08.tar.gz
f4c995827a65bc0e267dc4938b1820eb  cd077979ebeb81a6e85a9ba7f9c463beda1606ba.patch"
sha256sums="a7eebc83132d3a5334c0edc7d488c0a2e34cf3294f372d112b68192a4ed7256b  xrdp-git-2015-01-08.tar.gz
1f01a14a1afe8d32177aceba043ccfe04ea2d7574edd662c2caaade306b9d880  cd077979ebeb81a6e85a9ba7f9c463beda1606ba.patch"
sha512sums="cb9a314ea5b38489f4cacd94d23423c25d341f5fce596dc2cd4ecc3df816ab5453a02fc81ee89dc8c7a79561e7e73c61ac85e7425e5c7f84339c1b97d34abee2  xrdp-git-2015-01-08.tar.gz
8f9ef1ab081d224cec3221c92856f16f8e743e21a5d762c4c89f671dcbb71bdd8ab2929718219e9f08f821a83b4f577f04b189305155b188b6d2cf6454df498f  cd077979ebeb81a6e85a9ba7f9c463beda1606ba.patch"