summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD105
1 files changed, 21 insertions, 84 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 7f3bb7f113a2..2ab68c9ab22a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,25 @@
# Maintainer: Alexei Colin <ac@alexeicolin.com>
pkgname=zephyr-sdk
-pkgver=0.12.4
+pkgver=0.16.5
pkgrel=1
pkgdesc="SDK for Zephyr real-time operating system"
arch=('x86_64')
url="https://www.zephyrproject.org/"
license=('Apache')
-# Some of these are dependencies of Zephyr RTOS, but instructions for Zephyr
-# tell user to pip install, so let's add them here instead. (See
-# zephyr/scripts/requirements.txt in Zephyr distribution)
-# Missing (not packaged for Arch): junit2html, canopen, sphinx-tabs
-depends=('python-breathe>=4.9.1' 'python-docutils>=0.14'
- 'python-pyaml>=5.1'
- 'python-ply>=3.10' 'python-pip' 'python-setuptools' 'python-wheel'
- 'python-pyelftools>=0.24' 'python-pyserial' 'python-pykwalify'
- 'python-pillow' 'python-anytree' 'python-intelhex' 'python-packaging'
- 'python-progress' 'python-pyserial' 'python-cbor' 'python-psutil'
- 'python-pytest' 'python-colorama'
- 'python-coverage' 'gcovr'
- 'python-sphinx>=1.7.5' 'python-sphinx_rtd_theme'
- 'python-sphinxcontrib-svg2pdfconverter' 'python-tabulate'
- 'python-west>=0.7.2'
- 'git-spindle' 'gitlint' 'ninja' 'gperf' 'gcovr' 'ccache'
- 'doxygen' 'dfu-util' 'dtc' 'cmake>=3.8.2')
-optdepends=('pyocd: programming and debugging ARM MCUs')
-makedepends=('patchelf')
-_installer=zephyr-sdk-${pkgver}-x86_64-linux-setup.run
-source=("https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${pkgver}/${_installer}"
+depends=('cmake' 'ninja' 'gperf' 'ccache' 'dfu-util' 'dtc'
+ 'python-pip' 'python-pyelftools' 'python-setuptools' 'python-wheel'
+ 'tk' 'xz')
+optdepends=('pyocd: programming and debugging ARM MCUs'
+ 'python-west: Zephyr RTOS Project meta-tool')
+makedepends=('patchelf' 'wget')
+source=("https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${pkgver}/zephyr-sdk-${pkgver}_linux-x86_64.tar.xz"
"zephyrrc"
)
+sha256sums=('eb4495e2e04387c822f8482be116a8f4ab3d1d2bfc1c1aeb53ca67937acf0009'
+ '7a1257272c64bdec281283d391e3149cece065935c9e8394d6bece32d0f6fc05')
+
options=(!strip)
install=$pkgname.install
@@ -42,64 +31,20 @@ build() {
cd "$srcdir"
}
-# Matches per-toolchain commands in $_installdir/setup.sh
-_TC_CMD="tar -C \\\$target_sdk_dir \\(-[A-Za-z0-9]\\+\\)* .\/__TC__.tar.bz2.*"
-
-_list_toolchains() {
- echo $(sed -n "s@^$(echo $_TC_CMD | sed 's/__TC__/\\(.*\\)/g')@\2@p" $1 \
- | grep -v cmake | sort)
-}
-
package ()
{
cd "$srcdir"
- mkdir -p $pkgdir/$_installdir
- echo ">>> Running installer...."
- sh ${_installer} --target $pkgdir/$_installdir --nochown --noexec --keep -- -d $pkgdir/$_installdir
+ mkdir -p $pkgdir/opt
+ echo ">>> Unpacking...."
+ cp -a $srcdir/zephyr-sdk-$pkgver $pkgdir/$_installdir
# Add a flag to not relocate executables, because the path to pkgdir is invalid after installation
# -R disables relocation, -S saves the relocation script so that it can be run manually.
- sed -i 's#^\(\./zephyr-sdk-x86_64-hosttools-standalone-[0-9.]\+sh\)#\1 -R -S#' $pkgdir/$_installdir/$_setupsh
-
- # Install hosttools always, but let the toolchains be selectable below:
- ALL_TOOLCHAINS=($(_list_toolchains $pkgdir/$_installdir/$_setupsh))
- echo ">>> To select a subset of toolchains set TOOLCHAINS in environment, like so:"
- echo ">>> TOOLCHAINS='arm.x86_64 arm64.x86_64' makepkg"
- echo ">>> Available toolchains: ${ALL_TOOLCHAINS[*]}"
-
- # Validate selected toolchains
- if [ ! -z "$TOOLCHAINS" ]
- then
- TOOLCHAINS=(${TOOLCHAINS}) # convert to array
-
- for tc in "${TOOLCHAINS[@]}"
- do
- if ! echo "${ALL_TOOLCHAINS[@]}" | grep -q -w "$tc"
- then
- echo ">>> ERROR: unknown toolchain: $tc"
- exit 1
- fi
- done
- else
- TOOLCHAINS=("${ALL_TOOLCHAINS[@]}")
- fi
- echo ">>> Selected toolchains: ${TOOLCHAINS[*]}"
-
- for tc in ${ALL_TOOLCHAINS[@]}
- do
- if ! echo "${TOOLCHAINS[@]}" | grep -q -w "$tc"
- then
- DISABLED_TOOLCHAINS+=("$tc")
- fi
- done
-
- for tc in ${DISABLED_TOOLCHAINS[@]}
- do
- sed -i "/$(echo $_TC_CMD | sed s/__TC__/${tc}/g)/,+3d" $pkgdir/$_installdir/$_setupsh
- done
-
- echo ">>> Installing toolchains: $(_list_toolchains $pkgdir/$_installdir/$_setupsh)"
+ sed -i 's#\(\./zephyr-sdk-\${HOSTTYPE}-hosttools-standalone-[0-9.]\+sh\)#\1 -R -S#' $pkgdir/$_installdir/$_setupsh
+
+ # Disables sanboxing on systems where libseccomp is available
+ sed -i 's/xargs -n100 file/xargs -n100 file -S/' $pkgdir/$_installdir/zephyr-sdk-x86_64-hosttools-standalone-*.sh
install -Dm644 zephyrrc $pkgdir/usr/share/zephyr-sdk/zephyrrc
@@ -107,7 +52,7 @@ package ()
######### NOTE: we are in $_installdir after this point
- ./$_setupsh -d $pkgdir/$_installdir -norc -nocmake -y
+ ./$_setupsh -h -t all
# Manually install the CMake module, because upstream paths are no good:
# file installed into $HOME and path is the package build path. Upstream
@@ -118,18 +63,13 @@ package ()
mkdir -p "$_cmake_module_path"
echo "/$_installdir" > "$_cmake_module_path/${_cmake_fname}"
- echo ">>>"
- echo ">>> Ignore the environment variable values printed above, instead do this:"
- echo ">>> cp /usr/share/zephyr-sdk/zephyrrc ~/.zephyrrc"
- echo ">>>"
-
# Strip package build path from prefix path
sed -i "s@\(relocate_sdk.py\s\+\)${pkgdir}/${_installdir} ${pkgdir}/${_installdir}@\1 /${_installdir} /${_installdir}@g" relocate_sdk.sh
./relocate_sdk.sh
rm zephyr-sdk-*-hosttools-standalone-*.sh
- rm "${ALL_TOOLCHAINS[@]/%/.tar.bz2}"
- rm -f mips.tar.bz2 # workaround: mips is part of archive but not in setup.sh
+ rm relocate_sdk.{py,sh}
+ rm setup.sh
}
# Manual test procedure: get Zephyr Kernel, build an example, and run in Qemu:
@@ -159,6 +99,3 @@ package ()
# Hello World! qemu_cortex_a53
# More info: https://docs.zephyrproject.org/latest/getting_started/index.html
-
-sha256sums=('5382df7c47b63b4a259004270f27211d20de1a612c25fde5c97af6864383879c'
- '7a1257272c64bdec281283d391e3149cece065935c9e8394d6bece32d0f6fc05')