# Maintainer: Igor Nemilentsev <trezorg dog gmail.com> ### You are the maintainer of this package
# Contributor: Miroslaw "firestarter" Wojtylak mwojtylak@gmail.com
# Based on PKGBUILD from Dan Zwell <dzwell@zwell.net>
pkgname=btrfs-progs-git
pkgver=20100930
pkgrel=1
pkgdesc="Btrfs filesystem utilities"
arch=("i686" "x86_64")
url="http://btrfs.wiki.kernel.org/index.php/Main_Page"
license=('GPL')
depends=('e2fsprogs')
makedepends=('git')
provides=('btrfs-progs')
conflicts=('btrfs-progs') ### btrfs-progs-unstable isn't needed in "conflicts=()" either
install="btrfs-progs-git.install"
_gitroot="git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs-unstable.git"
_gitname="btrfs-progs-unstable"
build() { ### removed the unnecessary quotes from the whole function
msg "Connecting to GIT server...." ### no need to cd to "$srcdir" - we are already there
if [[ -d $_gitname ]]; then
cd $_gitname && git pull origin
cd .. ### simplicity
msg "The local files are updated."
else
git clone $_gitroot $_gitname
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf ${_gitname}-build
cp -a $_gitname ${_gitname}-build
cd ${_gitname}-build
make all convert
}
package() {
cd $_gitname-build ### no need to cd to "$srcdir" - we are already there
make DESTDIR="$pkgdir" prefix=/usr bindir=/sbin mandir=/usr/share/man install
install -Dm644 INSTALL "$pkgdir/usr/share/doc/btrfs/README" ### simplicity
ln -sf "$pkgdir"/sbin/{btrfsck,fsck.btrfs} ### simplicity
}
# vim:set ts=2 sw=2 et: