Skip to content

Instantly share code, notes, and snippets.

@jpkotta
Created January 21, 2020 20:50
Show Gist options
  • Save jpkotta/1bb56a2bf16c0f88a4ef12e3a1b454e1 to your computer and use it in GitHub Desktop.
Save jpkotta/1bb56a2bf16c0f88a4ef12e3a1b454e1 to your computer and use it in GitHub Desktop.
mfgtools PKGBUILD
# Maintainer: Theowhy <[email protected]>
# 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