diff options
author | kumencz | 2023-02-15 01:20:38 +0100 |
---|---|---|
committer | kumencz | 2023-02-15 01:20:38 +0100 |
commit | 3cafaa19ecab678d34f8cedeae8c47ae3ec50a67 (patch) | |
tree | dc84572d6c6ddb3e5f4af525c3ce2cfd124a0045 | |
parent | 194ab0c8d8213861021ecc22180953ad02d7c9bb (diff) | |
download | aur-3cafaa19ecab678d34f8cedeae8c47ae3ec50a67.tar.gz |
Direct download link added, license file link updated
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 37 |
2 files changed, 28 insertions, 15 deletions
@@ -1,7 +1,7 @@ pkgbase = stm32cubeide pkgdesc = Integrated Development Environment for STM32 pkgver = 1.11.2 - pkgrel = 1 + pkgrel = 2 url = https://www.st.com/en/development-tools/stm32cubeide.html arch = x86_64 license = Commercial @@ -14,8 +14,8 @@ pkgbase = stm32cubeide optdepends = jlink-software-and-documentation optdepends = stlink options = !strip - source = local://en.st-stm32cubeide_1.11.2_14494_20230119_0724.unsigned_amd64.sh.zip - source = https://www.st.com/resource/en/license_agreement/dm00218346.pdf + source = en.st-stm32cubeide_1.11.2_14494_20230119_0724.unsigned_amd64.sh.zip::https://www.st.com/content/ccc/resource/technical/software/sw_development_suite/group0/4f/23/be/c2/85/05/45/16/stm32cubeide_lnx/files/st-stm32cubeide_1.11.2_14494_20230119_0724.unsigned_amd64.sh.zip/jcr:content/translations/en.st-stm32cubeide_1.11.2_14494_20230119_0724.unsigned_amd64.sh.zip + source = https://www.st.com/resource/en/license/SLA0048_STM32CubeIDE.pdf sha256sums = 86043ab98b5f0ee54ad50b23148a47a635881f4c616e6face9dba7b6133d51f4 sha256sums = SKIP @@ -5,7 +5,7 @@ pkgname="stm32cubeide" pkgver=1.11.2 _pkgver_ext=1.11.2_14494_20230119_0724.unsigned _pkg_file_name=en.st-stm32cubeide_1.11.2_14494_20230119_0724.unsigned_amd64.sh.zip -pkgrel=1 +pkgrel=2 pkgdesc="Integrated Development Environment for STM32" arch=("x86_64") makedepends=('imagemagick') @@ -16,20 +16,33 @@ url="https://www.st.com/en/development-tools/stm32cubeide.html" license=('Commercial') options=(!strip) -if [ ! -f ${PWD}/${_pkg_file_name} ]; then - msg2 "" - msg2 "Package not found!" - msg2 "The ${pkgname} can be downloaded here: ${url}" - msg2 "Please remember to put a downloaded package ${_pkg_file_name} into the build directory before build here: ${PWD}" - msg2 "" -fi - -source=("local://${_pkg_file_name}" +# Big thanks to user "yjun" for direct download link advice. +# 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-ides/stm32cubeide/_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" # "99-jlink.rules.patch" - "https://www.st.com/resource/en/license_agreement/dm00218346.pdf") + "https://www.st.com/resource/en/license/SLA0048_STM32CubeIDE.pdf" + ) sha256sums=('86043ab98b5f0ee54ad50b23148a47a635881f4c616e6face9dba7b6133d51f4' # '0f3f69f7c980a701bf814e94595f5acb51a5d91be76b74e5b632220cfb0e7bb3' - 'SKIP') + 'SKIP' +) prepare(){ mkdir -p build |