# Maintainer: kumen # Maintainer: yjun pkgname=stm32cubemonitor _pkgname=STM32CubeMon _pkg_file_name=en.stm32cubemon-lin-v-1-8-0.zip pkgver=1.8.0 pkgrel=1 pkgdesc="Graphical software for helping debug and diagnose STM32 applications while they are running by reading and displaying their variables in real-time" arch=('x86_64') url="https://www.st.com/en/development-tools/stm32cubemonitor.html" license=('custom:SLA0048') # package stlink provides stlink udev files depends=('gtk3' 'nss' 'libxss' 'libnotify' 'libxtst' 'xdg-utils' 'at-spi2-core' 'util-linux-libs' 'stlink') options=('!strip') # cURL inspiration from davinci-resolve package maintained by "Alex S". _curl_useragent="User-Agent: Mozilla/5.0 (X11; Linux ${CARCH}) \ AppleWebKit/537.36 (KHTML, like Gecko) \ Chrome/77.0.3865.75 \ Safari/537.36" _curl_useragent="$(printf '%s' "$_curl_useragent" | sed 's/[[:space:]]\+/ /g')" _useragent_escaped="${_curl_useragent// /\\ }" _curl_req_url="https://www.st.com/content/st_com_cx/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-performance-and-debuggers/stm32cubemonitor/_jcr_content/get-software/get-software-table-body.nocache.html/st-site-cx/components/containers/product/get-software-table-body.html" _curl_req="$(curl -s --compressed -H "$_curl_useragent" "$_curl_req_url")" _pkg_url="$(grep -m 1 "${_pkg_file_name}" <<< "$_curl_req")" _pkg_url="$(awk -F'"' '{print $4}' <<< "$_pkg_url")" _download_path="https://www.st.com""$_pkg_url" DLAGENTS=("https::/usr/bin/curl \ -gqb '' --retry 3 --retry-delay 3 \ -H ${_useragent_escaped} \ -o %o --compressed %u") source=("${_pkg_file_name}"::"$_download_path") sha256sums=('6964b9a02ce0bf6c142246c8c40659a032e2df76652e73e48e77f770666506bb') prepare() { install -dm755 build bsdtar -xf ${srcdir}/${pkgname}_${pkgver}_amd64.deb -C build } package() { tar -xf build/data.tar.xz -C ${pkgdir} install -dm755 ${pkgdir}/opt mv ${pkgdir}/usr/lib/${pkgname} ${pkgdir}/opt rm -rf ${pkgdir}/usr/lib rm -rf ${pkgdir}/usr/share/lintian # soft link ln -fs /opt/${pkgname}/${pkgname} ${pkgdir}/usr/bin/${pkgname} # license for _license in ${srcdir}/licenses/* do install -Dm644 "${_license}" -t ${pkgdir}/usr/share/licenses/${pkgname}/ done } # # makepkg --printsrcinfo > .SRCINFO # # vim: set sw=2 ts=2 et: