1. # Maintainer: Igor Nemilentsev <trezorg dog gmail.com>   ### You are the maintainer of this package
  2. # Contributor: Miroslaw "firestarter" Wojtylak mwojtylak@gmail.com
  3. # Based on PKGBUILD from Dan Zwell <dzwell@zwell.net>
  4.  
  5. pkgname=btrfs-progs-git
  6. pkgver=20100930
  7. pkgrel=1
  8. pkgdesc="Btrfs filesystem utilities"
  9. arch=("i686" "x86_64")
  10. url="http://btrfs.wiki.kernel.org/index.php/Main_Page"
  11. license=('GPL')
  12. depends=('e2fsprogs')
  13. makedepends=('git')
  14. provides=('btrfs-progs')
  15. conflicts=('btrfs-progs')   ### btrfs-progs-unstable isn't needed in "conflicts=()" either
  16. install="btrfs-progs-git.install"
  17.  
  18. _gitroot="git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs-unstable.git"
  19. _gitname="btrfs-progs-unstable"
  20.  
  21. build() {   ### removed the unnecessary quotes from the whole function
  22.   msg "Connecting to GIT server...."   ### no need to cd to "$srcdir" - we are already there
  23.  
  24.   if [[ -d $_gitname ]]; then
  25.     cd $_gitname && git pull origin
  26.     cd ..   ### simplicity
  27.     msg "The local files are updated."
  28.   else
  29.     git clone $_gitroot $_gitname
  30.   fi
  31.  
  32.   msg "GIT checkout done or server timeout"
  33.   msg "Starting make..."
  34.  
  35.   rm -rf ${_gitname}-build
  36.   cp -a $_gitname ${_gitname}-build
  37.   cd ${_gitname}-build
  38.  
  39.   make all convert
  40. }
  41.  
  42. package() {
  43.   cd $_gitname-build   ### no need to cd to "$srcdir" - we are already there
  44.   make DESTDIR="$pkgdir" prefix=/usr bindir=/sbin mandir=/usr/share/man install
  45.  
  46.   install -Dm644 INSTALL "$pkgdir/usr/share/doc/btrfs/README"   ### simplicity
  47.   ln -sf "$pkgdir"/sbin/{btrfsck,fsck.btrfs}   ### simplicity
  48. }
  49.  
  50. # vim:set ts=2 sw=2 et: