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

Untitled

By: a guest on Dec 20th, 2011  |  syntax: Bash  |  size: 1.80 KB  |  views: 154  |  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. pkgname=virt-manager-git
  2. _pkgname=virt-manager
  3. pkgver=20111220
  4. pkgrel=1
  5. pkgdesc="A desktop user interface for managing virtual machines."
  6. arch=('any')
  7. url="http://virt-manager.et.redhat.com"
  8. license=('GPL')
  9. depends=('dbus-python' 'libvirt' 'libxml2' 'vte' 'virtinst-git' 'gtk-vnc' 'rarian' 'gconf'
  10.          'yajl' 'librsvg' 'python2' 'python2-gconf')
  11. makedepends=('gnome-doc-utils' 'intltool>=0.35.0' 'git')
  12. optdepends=('x11-ssh-askpass: for ssh authentication to remote servers'
  13.             'libuser: for virt-manager-tui'
  14.             'python2-ipy: for virt-manager-tui'
  15.             'newt-syrup: for virt-manager-tui')
  16. install=virt-manager.install
  17. conflicts=('virt-manager')
  18. provides=('virt-manager')
  19.  
  20. _gitroot=git://git.fedorahosted.org/git/virt-manager.git
  21. _gitname=virt-manager
  22.  
  23. build() {
  24.   cd $srcdir
  25.  
  26.   msg "Connecting to GIT server...."
  27.  
  28.   if [[ -d "$_gitname" ]]; then
  29.     cd "$_gitname" && git pull origin
  30.     msg "The local files are updated."
  31.   else
  32.     git clone "$_gitroot" "$_gitname-build"
  33.   fi
  34.  
  35.   msg "GIT checkout done or server timeout"
  36.   msg "Starting build..."
  37.  
  38.   cd $_gitname-build
  39.   export LDFLAGS=-lX11
  40.   ./autogen.sh
  41.   sed -i 's#python#python2#' src/virt-manager.in src/virt-manager-tui.in
  42.   ./configure --prefix=/usr \
  43.         --sysconfdir=/etc \
  44.         --libexec=/usr/lib/$_pkgname \
  45.         --localstatedir=/var
  46.   make
  47. }
  48.  
  49. package() {
  50.   cd "$srcdir/$_gitname-build"
  51.   make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=$pkgdir install
  52.   # Set-up schema file in correct location
  53.   install -m755 -d $pkgdir/usr/share/gconf/schemas
  54.   gconf-merge-schema \
  55.         $pkgdir/usr/share/gconf/schemas/$_pkgname.schemas \
  56.         $pkgdir/etc/gconf/schemas/*.schemas
  57.   rm -rf $pkgdir/etc/gconf/schemas
  58.   rmdir --ignore-fail-on-non-empty $pkgdir/etc/gconf $pkgdir/etc
  59. }