PKGBUILDs/alarm/sunxi-tools/PKGBUILD

68 lines
1.5 KiB
Bash
Raw Normal View History

# Maintainer : Jason Plum <jplum@archlinuxarm.org>
# Copyright (C) 2012 Alejandro Mery <amery@geeks.cl>, GPLv2+
pkgname=sunxi-tools
2014-01-20 23:18:17 +00:00
pkgver=20140120
pkgrel=1
2014-01-20 23:18:17 +00:00
pkgdesc="Tools for Allwinner SoC family: fex, fel, pheonix_info"
arch=('arm' 'armv7h')
2014-01-20 23:18:17 +00:00
url="https://github.com/linux-sunxi/sunxi-tools"
license=('GPLv2+')
depends=('libusb')
makedepends=('git' 'pkg-config' 'libusb')
provides=('sunxi-tools')
_gitroot="git://github.com/linux-sunxi/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"
2013-02-02 01:12:21 +00:00
git clone --depth 1 ${_gitroot}
fi
msg "Checkout completed"
cd ${srcdir}/${_gitname}
make
}
package() {
cd $srcdir/${_gitname}
2014-01-20 23:18:17 +00:00
# install README & LICENSE
install -Dm 644 README $pkgdir/usr/share/doc/$pkgname/README
install -Dm 644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
# create directory structure
mkdir -p $pkgdir/usr/bin
2014-01-20 23:18:17 +00:00
# copy binaries
cp fexc $pkgdir/usr/bin
cp bootinfo $pkgdir/usr/bin
cp fel $pkgdir/usr/bin
2014-01-20 23:18:17 +00:00
cp usb-boot $pkgdir/usr/bin
cp fel-pio $pkgdir/usr/bin
cp fel-gpio $pkgdir/usr/bin
cp fel-sdboot $pkgdir/usr/bin
2013-02-02 01:12:21 +00:00
cp pio $pkgdir/usr/bin
cp nand-part $pkgdir/usr/bin
2014-01-20 23:18:17 +00:00
cp jtag-loop.sunxi $pkgdir/usr/bin
cp phoenix_info $pkgdir/usr/bin
# make symlinks for bin2fex/fex2bin
cd $pkgdir/usr/bin
ln -s fexc fex2bin
2014-01-20 23:18:17 +00:00
ln -s fexc bin2fex
}