From 39a80448781e6a98be8756d71a4a567dba5e143f Mon Sep 17 00:00:00 2001 From: taotieren Date: Fri, 28 Oct 2022 22:03:53 +0800 Subject: [PATCH 1/2] Add mfgtools-git --- archlinuxcn/mfgtools-git/.gitignore | 2 + archlinuxcn/mfgtools-git/PKGBUILD | 49 ++++++++++++++++++++++ archlinuxcn/mfgtools-git/lilac.yaml | 14 +++++++ archlinuxcn/mfgtools-git/uuu-complete.bash | 5 +++ 4 files changed, 70 insertions(+) create mode 100644 archlinuxcn/mfgtools-git/.gitignore create mode 100644 archlinuxcn/mfgtools-git/PKGBUILD create mode 100644 archlinuxcn/mfgtools-git/lilac.yaml create mode 100644 archlinuxcn/mfgtools-git/uuu-complete.bash diff --git a/archlinuxcn/mfgtools-git/.gitignore b/archlinuxcn/mfgtools-git/.gitignore new file mode 100644 index 000000000000..37bb465dc2db --- /dev/null +++ b/archlinuxcn/mfgtools-git/.gitignore @@ -0,0 +1,2 @@ +* +*.* diff --git a/archlinuxcn/mfgtools-git/PKGBUILD b/archlinuxcn/mfgtools-git/PKGBUILD new file mode 100644 index 000000000000..e1740da02e50 --- /dev/null +++ b/archlinuxcn/mfgtools-git/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: taotieren + +pkgname=mfgtools-git +pkgver=1.5.4.r2.gf7aaaae +pkgrel=1 +epoch= +pkgdesc="uuu (Universal Update Utility), mfgtools 3.0. Freescale/NXP I.MX Chip image deploy tools." +arch=('x86_64') +url="https://github.com/NXPmicro/mfgtools" +license=('BSD') +groups=() +depends=('bzip2' 'zlib' 'libusb' 'libzip' 'openssl') +makedepends=('cmake' 'git') +checkdepends=() +optdepends=() +provides=('uuu' 'mfgtool') +conflicts=(${pkgname%-git}) +replaces=() +backup=() +options=('!strip') +install= +changelog= +source=("${pkgname%-git}::git+${url}.git" + "uuu-complete.bash") +noextract=() +sha256sums=('SKIP' + 'ffc8e32655ce574a4719c85c5c9a3530a5ec619e933fc801a291df8ec506a442') +#validpgpkeys=() + +pkgver() { + cd "${srcdir}/${pkgname%-git}" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/uuu_//g' | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "${srcdir}/${pkgname%-git}" + cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release + make -C build +} + +package() { + cd "${srcdir}/${pkgname%-git}/build" + make DESTDIR="$pkgdir/" install + install -Dm0644 "${srcdir}/uuu-complete.bash" "${pkgdir}/etc/bash_completion.d/uuu-complete.bash" + install -Dm0644 "${srcdir}/${pkgname%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE" + install -dm0755 "${pkgdir}/etc/udev/rules.d/" + ./uuu/uuu -udev > "${pkgdir}/etc/udev/rules.d/70-uuu.rules" + +} diff --git a/archlinuxcn/mfgtools-git/lilac.yaml b/archlinuxcn/mfgtools-git/lilac.yaml new file mode 100644 index 000000000000..97f976feeb83 --- /dev/null +++ b/archlinuxcn/mfgtools-git/lilac.yaml @@ -0,0 +1,14 @@ +maintainers: + - github: taotieren + +build_prefix: extra-x86_64 + +pre_build: vcs_update + +post_build_script: | + git_pkgbuild_commit() + update_aur_repo() + +update_on: + - source: github + github: NXPmicro/mfgtools diff --git a/archlinuxcn/mfgtools-git/uuu-complete.bash b/archlinuxcn/mfgtools-git/uuu-complete.bash new file mode 100644 index 000000000000..83723ad2e8d5 --- /dev/null +++ b/archlinuxcn/mfgtools-git/uuu-complete.bash @@ -0,0 +1,5 @@ +_uuu_autocomplete() +{ + COMPREPLY=($(/usr/bin/uuu $1 $2 $3)) +} +complete -o nospace -F _uuu_autocomplete uuu From d99ec53c3773e378272d4a40aa931e61e1298055 Mon Sep 17 00:00:00 2001 From: taotieren Date: Mon, 31 Oct 2022 14:12:23 +0800 Subject: [PATCH 2/2] Delete .gitignore --- archlinuxcn/mfgtools-git/.gitignore | 2 - archlinuxcn/mfgtools-git/PKGBUILD | 61 ++++++++++++++++++++++------- 2 files changed, 46 insertions(+), 17 deletions(-) delete mode 100644 archlinuxcn/mfgtools-git/.gitignore diff --git a/archlinuxcn/mfgtools-git/.gitignore b/archlinuxcn/mfgtools-git/.gitignore deleted file mode 100644 index 37bb465dc2db..000000000000 --- a/archlinuxcn/mfgtools-git/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -*.* diff --git a/archlinuxcn/mfgtools-git/PKGBUILD b/archlinuxcn/mfgtools-git/PKGBUILD index e1740da02e50..df614d80c356 100644 --- a/archlinuxcn/mfgtools-git/PKGBUILD +++ b/archlinuxcn/mfgtools-git/PKGBUILD @@ -1,49 +1,80 @@ # Maintainer: taotieren -pkgname=mfgtools-git -pkgver=1.5.4.r2.gf7aaaae +pkgbase=mfgtools-git +pkgname=(mfgtools{,-doc}-git) +pkgver=1.5.109.r9.gd669525 pkgrel=1 epoch= pkgdesc="uuu (Universal Update Utility), mfgtools 3.0. Freescale/NXP I.MX Chip image deploy tools." -arch=('x86_64') -url="https://github.com/NXPmicro/mfgtools" +arch=('x86_64' 'aarch64') +url="https://github.com/nxp-imx/mfgtools" license=('BSD') groups=() depends=('bzip2' 'zlib' 'libusb' 'libzip' 'openssl') -makedepends=('cmake' 'git') +makedepends=('cmake' 'git' 'ninja') checkdepends=() optdepends=() -provides=('uuu' 'mfgtool') -conflicts=(${pkgname%-git}) replaces=() backup=() options=('!strip') install= changelog= -source=("${pkgname%-git}::git+${url}.git" - "uuu-complete.bash") +source=("${pkgbase%-git}::git+${url}.git" + "${pkgbase%-git}-doc::git+${url}.wiki.git" + "uuu-complete.bash") noextract=() sha256sums=('SKIP' + 'SKIP' 'ffc8e32655ce574a4719c85c5c9a3530a5ec619e933fc801a291df8ec506a442') #validpgpkeys=() pkgver() { - cd "${srcdir}/${pkgname%-git}" + cd "${srcdir}/${pkgbase%-git}" git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/uuu_//g' | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } +# prepare() { +# cd "${srcdir}/${pkgbase%-git}" +# git submodule update --init --recursive +# } + build() { - cd "${srcdir}/${pkgname%-git}" - cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release - make -C build + cd "${srcdir}/${pkgbase%-git}" + cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=None \ + -GNinja + + ninja -C build } -package() { +package_mfgtools-git() { + provides=('uuu' 'mfgtool') + conflicts=(${pkgname%-git}) + cd "${srcdir}/${pkgname%-git}/build" - make DESTDIR="$pkgdir/" install + DESTDIR="$pkgdir/" ninja -C "${srcdir}/${pkgname%-git}/build" install install -Dm0644 "${srcdir}/uuu-complete.bash" "${pkgdir}/etc/bash_completion.d/uuu-complete.bash" install -Dm0644 "${srcdir}/${pkgname%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE" install -dm0755 "${pkgdir}/etc/udev/rules.d/" ./uuu/uuu -udev > "${pkgdir}/etc/udev/rules.d/70-uuu.rules" +} + +package_mfgtools-doc-git() { + pkgdesc+=" (doc)" + depends=(asciidoc + dblatex + findutils + coreutils) + provides=(${pkgname%-git}) + conflicts=(${pkgname%-git}) + + cd "${srcdir}/${pkgname%-git}/" + find . -type f -name "*.asciidoc" -exec sh -c 'mv "$0" "${0%.asciidoc}"' {} \; + sed -i 's|=====|====|g' Release-Notes + echo "" > UUU-docinfo.xml + git log -n25 --reverse --format="format:%h%cd%an%s" >> UUU-docinfo.xml + echo "" >> UUU-docinfo.xml + a2x -L -a docinfo UUU + install -Dm0644 "${srcdir}/${pkgname%-git}/UUU.pdf" -t "${pkgdir}/usr/doc/${pkgname%-git}/" }