# vim: set syn=sh et ai sw=2 st=2 ts=2 tw=0:
#Packager: JRD <jrd@enialis.net>

pkgname=freerdp
pkgver=1.0.1
pkgrel=1rl
source=(https://github.com/downloads/FreeRDP/FreeRDP/$pkgname-$pkgver.tar.gz)
sourcetemplate=http://people.salixos.org/jrd/salix/$pkgname/$pkgver-\$arch-$pkgrel/
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo")
url=http://www.freerdp.com/

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (A Remote Desktop Protocol Implementation)"
"FreeRDP is a free implementation of the Remote Desktop Protocol (RDP),"
"released under the Apache license."
"Enjoy the freedom of using your software wherever you want, the way"
"you want it, in a world where interoperability can finally liberate"
"your computing experience."
)


build() {

  cd $startdir/src/$pkgname-${pkgver}/ 
  mkdir build
  cd build

  cmake \
    -DWITH_ALSA=ON \
    -DWITH_CLIENT=ON \
    -DWITH_CUNIT=OFF \
    -DWITH_CUPS=ON \
    -DWITH_DIRECTFB=OFF \
    -DWITH_FFMPEG=ON \
    -DWITH_MANPAGES=ON \
    -DWITH_NEON=OFF \
    -DWITH_PCSC=OFF \
    -DWITH_PROFILER=OFF \
    -DWITH_PULSEAUDIO=OFF \
    -DWITH_SERVER=ON \
    -DWITH_X11=ON \
    -DWITH_XCURSOR=ON \
    -DWITH_XEXT=ON \
    -DWITH_XINERAMA=ON \
    -DWITH_XKBFILE=ON \
    -DWITH_XV=ON \
    -DCMAKE_INSTALL_PREFIX=/usr \
    .. || return 1
  make -j $numjobs || return 1
  make install DESTDIR=$PKG || return 1
}