summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoryjun2020-09-29 15:58:13 +0800
committeryjun2020-09-29 15:58:13 +0800
commitec035d083933153715eabc584f220ee8295fe131 (patch)
tree6ce1de1718f60e8e19d72f1bf65557779d948dfe
parent39f9e0bbf0fca1cfc90fbf47a2690ff2ffc9d37a (diff)
downloadaur-ec035d083933153715eabc584f220ee8295fe131.tar.gz
added src check function
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD17
2 files changed, 16 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 02a20c6b5148..7714d7003c7b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
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.0.0
- pkgrel = 1
+ pkgrel = 2
url = https://my.st.com/content/my_st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-performance-and-debuggers/stm32cubemonitor.html
arch = x86_64
license = custom
diff --git a/PKGBUILD b/PKGBUILD
index 4556a43c4fc2..898a50c835f3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=stm32cubemonitor
pkgver=1.0.0
-pkgrel=1
+pkgrel=2
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://my.st.com/content/my_st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-performance-and-debuggers/stm32cubemonitor.html"
@@ -11,9 +11,22 @@ depends=('gtk3' 'nodejs' 'nss' 'libxss' 'libnotify' 'libxtst' 'xdg-utils' 'at-sp
provides=("${pkgname}-bin")
conflicts=("${pkgname}-bin")
options=('!strip')
-source=('local://en.STM32CubeMonitor_lin.zip')
+_pkg_file_name=en.STM32CubeMonitor_lin.zip
+source=("local://${_pkg_file_name}")
sha256sums=('d82c5282b8d3f64c68b58426bacd1b2139e3984bdb6df6262d3efa67712c9dfd')
+_DOWNLOADS_DIR=`xdg-user-dir DOWNLOAD`
+if [ ! -f ${PWD}/${_pkg_file_name} ]; then
+ if [ -f $_DOWNLOADS_DIR/${_pkg_file_name} ]; then
+ ln -sfn $_DOWNLOADS_DIR/${_pkg_file_name} ${PWD}
+ else
+ msg2 ""
+ msg2 "The package can be downloaded here: "
+ msg2 "Please remember to put a downloaded package ${_pkg_file_name} into the build directory ${PWD} or $_DOWNLOADS_DIR"
+ msg2 ""
+ fi
+fi
+
prepare() {
install -dm755 build
bsdtar -xf STM32CubeMonitor_lin/${pkgname}_${pkgver}_amd64.deb -C build