Package Details: azure-sphere-sdk 22.11-1

Git Clone URL: https://aur.archlinux.org/azure-sphere-sdk.git (read-only, click to copy)
Package Base: azure-sphere-sdk
Description: Azure Sphere SDK Preview for Linux
Upstream URL: https://aka.ms/AzureSphereSDK
Licenses: custom
Submitter: felipebalbi
Maintainer: None
Last Packager: felipebalbi
Votes: 2
Popularity: 0.000000
First Submitted: 2019-12-11 12:37 (UTC)
Last Updated: 2023-03-07 10:49 (UTC)

Dependencies (8)

Required by (0)

Sources (3)

Latest Comments

1 2 3 Next › Last »

felipebalbi commented on 2022-03-14 16:36 (UTC)

Hi @kiko283,

That's perfect :-) I was going to write a minimal guide, but you got it :-)

Thanks

kiko283 commented on 2022-03-14 07:56 (UTC) (edited on 2022-03-14 08:36 (UTC) by kiko283)

@felipebalbi, sure man, once I learn how to create patches :D

Edit - Is this it:

From ba91dcf7b3ea8575ede376232933706c7a84d466 Mon Sep 17 00:00:00 2001
From: Kristijan Kovilevski <kristijan@digitalnode.com>
Date: Mon, 14 Mar 2022 09:18:59 +0100
Subject: [PATCH] update version to 22.02, add tools v2

---
.SRCINFO                  |  8 ++++----
PKGBUILD                  | 30 +++++++++++++++++++++---------
azure-sphere-sdk.sysusers |  2 +-
3 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 008e6b8..c349c0d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = azure-sphere-sdk
    pkgdesc = Azure Sphere SDK Preview for Linux
-   pkgver = 21.10
+   pkgver = 22.02
    pkgrel = 1
    url = https://aka.ms/AzureSphereSDK
    install = azure-sphere-sdk.install
@@ -16,11 +16,11 @@ pkgbase = azure-sphere-sdk
    optdepends = code: for software development
    options = !strip
    options = staticlibs
-   source = azure-sphere-sdk-21.10.tar.gz::https://software-download.microsoft.com/download/pr/Azure_Sphere_SDK_Bundle_2110.tar.gz
+   source = azure-sphere-sdk-22.02.tar.gz::https://software-download.microsoft.com/download/pr/Azure_Sphere_SDK_Bundle_2202.tar.gz
    source = azure-sphere-sdk.udev
    source = azure-sphere-sdk.sysusers
-   sha256sums = 669edd6d4985231607cb637b484c60a460abe1d075b8a9ee1a8e3dc3deabd7c4
+   sha256sums = 13d9d754c2afc125e57ca743d54d545759907ec925b1eff5001da2d6840af25f
    sha256sums = 649ec04bdd0c052838bf3364fdd32313264891c4f7f60039cb644ef79c3c589f
-   sha256sums = 323c5e51b6bcf92c7e024cfd6bd6843cb57531317c6ef887b1bced81e920d43e
+   sha256sums = 0afb48362c9684940c02d45136998267cbda7196ce04ab9933687f82165af9d4

pkgname = azure-sphere-sdk
diff --git a/PKGBUILD b/PKGBUILD
index f8b757a..ced1308 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Felipe Balbi <felipe.balbi@microsoft.com>
pkgname=azure-sphere-sdk
-pkgmajor=21
-pkgminor=10
+pkgmajor=22
+pkgminor=02
pkgver=${pkgmajor}.${pkgminor}
pkgrel=1
pkgdesc="Azure Sphere SDK Preview for Linux"
@@ -21,9 +21,9 @@ options=(!strip staticlibs)
source=("${pkgname}-${pkgver}.tar.gz::https://software-download.microsoft.com/download/pr/Azure_Sphere_SDK_Bundle_${pkgmajor}${pkgminor}.tar.gz"
        "azure-sphere-sdk.udev"
        "azure-sphere-sdk.sysusers")
