blob: 6450283858e68661c0cd3a100f2d7ebd7948e238 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# Maintainer: kumen
pkgname="embedded-studio-arm"
pkgver=7.32a
pkgrel=2
pkgdesc="Segger Embedded Studio for ARM"
arch=('x86_64' 'aarch64')
makedepends=()
depends=('jlink-software-and-documentation')
optdepends=()
conflicts=()
url="https://www.segger.com/products/development-tools/embedded-studio/"
license=('Commercial')
options=(!strip)
source_x86_64=("Setup_EmbeddedStudio_ARM_v${pkgver/./}_linux_x64.tar.gz::https://www.segger.com/downloads/embedded-studio/Setup_EmbeddedStudio_ARM_v${pkgver/./}_linux_x64.tar.gz")
source_aarch64=("Setup_EmbeddedStudio_ARM_v${pkgver/./}_linux_arm64.tar.gz::https://www.segger.com/downloads/embedded-studio/Setup_EmbeddedStudio_ARM_v${pkgver/./}_linux_arm64.tar.gz")
md5sums_x86_64=('a0a2bc62a1836334909108f9c0b41ef0')
md5sums_aarch64=('c0d4e41d63d740bbca2c3576ff5fae28')
prepare(){
# Delete potential previous build
rm -rf embedded-studio-arm
# Change src path name
case ${CARCH} in
"x86_64")
mv arm_segger_embedded_studio_v${pkgver/./}_linux_x64 embedded-studio-arm
;;
"aarch64")
mv arm_segger_embedded_studio_v${pkgver/./}_linux_arm64 embedded-studio-arm
;;
esac
}
package() {
install -dm 755 "${pkgdir}/opt/SEGGER/Embedded-Studio-ARM" \
"${pkgdir}/usr/share/licenses/${pkgname}" \
"${pkgdir}/usr/bin/" \
msg2 'Installing Embedded Studio ARM'
"$srcdir"/embedded-studio-arm/install_segger_embedded_studio --copy-files-to ${pkgdir}/opt/SEGGER/Embedded-Studio-ARM/ --accept-license --no-upgrade
msg2 'Redirect library build directory to cache directory'
rmdir "${pkgdir}/opt/SEGGER/Embedded-Studio-ARM/lib"
install -dm 777 "${pkgdir}/var/cache/${pkgname}/lib/"
ln -s /var/cache/${pkgname}/lib "${pkgdir}/opt/SEGGER/Embedded-Studio-ARM/lib"
msg2 'Instalation of binary files'
ln -s /opt/SEGGER/Embedded-Studio-ARM/bin/emStudio "${pkgdir}/usr/bin/emStudio-ARM"
ln -s /opt/SEGGER/Embedded-Studio-ARM/bin/emBuild "${pkgdir}/usr/bin/emBuild-ARM"
msg2 'Installing desktop shortcut and icon'
install -Dm 644 "${pkgdir}/opt/SEGGER/Embedded-Studio-ARM/bin/StudioIcon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
install -Dm 644 /dev/stdin "$pkgdir/usr/share/applications/${pkgname}.desktop" <<END
[Desktop Entry]
Name=ARM Embedded Studio
Comment=Embedded Studio for ARM
GenericName=Embedded Studio ARM
Exec=env GDK_BACKEND=x11 emStudio-ARM %F
Icon=embedded-studio-arm
Path=/opt/SEGGER/Embedded-Studio-ARM/bin
Terminal=false
StartupNotify=true
Type=Application
Categories=Development
END
msg2 'Instalation of license file'
ln -s /opt/SEGGER/Embedded-Studio-ARM/html/License.htm "${pkgdir}/usr/share/licenses/${pkgname}/"
}
#
# makepkg --printsrcinfo > .SRCINFO
#
# vim: set ts=8 sw=8 tw=0 noet:
|