# $Id: PKGBUILD 186036 2013-05-20 18:09:21Z andyrtr $ # Maintainer: AndyRTR # Contributor: Gerhard Brauer # Contributor: Richard Murri # Contributor: Markus Opitz # Contributor: Milan Knížek pkgname=x2goserver pkgver=4.0.0.2 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' 'perl-file-basedir' '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 revert.patch) md5sums=('6b8cecfdd31a8877203f50d3666c265f' 'f76081c01e40b6206895d194dc949707' 'c487c31e7c0aa9a73323313007497764') build() { cd "${srcdir}/${pkgname}-${pkgver}" # revert an upstream commit that breaks sessions showing up # http://code.x2go.org/gitweb?p=x2goserver.git;a=commitdiff;h=011d14ae076ba6fec96cd1e019c4f82444ab0f9f patch -Rp1 -i ${srcdir}/revert.patch # -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 -j1 PREFIX=/usr SBINDIR=/usr/bin 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 770 $pkgdir/var/lib/x2go install -dm 770 $pkgdir/var/spool/x2go # load fuse module at system start install -dm755 $pkgdir/lib/modules-load.d echo "fuse" > $pkgdir/lib/modules-load.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" }