# Maintainer : Jason Plum # Copyright (C) 2012 Alejandro Mery , GPLv2+ plugrel=1 pkgname=sunxi-tools pkgver=20120716 pkgrel=1 pkgdesc="Tools for Allwinner A10 (sun4i): fex, fel, pheonix_info" arch=('arm' 'armv7h') url="https://github.com/amery/sunxi-tools" license=('GPLv2+') depends=('libusb') makedepends=('git' 'pkg-config' 'libusb') provides=('sunxi-tools') _gitroot="git://github.com/amery/sunxi-tools.git" _gitname="sunxi-tools" build() { cd $srcdir ## Git checkout if [ -d $srcdir/${_gitname} ] ; then msg "Git checkout: Updating existing tree" cd ${_gitname} && git pull msg "Git checkout: Tree has been updated" else msg "Git checkout: Retrieving sources" git clone ${_gitroot} fi msg "Checkout completed" cd ${srcdir}/${_gitname} make } package() { cd $srcdir/${_gitname} # create directory structure mkdir -p $pkgdir/usr/bin # copy binaries & readme cp fexc $pkgdir/usr/bin cp bootinfo $pkgdir/usr/bin cp fel $pkgdir/usr/bin # make symlinks for bin2fex/fex2bin cd $pkgdir/usr/bin ln -s fexc fex2bin ln -s fexc bin2fex }