# Maintainer: Dominykas Svetikas pkgname='magic-systems-of-systems-architect' pkgver='2022.2' #2022x Refresh2 pkgrel='1' pkgdesc='Powerful modeling tool based on the MagicDraw platform by No Magic' url='https://docs.nomagic.com/display/MSOSA2024xR2' arch=('any') license=('custom') depends=('java-runtime=11') makedepends=('desktop-file-utils') source=( "local://Magic_Systems_of_Systems_Architect_2022x_Refresh2_unix.sh" "installer.properties" ) sha256sums=( '2c32231cc6f0eaf5fe33eb62ea811db5684874c499eeec72d6a252db20983e1e' 'SKIP' ) build() { # Fix for "Error: Could not find or load main class com.zerog.lax.LAX" export JAVA_TOOL_OPTIONS="-Djdk.util.zip.disableZip64ExtraFieldValidation=true" # Set the JAVA_HOME environment variable export PATH="/usr/lib/jvm/java-11-openjdk/bin/:$PATH" # Move every tempdir to the source directory, including the user.home export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -Djava.io.tmpdir=$srcdir/tmp -Duser.dir=$srcdir/tmp/tmp2 -Duser.home=$srcdir" # Replace the $BUILD_PATH variable in the installer.properties file sed -e "s|\$BUILD_PATH|$PWD|" installer.properties > installer.properties.tmp # Specify the temporary directory for the installer # https://community.flexera.com/s/article/installanywhere-self-extraction-and-temp-space-requirements mkdir -p "$srcdir/tmp" export IATEMPDIR="$srcdir/tmp" # Create the required directories, otherwise warnings are generated and it fails mkdir -p "$srcdir/.local/share/applications" mkdir -p "$srcdir/magic-systems-of-systems-architect/userhome" ./Magic_Systems_of_Systems_Architect_2022x_Refresh2_unix.sh -f "$srcdir/installer.properties.tmp" -i console -l en # Update the desktop file with the correct path desktop-file-edit .local/share/applications/*.desktop --set-key=Exec --set-value="magic-systems-of-systems-architect" desktop-file-edit .local/share/applications/*.desktop --set-key=Icon --set-value="/usr/share/pixmaps/magic-systems-of-systems-architect.ico" } package() { cd "$srcdir/magic-systems-of-systems-architect" || exit 1 # Install the application install -d $pkgdir/{opt/$pkgname,usr/bin} cp -a bin certs data help lib manual mdmain.ini modelLibraries openapi plugins profiles samples templates $pkgdir/opt/$pkgname ln -s /opt/$pkgname/bin/msosa $pkgdir/usr/bin/$pkgname # TODO: Change some permissions # Install the desktop file install -d "${pkgdir}/usr/share/pixmaps" install -Dm644 $srcdir/.local/share/applications/Magic_Systems_of_Systems_Architect_2022x_Refresh2.desktop $pkgdir/usr/share/applications/$pkgname.desktop ln -s /opt/$pkgname/bin/msosa.ico "${pkgdir}/usr/share/pixmaps/$pkgname.ico" }