summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cf414cd9e7d957a3d933d9b0a383532d7cf40a1a (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
# Maintainer: KafCoppelia <k740677208@gmail.com>

# BUILD INSTRUCTIONS:
#
# 1. Go to https://softwaretools.infineon.com/tools/com.ifx.tb.tool.modustoolboxpackmachinelearning and login with your Infineon account.
# 2. Click on "Download" and download the current version
# 3. Download the .deb package and place it in the same directory as the PKGBUILD
# 4. Build

_pkgname=ModusToolbox
pkgname=modustoolbox-machine-learning-pack
_pkgver=2.0
pkgver=${_pkgver}.0.444
pkgrel=1
pkgdesc="Enables you to use ModusToolbox Machine Learning tools and assets for all model deployment and validation within the ModusToolbox environment."
arch=('x86_64')
license=("LicenseRef-${pkgname}")
depends=( 'libxcb' 'freetype2' 'libcups' 'xcb-util-keysyms' 'libx11' 'libglvnd' 'libxkbcommon' 'libxkbcommon-x11' 'xcb-util-wm' 'glib2' 'openssl-1.1'   \
    'wayland' 'fontconfig' 'dbus' 'glibc' 'libdrm' 'xcb-util-wm' 'xcb-util-image' 'xcb-util-renderutil' 'qt5-base' 'qt5-svg' 'ncurses5-compat-libs'     \
    'libxcomposite')
_url_package_name="modustoolboxpackmachinelearning"
url="https://softwaretools.infineon.com/tools/com.ifx.tb.tool.${_url_package_name}"
_source="${_url_package_name}_${pkgver}_Linux_x64.deb"
source=("file://${_source}")
sha256sums=('dcfa71c5e377ef2480ffea546a1305372fe0e7e9888ba0be9838820b4def8c2c')
options=('!strip')


prepare() {
    cd ${srcdir}
    bsdtar -xf data.tar.gz -C ./
    rm data.tar.gz
    mv ./opt/Tools/${_pkgname} ./opt/${_pkgname}
    # Remove the empty directory
    rm -r ./opt/Tools
    # Update link in desktop files
    find ./usr/share/applications/ -name "*.desktop" -exec sed -i "s/opt\/Tools/opt/" {} +
}

package() {
    cd ${srcdir}

    _install_dir=${pkgdir}/opt/${_pkgname}

    install -d ${_install_dir}
    cp -ar ${srcdir}/opt/${_pkgname}/* ${_install_dir}
    cp -ar ${srcdir}/usr ${pkgdir}/

    # Install license
    install -d ${pkgdir}/usr/share/licenses/${pkgname}
    install -Dm644 ${srcdir}/usr/share/doc/ModusToolbox-Machine-Learning-Pack-${pkgver%.*}/LICENSE -t ${pkgdir}/usr/share/licenses/${pkgname}/
}