Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mfgtools-git #2988

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions archlinuxcn/mfgtools-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Maintainer: taotieren <[email protected]>

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' 'aarch64')
url="https://github.com/nxp-imx/mfgtools"
license=('BSD')
groups=()
depends=('bzip2' 'zlib' 'libusb' 'libzip' 'openssl')
makedepends=('cmake' 'git' 'ninja')
checkdepends=()
optdepends=()
replaces=()
backup=()
options=('!strip')
install=
changelog=
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}/${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}/${pkgbase%-git}"
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None \
-GNinja

ninja -C build
}
Comment on lines +41 to +48
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

==> Starting build()...
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at libuuu/CMakeLists.txt:65:
  Syntax Warning in cmake code at column 159

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Deprecation Warning at libuuu/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Found BZip2: /usr/lib/libbz2.so (found version "1.0.8")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.1.0")
-- Checking for module 'libusb-1.0>=1.0.16'
--   Found libusb-1.0, version 1.0.27
-- Checking for module 'libzstd'
--   Found libzstd, version 1.5.5
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Checking for module 'tinyxml2'
--   Package 'tinyxml2', required by 'virtual:world', not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:619 (message):
  The following required packages were not found:

   - tinyxml2

Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:841 (_pkg_check_modules_internal)
  libuuu/CMakeLists.txt:12 (pkg_check_modules)


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().


package_mfgtools-git() {
provides=('uuu' 'mfgtool')
conflicts=(${pkgname%-git})

cd "${srcdir}/${pkgname%-git}/build"
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 "<revhistory>" > UUU-docinfo.xml
git log -n25 --reverse --format="format:<revision><revnumber>%h</revnumber><date>%cd</date><authorinitials>%an</authorinitials><revremark>%s</revremark></revision>" >> UUU-docinfo.xml
echo "</revhistory>" >> UUU-docinfo.xml
a2x -L -a docinfo UUU

install -Dm0644 "${srcdir}/${pkgname%-git}/UUU.pdf" -t "${pkgdir}/usr/doc/${pkgname%-git}/"
}
14 changes: 14 additions & 0 deletions archlinuxcn/mfgtools-git/lilac.yaml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions archlinuxcn/mfgtools-git/uuu-complete.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_uuu_autocomplete()
{
COMPREPLY=($(/usr/bin/uuu $1 $2 $3))
}
complete -o nospace -F _uuu_autocomplete uuu
Loading