diff options
Diffstat (limited to 'extra/x2goserver/PKGBUILD')
-rw-r--r-- | extra/x2goserver/PKGBUILD | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/extra/x2goserver/PKGBUILD b/extra/x2goserver/PKGBUILD new file mode 100644 index 000000000..fa620c2cf --- /dev/null +++ b/extra/x2goserver/PKGBUILD @@ -0,0 +1,66 @@ +# $Id: PKGBUILD 175061 2013-01-12 11:27:40Z andyrtr $ +# Maintainer: AndyRTR <andyrtr@archlinux.org> + +# Contributor: Gerhard Brauer <gerbra@archlinux.de> +# Contributor: Richard Murri <admin@richardmurri.com> +# Contributor: Markus Opitz <mastero23 at gmail dot com> +# Contributor: Milan Knížek <knizek@volny.cz> + +pkgname=x2goserver +pkgver=4.0.0.0 +pkgrel=2 +pkgdesc="Open source terminal server" +arch=('i686' 'x86_64') +url="http://www.x2go.org/" +license=('GPL') +depends=('openssh' 'perl-config-simple' 'perl-dbd-sqlite' 'python' 'x2go-agent' 'xorg-xauth') +makedepends=('man2html') +#optdepends=('cups-x2go: printing support') +options=('emptydirs') +install=x2goserver.install +backup=('etc/x2go/x2goserver.conf' 'etc/x2go/x2gosql/sql') +source=(http://code.x2go.org/releases/source/${pkgname}/${pkgname}-${pkgver}.tar.gz x2goserver.service) +md5sums=('1fc38566832c30897c6583e7ffa1fda3' + 'b09799f9203150dc1277a56058be48a8') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # -r option does not exist in Arch linux + # (However, html man pages do not get installed anyway...) + for Makefile in $(find . -type f -name Makefile); do + sed -i 's@(MAN2HTML_BIN) -r @(MAN2HTML_BIN) < @g' $Makefile + sed -i 's@ \$(MAN2HTML_SRC)/@ < \$(MAN2HTML_SRC)/@g' $Makefile + done + + # fix some Makefile permission options + for Makefile in $(find . -type f -name Makefile); do + sed -i "s:-o root -g root ::g" $Makefile + done + + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make PREFIX=/usr DESTDIR="$pkgdir" install + + # systemd service file - only runs x2gocleansessions + install -Dm 644 "$srcdir/x2goserver.service" "$pkgdir/usr/lib/systemd/system/x2goserver.service" + + # X2go homedir + printing spool dir + install -dm 755 $pkgdir/var/lib/x2go + install -dm 755 $pkgdir/var/spool/x2go + + # load fuse module at system start + install -dm755 $pkgdir/usr/lib/modprobe.d + echo "fuse" > $pkgdir/usr/lib/modprobe.d/x2goserver.conf + + install -dm 755 "${pkgdir}/usr/share/doc/${pkgname}" + install -m 644 "debian/changelog" "${pkgdir}/usr/share/doc/${pkgname}/changelog.DEBIAN" + install -m 644 "debian/copyright" "${pkgdir}/usr/share/doc/${pkgname}/copyright.DEBIAN" + + # cleanup unneded files/directories + rmdir $pkgdir/etc/X11/Xsession.d + rm -f $pkgdir/etc/x2go/Xresources +} |