-sha256sums=('669edd6d4985231607cb637b484c60a460abe1d075b8a9ee1a8e3dc3deabd7c4'
+sha256sums=('13d9d754c2afc125e57ca743d54d545759907ec925b1eff5001da2d6840af25f'
            '649ec04bdd0c052838bf3364fdd32313264891c4f7f60039cb644ef79c3c589f'
-            '323c5e51b6bcf92c7e024cfd6bd6843cb57531317c6ef887b1bced81e920d43e')
+            '0afb48362c9684940c02d45136998267cbda7196ce04ab9933687f82165af9d4')

prepare() {
tar -zxf "Azure_Sphere_SDK.tar.gz"
@@ -32,11 +32,18 @@ prepare() {
build() {
find "${srcdir}" -type d -exec chmod 755 {} \;
find "${srcdir}" -type f -exec chmod 644 {} \;
+
+  mkdir -p "${srcdir}"/azurespheresdk/Tools_v2
+  tar -zxf "${srcdir}"/azurespheresdk/Tools_v2_Installer/azsphere-cli-v2.tar.gz -C "${srcdir}"/azurespheresdk/Tools_v2
+  cp "${srcdir}"/azurespheresdk/Tools_v2_Installer/azsphere.completion "${srcdir}"/azurespheresdk/Tools_v2/azsphere.completion
+  rm -rf "${srcdir}"/azurespheresdk/Tools_v2_Installer
+
+  chmod 755 "${srcdir}"/azurespheresdk/Tools_v2/azsphere
chmod 755 "${srcdir}"/azurespheresdk/Tools/azsphere
chmod 755 "${srcdir}"/azurespheresdk/DeviceConnection/azsphere_slattach
chmod 755 "${srcdir}"/azurespheresdk/DeviceConnection/azsphere_connect.sh

-  for sysroot in `ls ${srcdir}/azurespheresdk/Sysroots/`; do
+  for sysroot in $(ls "${srcdir}"/azurespheresdk/Sysroots/); do
    chmod 755 "${srcdir}"/azurespheresdk/Sysroots/"${sysroot}"/tools/exp23-appsdk-linux-blanca.sh
done
}
@@ -49,13 +56,18 @@ package() {

mkdir -p "${pkgdir}"/opt/azurespheresdk

-  for DIR in BoardConfigPresets CMakeFiles DebugTools DeviceConnection HardwareDefinitions Sysroots \
-             Tools Tools_v2_Installer; do
-    cp -r "${srcdir}"/azurespheresdk/"${DIR}" "${pkgdir}"/opt/azurespheresdk
+  for DIRPATH in $(ls -d "${srcdir}"/azurespheresdk/*/); do
+    cp -r "${DIRPATH}" "${pkgdir}"/opt/azurespheresdk
done
+  echo "${pkgver}" > "${pkgdir}"/opt/azurespheresdk/VERSION

mkdir -p "${pkgdir}"/usr/bin
-  ln -s ../../opt/azurespheresdk/Tools/azsphere "${pkgdir}"/usr/bin/azsphere
+  mkdir -p "${pkgdir}"/usr/share/bash-completion/completions
+  ln -s ../../../../opt/azurespheresdk/Tools_v2/azsphere.completion \
+        "${pkgdir}"/usr/share/bash-completion/completions/azsphere
+  ln -s ../../opt/azurespheresdk/Tools/azsphere "${pkgdir}"/usr/bin/azsphere_v1
+  ln -s ../../opt/azurespheresdk/Tools_v2/azsphere "${pkgdir}"/usr/bin/azsphere_v2
+  ln -s azsphere_v2 "${pkgdir}"/usr/bin/azsphere
ln -s ../../opt/azurespheresdk/DeviceConnection/azsphere_connect.sh "${pkgdir}"/usr/bin/azsphere_connect.sh
ln -s ../../opt/azurespheresdk/DeviceConnection/azsphere_slattach "${pkgdir}"/usr/bin/azsphere_slattach
}
diff --git a/azure-sphere-sdk.sysusers b/azure-sphere-sdk.sysusers
index 0457874..7afad23 100644
--- a/azure-sphere-sdk.sysusers
+++ b/azure-sphere-sdk.sysusers
@@ -1 +1 @@
-g azuresphere - -
+g azsphere - -
-- 
2.35.1

felipebalbi commented on 2022-03-14 06:00 (UTC)

@kiko283, updated per your changes. Next time, please send a patch, so I can keep your authorship on the changes :-)

cheers

kiko283 commented on 2022-03-14 05:48 (UTC) (edited on 2022-03-14 07:54 (UTC) by kiko283)

@felipebalbi package is out of date. there is a new version of the SDK - 22.02. Also, I believe it is time that this package switches to v2 tools by default, it is preffered everywhere. I meddled a bit with the PKGBUILD and related source files, I have compiled a 22.02 with v2 tools that uses v2 by default and v1 is still available for people that may want to switch. I also modified azure-sphere-sdk.sysusers, the created group should be azsphere, not azuresphere, so I changed that too. Please have a look at my changes and if possible implement them in the update.

azure-sphere-sdk.sysusers:

g azsphere - -

PKGBUILD:

# Maintainer: Felipe Balbi <felipe.balbi@microsoft.com>
pkgname=azure-sphere-sdk
pkgmajor=22
pkgminor=02
pkgver=${pkgmajor}.${pkgminor}
pkgrel=1
pkgdesc="Azure Sphere SDK Preview for Linux"
arch=('x86_64')
url="https://aka.ms/AzureSphereSDK"
license=('custom')
depends=('cmake'
  'curl'
  'flex'
  'libmpc'
  'net-tools'
  'ninja')
install="${pkgname}".install
optdepends=('minicom: for serial communication with the Sphere board'
      'code: for software development')
options=(!strip staticlibs)
source=("${pkgname}-${pkgver}.tar.gz::https://software-download.microsoft.com/download/pr/Azure_Sphere_SDK_Bundle_${pkgmajor}${pkgminor}.tar.gz"
        "azure-sphere-sdk.udev"
        "azure-sphere-sdk.sysusers")
sha256sums=('13d9d754c2afc125e57ca743d54d545759907ec925b1eff5001da2d6840af25f'
            '649ec04bdd0c052838bf3364fdd32313264891c4f7f60039cb644ef79c3c589f'
            '0afb48362c9684940c02d45136998267cbda7196ce04ab9933687f82165af9d4')

prepare() {
  tar -zxf "Azure_Sphere_SDK.tar.gz"
}

build() {
  find "${srcdir}" -type d -exec chmod 755 {} \;
  find "${srcdir}" -type f -exec chmod 644 {} \;

  mkdir -p "${srcdir}"/azurespheresdk/Tools_v2
  tar -zxf "${srcdir}"/azurespheresdk/Tools_v2_Installer/azsphere-cli-v2.tar.gz -C "${srcdir}"/azurespheresdk/Tools_v2
  cp "${srcdir}"/azurespheresdk/Tools_v2_Installer/azsphere.completion "${srcdir}"/azurespheresdk/Tools_v2/azsphere.completion
  rm -rf "${srcdir}"/azurespheresdk/Tools_v2_Installer

  chmod 755 "${srcdir}"/azurespheresdk/Tools_v2/azsphere
  chmod 755 "${srcdir}"/azurespheresdk/Tools/azsphere
  chmod 755 "${srcdir}"/azurespheresdk/DeviceConnection/azsphere_slattach
  chmod 755 "${srcdir}"/azurespheresdk/DeviceConnection/azsphere_connect.sh

  for sysroot in $(ls "${srcdir}"/azurespheresdk/Sysroots/); do
    chmod 755 "${srcdir}"/azurespheresdk/Sysroots/"${sysroot}"/tools/exp23-appsdk-linux-blanca.sh
  done
}

package() {
  install -Dm644 "${srcdir}"/azurespheresdk/LICENSE_en-US.TXT "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE_en-US
  install -Dm644 "${srcdir}"/azurespheresdk/LICENSE_fr-FR.TXT "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE_fr-FR
  install -Dm644 "${srcdir}"/"${pkgname}".udev "${pkgdir}"/etc/udev/rules.d/75-mt3620.rules
  install -Dm644 "${srcdir}"/"${pkgname}".sysusers "${pkgdir}"/usr/lib/sysusers.d/"${pkgname}".conf

  mkdir -p "${pkgdir}"/opt/azurespheresdk

  for DIRPATH in $(ls -d "${srcdir}"/azurespheresdk/*/); do
    cp -r "${DIRPATH}" "${pkgdir}"/opt/azurespheresdk
  done
  echo "${pkgver}" > "${pkgdir}"/opt/azurespheresdk/VERSION

  mkdir -p "${pkgdir}"/usr/bin
  mkdir -p "${pkgdir}"/usr/share/bash-completion/completions
  ln -s ../../../../opt/azurespheresdk/Tools_v2/azsphere.completion \
        "${pkgdir}"/usr/share/bash-completion/completions/azsphere
  ln -s ../../opt/azurespheresdk/Tools/azsphere "${pkgdir}"/usr/bin/azsphere_v1
  ln -s ../../opt/azurespheresdk/Tools_v2/azsphere "${pkgdir}"/usr/bin/azsphere_v2
  ln -s azsphere_v2 "${pkgdir}"/usr/bin/azsphere
  ln -s ../../opt/azurespheresdk/DeviceConnection/azsphere_connect.sh "${pkgdir}"/usr/bin/azsphere_connect.sh
  ln -s ../../opt/azurespheresdk/DeviceConnection/azsphere_slattach "${pkgdir}"/usr/bin/azsphere_slattach
}

.SRCINFO:

pkgbase = azure-sphere-sdk
    pkgdesc = Azure Sphere SDK Preview for Linux
    pkgver = 22.02
    pkgrel = 1
    url = https://aka.ms/AzureSphereSDK
    install = azure-sphere-sdk.install
    arch = x86_64
    license = custom
    depends = cmake
    depends = curl
    depends = flex
    depends = libmpc
    depends = net-tools
    depends = ninja
    optdepends = minicom: for serial communication with the Sphere board
    optdepends = code: for software development
    options = !strip
    options = staticlibs
    source = azure-sphere-sdk-22.02.tar.gz::https://software-download.microsoft.com/download/pr/Azure_Sphere_SDK_Bundle_2202.tar.gz
    source = azure-sphere-sdk.udev
    source = azure-sphere-sdk.sysusers
    sha256sums = 13d9d754c2afc125e57ca743d54d545759907ec925b1eff5001da2d6840af25f
    sha256sums = 649ec04bdd0c052838bf3364fdd32313264891c4f7f60039cb644ef79c3c589f
    sha256sums = 0afb48362c9684940c02d45136998267cbda7196ce04ab9933687f82165af9d4

pkgname = azure-sphere-sdk

If anyone wants to keep using v1 tools, only one command is necessary (as root):

# ln -sf azsphere_v1 /usr/bin/azsphere

Similarly, to switch back to v2:

# ln -sf azsphere_v2 /usr/bin/azsphere

felipebalbi commented on 2022-01-27 11:53 (UTC)

@kiko283 I haven't looked into that, honestly. From what I remember, that things ships its own python "sysroot". At a minimum to run the new tool, we'd need to use that python, rather than system python.

I wish they'd just integer sphere into the regular az cli :-)

kiko283 commented on 2021-10-25 20:05 (UTC)

@felipebalbi can you provide some details on how to update to v2 ourselves if we'd like to? I can see Tools_v2_Installer dir, inside a tar.gz archive. I tried extracting the archive to Tools_v2 dir and creating symlink to that azsphere in /usr/bin/, but then azsphere show-version returns Unknown.

duapple commented on 2021-08-13 02:07 (UTC)

Thanks. @felipebalbi Microsoft is currently pushing the v2 version of the cli, and it is recommended that we use the v2 version. On windows, the old version can only run on CMD. Use powershell to run Azure Sphere CLI v2, which can support command completion and log to file. But for Linux, the old version can also achieve these functions. You can switch to the V2 version when there is a substantial update.

felipebalbi commented on 2021-07-31 14:39 (UTC)

Sure, I'll update it @duapple. I'm wondering if we should switch arch to azsphere v2. Any suggestions?

duapple commented on 2021-07-31 01:27 (UTC)

Thank you very much for solving the dependency problem of Azure Sphere SDK installation in archlinux. This is very helpful to me. Now that the version 21.07 released by Microsoft has been updated, can it support synchronization?

tkolo commented on 2020-11-03 19:21 (UTC)

Thanks for the fixes, I found no more issues so far.