summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumencz2023-06-13 20:48:47 +0200
committerkumencz2023-06-13 20:48:47 +0200
commitd94faab71e2b52b49fd266aa6e78676d43d6527b (patch)
tree19ec0f54259e3a8a1febf893d363cbc004524d2c
parent931a49d8b7fdda955e7518ee99628841c5a91541 (diff)
downloadaur-d94faab71e2b52b49fd266aa6e78676d43d6527b.tar.gz
[updpkg]: stm32cubemonitor 1.6.0
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD44
2 files changed, 34 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 94961da7b866..0e90ea37d034 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = stm32cubemonitor
pkgdesc = Graphical software for helping debug and diagnose STM32 applications while they are running by reading and displaying their variables in real-time
- pkgver = 1.5.0
+ pkgver = 1.6.0
pkgrel = 1
url = https://www.st.com/en/development-tools/stm32cubemonitor.html
arch = x86_64
@@ -15,7 +15,7 @@ pkgbase = stm32cubemonitor
depends = util-linux-libs
depends = stlink
options = !strip
- source = en.STM32CubeMon-lin-v1-5-0-1.5.0.zip::https://www.st.com/content/ccc/resource/technical/software/sw_development_suite/group0/3d/f2/e5/71/fd/e4/4b/a0/STM32CubeMon-lin-v1-5-0/files/STM32CubeMon-lin-v1-5-0.zip/jcr:content/translations/en.STM32CubeMon-lin-v1-5-0.zip
- sha256sums = dbae7b62b58aa2d4806844fdc94d2e73cb27577f5d2583f383151f1d2235689b
+ source = en.stm32cubemon-lin-v-1-6-0.zip::https://www.st.com/content/ccc/resource/technical/software/sw_development_suite/group0/7d/b8/22/d5/6c/2b/43/4b/stm32cubemon-lin-v-1-6-0/files/stm32cubemon-lin-v-1-6-0.zip/jcr:content/translations/en.stm32cubemon-lin-v-1-6-0.zip
+ sha256sums = 0c1da67414bb84117c43950d082e3cca44634b3ccfe59327f96ab52d472b6663
pkgname = stm32cubemonitor
diff --git a/PKGBUILD b/PKGBUILD
index 482821cdb65f..18f54cb07633 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,10 @@
+# Maintainer: kumen
# Maintainer: yjun <jerrysteve1101 at gmail dot com>
pkgname=stm32cubemonitor
-# _pkgname=STM32CubeMonitor
_pkgname=STM32CubeMon
-pkgver=1.5.0
+_pkg_file_name=en.stm32cubemon-lin-v-1-6-0.zip
+pkgver=1.6.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')
@@ -12,15 +13,28 @@ 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')
-# get New _pkg_index_url
-#
-_pkg_index_url="3d/f2/e5/71/fd/e4/4b/a0"
-_pkg_file_name=${_pkgname}-lin-v${pkgver//./-}
-# _pkg_file_name=${_pkgname}_lin_v${pkgver//./-}
-# _pkg_file_name=${_pkgname}-Lin
-#_pkg_file_name=${_pkgname}-Lin_v${pkgver//./-}
-source=("en.${_pkg_file_name}-${pkgver}.zip::https://www.st.com/content/ccc/resource/technical/software/sw_development_suite/group0/${_pkg_index_url}/${_pkg_file_name}/files/${_pkg_file_name}.zip/jcr:content/translations/en.${_pkg_file_name}.zip")
-sha256sums=('dbae7b62b58aa2d4806844fdc94d2e73cb27577f5d2583f383151f1d2235689b')
+
+# 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")"
+_curl_req="$(grep -m 1 "${_pkg_file_name}" <<< "$_curl_req")"
+_download_path="https://www.st.com""$(awk -F'"' '{print $4}' <<< "$_curl_req")"
+
+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=('0c1da67414bb84117c43950d082e3cca44634b3ccfe59327f96ab52d472b6663')
# Extracted Files from ${_pkg_file_name}
# ├── driver
@@ -36,7 +50,7 @@ sha256sums=('dbae7b62b58aa2d4806844fdc94d2e73cb27577f5d2583f383151f1d2235689b')
prepare() {
install -dm755 build
- bsdtar -xf ${srcdir}/STM32CubeMonitor_lin/${pkgname}_${pkgver}_amd64.deb -C build
+ bsdtar -xf ${srcdir}/${pkgname}_${pkgver}_amd64.deb -C build
}
package() {
@@ -51,10 +65,14 @@ package() {
ln -fs /opt/${pkgname}/${pkgname} ${pkgdir}/usr/bin/${pkgname}
# license
- for _license in ${srcdir}/STM32CubeMonitor_lin/licenses/*
+ 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: