summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumen2020-02-27 00:11:42 +0100
committerkumen2020-02-27 00:11:42 +0100
commitc85a3afc31440ed7868fab8328529e20b4e5b6bd (patch)
tree52ddb5802c9804bee4a83097dd7720976ea4a3a0
parent5c95cb67ffa9e0cebd24a9c1063a08c834f09f9d (diff)
downloadaur-c85a3afc31440ed7868fab8328529e20b4e5b6bd.tar.gz
Jlink udev rules group changed to "uucp" and installation of them disabled by default.
-rw-r--r--.SRCINFO8
-rw-r--r--99-jlink.rules.patch15
-rw-r--r--PKGBUILD71
3 files changed, 54 insertions, 40 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7358a9297ce..6b3d5e017bc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = stm32cubeide
pkgdesc = Integrated Development Environment for STM32
pkgver = 1.3.0
- pkgrel = 1
+ pkgrel = 2
url = https://www.st.com/en/development-tools/stm32cubeide.html
arch = x86_64
license = Commercial
@@ -9,14 +9,16 @@ pkgbase = stm32cubeide
depends = java-runtime
depends = jlink-software-and-documentation
depends = ncurses5-compat-libs
- depends = lib32-glibc
+ depends = glibc
depends = libusb
- optdepends = stlink
+ conflicts = truestudio
options = !strip
source = local://en.st-stm32cubeide_1.3.0_5720_20200220_1053_amd64.sh.zip
source = stm32cubeide.desktop
+ source = 99-jlink.rules.patch
sha256sums = 7ee5b50075d178cc84530b4eed353cba55c894bce619800462e5238f042a38c4
sha256sums = 1f8684115576ba36cd8019810cc1fbb027197bb866c1b448aa2e3a0f174b3c3a
+ sha256sums = 0f3f69f7c980a701bf814e94595f5acb51a5d91be76b74e5b632220cfb0e7bb3
pkgname = stm32cubeide
diff --git a/99-jlink.rules.patch b/99-jlink.rules.patch
new file mode 100644
index 00000000000..96830f35f3f
--- /dev/null
+++ b/99-jlink.rules.patch
@@ -0,0 +1,15 @@
+--- 99-jlink_old.rules 2020-02-26 23:36:03.499118779 +0100
++++ 99-jlink.rules 2020-02-26 23:36:22.939301687 +0100
+@@ -353,9 +353,9 @@
+ # Make sure that VCOM ports of J-Links can be opened with user rights
+ # We simply say that all devices from SEGGER which are in the "tty" domain are enumerated with normal user == R/W
+ #
+-SUBSYSTEM=="tty", ATTRS{idVendor}=="1366", MODE="0666", GROUP="dialout"
+-SUBSYSTEM=="tty", ATTRS{idVendor}=="c251", MODE="0666", GROUP="dialout"
+-SUBSYSTEM=="tty", ATTRS{idVendor}=="0d28", MODE="0666", GROUP="dialout"
++SUBSYSTEM=="tty", ATTRS{idVendor}=="1366", MODE="0666", GROUP="uucp"
++SUBSYSTEM=="tty", ATTRS{idVendor}=="c251", MODE="0666", GROUP="uucp"
++SUBSYSTEM=="tty", ATTRS{idVendor}=="0d28", MODE="0666", GROUP="uucp"
+ #
+ # End of list
+ #
diff --git a/PKGBUILD b/PKGBUILD
index d578867a59c..23e0bb3773c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,13 +5,13 @@ pkgname="stm32cubeide"
pkgver=1.3.0
_pkgver_ext="$pkgver"_5720_20200220_1053
_pkg_file_name=en.st-stm32cubeide_${_pkgver_ext}_amd64.sh.zip
-pkgrel=1
+pkgrel=2
pkgdesc="Integrated Development Environment for STM32"
arch=("x86_64")
makedepends=('xdg-user-dirs')
-depends=('java-runtime' 'jlink-software-and-documentation' 'ncurses5-compat-libs' 'lib32-glibc' 'libusb')
-optdepends=('stlink')
-conflicts=()
+depends=('java-runtime' 'jlink-software-and-documentation' 'ncurses5-compat-libs' 'glibc' 'libusb')
+optdepends=()
+conflicts=('truestudio')
url="https://www.st.com/en/development-tools/stm32cubeide.html"
license=('Commercial')
options=(!strip)
@@ -29,59 +29,56 @@ if [ ! -f ${PWD}/${_pkg_file_name} ]; then
fi
source=("local://${_pkg_file_name}"
- $pkgname.desktop)
+ $pkgname.desktop
+ "99-jlink.rules.patch")
sha256sums=('7ee5b50075d178cc84530b4eed353cba55c894bce619800462e5238f042a38c4'
- '1f8684115576ba36cd8019810cc1fbb027197bb866c1b448aa2e3a0f174b3c3a')
+ '1f8684115576ba36cd8019810cc1fbb027197bb866c1b448aa2e3a0f174b3c3a'
+ '0f3f69f7c980a701bf814e94595f5acb51a5d91be76b74e5b632220cfb0e7bb3')
prepare(){
- cd "$srcdir"
- mkdir build
- sh st-stm32cubeide_${_pkgver_ext}_amd64.sh --quiet --noexec --nox11 --target ./build
-
- cd build
- mkdir stlink-server
- sh st-stlink-server.*.install.sh --quiet --noexec --nox11 --target ./stlink-server
-
- mkdir stlink-udev
- sh st-stlink-udev-rules-*-linux-noarch.sh --quiet --noexec --nox11 --target ./stlink-udev
-
- mkdir jlink-udev
- sh segger-jlink-udev-rules-*-linux-noarch.sh --quiet --noexec --nox11 --target ./jlink-udev
+ mkdir -p build
+ sh "${srcdir}/"st-stm32cubeide_${_pkgver_ext}_amd64.sh --quiet --noexec --nox11 --target "${srcdir}/build"
+
+ mkdir -p "${srcdir}/build/stlink-server"
+ sh "${srcdir}/build/"st-stlink-server.*.install.sh --quiet --noexec --nox11 --target "${srcdir}/build/stlink-server"
+
+ mkdir -p "${srcdir}/build/stlink-udev"
+ sh "${srcdir}/build/"st-stlink-udev-rules-*-linux-noarch.sh --quiet --noexec --nox11 --target "${srcdir}/build/stlink-udev"
+
+ mkdir -p "${srcdir}/build/jlink-udev"
+ sh "${srcdir}/build/"segger-jlink-udev-rules-*-linux-noarch.sh --quiet --noexec --nox11 --target "${srcdir}/build/jlink-udev"
}
package() {
cd "$srcdir"
-
+
msg2 'Installing STM32CubeIDE'
- mkdir -p "${pkgdir}/opt/${pkgname}"
+ install -d -m755 "${pkgdir}/opt/${pkgname}"
tar zxf "./build/st-stm32cubeide_${_pkgver_ext}_amd64.tar.gz" -C "${pkgdir}/opt/${pkgname}"
-
+
msg2 'Installing stlink server'
install -d -m755 "${pkgdir}/usr/bin/"
cp "${srcdir}/build/stlink-server/stlink-server" "${pkgdir}/usr/bin/"
chmod 0755 "${pkgdir}/usr/bin/stlink-server"
chown root:root "${pkgdir}/usr/bin/stlink-server"
-
+
#msg2 'Instalation of STlink udev rules skipped'
msg2 'Installing STlink udev rules'
install -d -m755 "${pkgdir}/etc/udev/rules.d/"
- cd "$srcdir/build/stlink-udev"
- tar zxf st-stlink-udev-rules-*-linux-all.tar.gz
- cd "${pkgdir}/"
- gzip -dc "$srcdir/build/stlink-udev/st-stlink-udev-rules.sw" | tar -xpf -
-
- #msg2 'Instalation of JLink udev rules skipped'
- msg2 'Installing JLink udev rules'
- cd "${pkgdir}/etc/udev/rules.d/"
- tar zxf "$srcdir/build/jlink-udev/makeself_payload.tar.gz" "./etc/udev/rules.d/99-jlink.rules"
-
- msg2 'Installing desktop shortcuts'
- cd "$srcdir"
+ tar zxf "$srcdir/build/stlink-udev/"st-stlink-udev-rules-*-linux-all.tar.gz -C "$srcdir/build/stlink-udev"
+ gzip -dc "$srcdir/build/stlink-udev/st-stlink-udev-rules.sw" | tar -xpf - -C "${pkgdir}/"
+
+ msg2 'Instalation of JLink udev rules skipped'
+ #msg2 'Installing JLink udev rules'
+ #tar zxf "$srcdir/build/jlink-udev/makeself_payload.tar.gz" -C "${pkgdir}/etc/udev/rules.d/" --strip-components 4
+ #patch -i "${srcdir}/99-jlink.rules.patch" "${pkgdir}/etc/udev/rules.d/99-jlink.rules"
+
+ msg2 'Installing desktop shortcuts'
install -Dm644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
-
+
#msg2 'Cleaning build folder'
#rm -rf "${srcdir}/build"
-
+
msg2 'Prevent automatical ${pkgname}.desktop file replacement by not functional one'
rm ${pkgdir}/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.ide_*/resources/project_importer/linux/mimetype/stm32cubeide.desktop.template
}