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

bedup pkgbuild

By: a guest on Apr 16th, 2013  |  syntax: None  |  size: 0.97 KB  |  hits: 46  |  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. # WARNING: I didn't test the package this built.
  2. pkgname=bedup-git
  3. pkgver=20130303
  4. pkgrel=1
  5. pkgdesc="Deduplication for Btrfs filesystems"
  6. arch=('i686' 'x86_64')
  7. url="https://github.com/g2p/bedup"
  8. license=('GPL2')
  9. depends=(python python-cffi btrfs-progs python-sqlalchemy python-xdg)
  10. makedepends=('git')
  11.  
  12. _gitroot=git://github.com/g2p/bedup.git
  13. _gitname=bedup
  14.  
  15. build() {
  16.   cd "$srcdir"
  17.   msg "Connecting to GIT server...."
  18.  
  19.   if [[ -d "$_gitname" ]]; then
  20.     cd "$_gitname" && git pull origin
  21.     msg "The local files are updated."
  22.   else
  23.     git clone "$_gitroot" "$_gitname"
  24.   fi
  25.  
  26.   msg "GIT checkout done or server timeout"
  27.   msg "Starting build..."
  28.  
  29.   rm -rf "$srcdir/$_gitname-build"
  30.   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
  31.   cd "$srcdir/$_gitname-build"
  32.   #
  33.   # BUILD HERE
  34.   #
  35.   git submodule update --init
  36.  
  37. }
  38.  
  39. package() {
  40.   cd "$srcdir/$_gitname-build"
  41.   python setup.py install --prefix=/usr --root="$pkgdir" || return 1
  42. }