Commit 59d4cb0c authored by Clayton Craft's avatar Clayton Craft Committed by Michał Polański
Browse files

testing/nxp-mfgtools: modernize, fix build

This fixes linting issues in the APKBUILD, and updates it to use current
Alpine packaging conventions.

A patch is also included that fixes building this package on arm. The
patch is merged upstream, but is not yet in a stable release.
parent b2482b47
From db1953a5def7494a8254c3f07ee25c7836ae3e2a Mon Sep 17 00:00:00 2001
From: Alexander Sack <asac@pantacor.com>
Date: Fri, 12 Feb 2021 12:53:43 +0100
Subject: [PATCH] fails to build on alpine arm32v6'; fix adding interpreter to
uuu/gen_txt_include.sh
---
uuu/gen_txt_include.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/uuu/gen_txt_include.sh b/uuu/gen_txt_include.sh
index 608954f..ea727c6 100755
--- a/uuu/gen_txt_include.sh
+++ b/uuu/gen_txt_include.sh
@@ -1,3 +1,5 @@
+#!/bin/sh
+
echo "R\"####(" > $2
cat $1 >> $2
echo ")####\"" >> $2
--
2.31.1
# Contributor: Olliver Schinagl <oliver@schinagl.nl>
# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
pkgname="nxp-mfgtools"
pkgver="1.4.43"
pkgname=nxp-mfgtools
pkgver=1.4.43
pkgrel=0
pkgdesc="Freescale/NXP i.MX Chip image deploy tools"
url="https://github.com/boundarydevices/imx_usb_loader"
url="https://github.com/NXPmicro/mfgtools"
arch="all"
license="LGPL-2.1-only"
options="!check" # No tests available
subpackages="${pkgname}-uuu:_uuu lib${pkgname}-dev"
subpackages="$pkgname-uuu:_uuu lib$pkgname-static lib$pkgname-dev"
makedepends="cmake libusb-dev bzip2-dev libzip-dev openssl-dev"
source="https://github.com/NXPmicro/mfgtools/archive/uuu_${pkgver}.tar.gz"
builddir="${srcdir}/mfgtools-uuu_${pkgver}/"
source="https://github.com/NXPmicro/mfgtools/archive/uuu_$pkgver.tar.gz
0001-fails-to-build-on-alpine-arm32v6-fix-adding-interpre.patch
"
builddir="$srcdir/mfgtools-uuu_$pkgver/"
prepare() {
echo "${pkgver}" > "${builddir}/.tarball-version"
default_prepare
echo "$pkgver" > "$builddir/.tarball-version"
}
build() {
cmake -B "${builddir}/build" \
-DCMAKE_INSTALL_PREFIX="/usr"
cmake --build "${builddir}/build"
cmake -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
}
package() {
depends="${subpackages}"
depends="$subpackages"
DESTDIR="${pkgdir}" cmake --build "${builddir}/build" --target install
DESTDIR="$pkgdir" cmake --install build
install -D -m 0644 -t "${pkgdir}/usr/lib/" \
"${builddir}/build/libuuu/libuuc_s.a"
install -D -m 0644 -t "${pkgdir}/usr/include/" \
"${builddir}/libuuu/libuuu.h"
install -Dm644 build/libuuu/libuuc_s.a "$pkgdir/usr/lib/libuuc_s.a"
install -Dm644 libuuu/libuuu.h "$pkgdir/usr/lib/libuuu.h"
}
_uuu() {
mkdir -p "${subpkgdir}/usr/bin"
mv "${pkgdir}/usr/bin/uuu" "${subpkgdir}/usr/bin/"
amove usr/bin/uuu
}
sha512sums="c00fb6809e03026b396a5a250dac78c2337377c02d86e9075d39e2f655d0844a633b1008a2f930bcb23ac3821bedf11705bfb46a1f6984382cf4f395a063753e uuu_1.4.43.tar.gz"
sha512sums="
c00fb6809e03026b396a5a250dac78c2337377c02d86e9075d39e2f655d0844a633b1008a2f930bcb23ac3821bedf11705bfb46a1f6984382cf4f395a063753e uuu_1.4.43.tar.gz
52293c2ddbb20c3c1b19256f3c6c987b5a43b230ce6da5bae5b6f932d8af27b0cee5b1654cff4b896000bb7f52c78be66ade856f8e95a726e845c0b7d9a6bc6d 0001-fails-to-build-on-alpine-arm32v6-fix-adding-interpre.patch
"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment