Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Dec 13th, 2012  |  syntax: Bash  |  size: 1.59 KB  |  hits: 137  |  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. # Maintainer: speps <speps at aur dot archlinux dot org>
  2.  
  3. pkgname=lgi-git
  4. pkgver=20121213
  5. pkgrel=1
  6. pkgdesc="Lua binadings for gnome/gobject using gobject-introspection library."
  7. arch=(i686 x86_64)
  8. url="https://github.com/pavouk/lgi"
  9. license=('custom:MIT')
  10. depends=('lua' 'gobject-introspection')
  11. makedepends=('git')
  12. optdepends=('clidebugger: dump-typelib tool')
  13. provides=('lgi')
  14. conflicts=('lgi')
  15.  
  16. _gitroot="https://github.com/pavouk/lgi.git"
  17. _gitname="lgi"
  18.  
  19. build() {
  20.   cd "$srcdir"
  21.   msg "Connecting to GIT server...."
  22.  
  23.   if [ -d $_gitname ] ; then
  24.     cd $_gitname && git pull origin
  25.     msg "The local files are updated."
  26.   else
  27.     git clone $_gitroot $_gitname
  28.   fi
  29.  
  30.   msg "GIT checkout done or server timeout"
  31.   msg "Starting make..."
  32.  
  33.   rm -rf "$srcdir/$_gitname-build"
  34.   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  35.   cd "$srcdir/$_gitname-build"
  36.  
  37.   #
  38.   # BUILD HERE
  39.   #
  40.  
  41.   sed -i 's|5.1|5.2|g' lgi/Makefile
  42.   make PREFIX=/usr
  43. }
  44.  
  45. package() {
  46.   cd "$srcdir/$_gitname-build"
  47.  
  48.   make PREFIX=/usr DESTDIR="$pkgdir/" install
  49.  
  50.   # dump typelib tool
  51.   install -Dm755 tools/dump-typelib.lua \
  52.     "$pkgdir/usr/bin/dump-typelib"
  53.  
  54.   # docs
  55.   install -d "$pkgdir/usr/share/doc/lgi"
  56.   install -Dm644 docs/* \
  57.     "$pkgdir/usr/share/doc/lgi"
  58.  
  59.   # samples
  60.   install -d "$pkgdir/usr/share/lgi/samples/gtk-demo"
  61.   install -Dm644 samples/*.lua \
  62.     "$pkgdir/usr/share/lgi/samples"
  63.   install -Dm644 samples/gtk-demo/* \
  64.     "$pkgdir/usr/share/lgi/samples/gtk-demo"
  65.  
  66.   # license
  67.   install -Dm644 LICENSE \
  68.     "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  69. }