Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

ARCH_XRDP-GIT_PKGBUILD

By: a guest on Feb 22nd, 2013  |  syntax: Bash  |  size: 1.59 KB  |  views: 193  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Contributor: Tau Tsao <realturner at gmail.com>
  2. pkgname=xrdp-git
  3. pkgver=20130220
  4. pkgrel=1
  5. pkgdesc="An open source remote desktop protocol(rdp) server - GIT version"
  6. url="https://github.com/FreeRDP/xrdp"
  7. arch=('i686' 'x86_64')
  8. license=('GPL')
  9. groups=()
  10. depends=('tigervnc')
  11. makedepends=('git' 'autoconf' 'automake' 'libtool')
  12. provides=()
  13. conflicts=()
  14. replaces=()
  15. backup=()
  16. options=()
  17. source=()
  18. noextract=()
  19. md5sums=()
  20.  
  21. _gitroot="git://github.com/FreeRDP/xrdp.git"
  22. _gitname=xrdp
  23.  
  24. build() {
  25.   cd "$srcdir"
  26.   msg "Connecting to GIT server...."
  27.  
  28.   if [ -d $srcdir/$_gitname ] ; then
  29.     cd $srcdir/$_gitname && git pull origin
  30.     msg "The local files are updated."
  31.   else
  32.     git clone $_gitroot $_gitname
  33.   fi
  34.  
  35.   msg "GIT checkout done or server timeout"
  36.  
  37.   msg "Starting make..."
  38.  
  39.   rm -rf ${srcdir}/$_gitname-build
  40.   cp -a ${srcdir}/$_gitname{,-build}
  41.   cd ${srcdir}/$_gitname-build
  42.  
  43.   #
  44.   # BUILD HERE
  45.   #
  46.  
  47.   sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac
  48.   ./bootstrap
  49.   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  50.   make || return 1
  51. }
  52.  
  53. package() {
  54.   cd ${srcdir}/$_gitname-build
  55.   make DESTDIR=${pkgdir} install || return 1
  56.   cd ${pkgdir}/etc
  57.   mkdir rc.d/
  58.   ln -s ../xrdp/xrdp.sh rc.d/rdpd
  59.   sed -i 's|/usr/local/|/usr/|'  xrdp/xrdp.sh
  60.   cd ${pkgdir}
  61.   mkdir -p usr/lib/systemd/system
  62.   cp ${srcdir}/$_gitname-build/instfiles/*.service usr/lib/systemd/system
  63.   sed -i 's|/sysconfig/xrdp|/xrdp/xrdp.ini|' usr/lib/systemd/system/xrdp.service
  64.   sed -i 's|/sysconfig/xrdp|/xrdp/xrdp.ini|' usr/lib/systemd/system/xrdp-sesman.service
  65. }