Skip to content

Instantly share code, notes, and snippets.

@jpkotta

jpkotta/PKGBUILD

Created Jan 21, 2020
Embed
What would you like to do?
mfgtools PKGBUILD
# Maintainer: Theowhy <aur.theowhy@shizoku.fr>
# Contributor:
pkgname=mfgtools
pkgver=1.3.102
pkgrel=2
pkgdesc="Freescale/NXP I.MX Chip image deploy tools"
arch=(x86_64)
url="https://github.com/NXPmicro/mfgtools"
license=('BSD')
groups=()
depends=('bzip2' 'zlib' 'libusb' 'openssl')
makedepends=('cmake' 'git')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=History.md
source=(git+https://github.com/NXPmicro/mfgtools#tag=uuu_$pkgver uuu-complete.bash)
noextract=()
sha256sums=(SKIP SKIP)
pkgver() {
cd "$pkgname"
git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/uuu_//g'
}
build() {
cd "$pkgname"
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
make
}
package() {
cd "$pkgname/build"
make DESTDIR="$pkgdir/" install
comp_dir="$pkgdir"/etc/bash_completion.d/
install -d -m 755 "$comp_dir"
install -m 644 "$srcdir"/uuu-complete.bash "$comp_dir"/uuu-complete.bash
./uuu/uuu -udev > 99-uuu.rules
udev_dir="$pkgdir"/usr/lib/udev/rules.d/
install -d -m 755 "$udev_dir"
install -m 644 99-uuu.rules "$udev_dir"/99-uuu.rules
lic_dir="$pkgdir"/usr/share/licenses/mfgtools/
install -d -m 755 "$lic_dir"
install -m 644 ../LICENSE "$lic_dir"/LICENSE
}
_uuu_autocomplete()
{
COMPREPLY=($(/usr/bin/uuu $1 $2 $3))
}
complete -o nospace -F _uuu_autocomplete uuu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment