Package Details: umlet 15.1-1

Git Clone URL: https://aur.archlinux.org/umlet.git (read-only, click to copy)
Package Base: umlet
Description: Free UML Tool for Fast UML Diagrams (stand-alone version)
Upstream URL: https://www.umlet.com
Licenses: GPL
Submitter: Barthalion
Maintainer: SammysHP
Last Packager: SammysHP
Votes: 22
Popularity: 0.015450
First Submitted: 2018-01-06 19:22 (UTC)
Last Updated: 2023-03-31 16:20 (UTC)

Dependencies (3)

Required by (0)

Sources (3)

Latest Comments

club-mate commented on 2023-03-29 00:21 (UTC) (edited on 2023-03-29 22:02 (UTC) by club-mate)

works for me (new Version 15.1 and URL issue fix):

git clone https://aur.archlinux.org/umlet.git/

cd umlet

sed -i 's@pkgver=15.0.0@pkgver=15.1@g' PKGBUILD #new version

sed -i 's@_pkgver=15_0@_pkgver=15_1@g' PKGBUILD #new version

sed -i 's@http://www.umlet.com/@https://www.umlet.com/download/@g' PKGBUILD #url fix

sed -i 's@0d77cc21066a3f8fb7f05f671d818177@57929dbd0dd4cf11be46538af6d06007@g' PKGBUILD #new md5sum

makepkg -si

as shell script: https://github.com/club-mate/scripts/blob/master/install_umlet_15.1.sh

SammysHP commented on 2020-10-15 16:15 (UTC) (edited on 2020-10-15 16:50 (UTC) by SammysHP)

Thank you, c-meier. I'll have a look at the patches (might take some weeks).

c-meier commented on 2020-10-12 17:11 (UTC)

Hello again, I propose installing a mime-type for .uxf files. (Inspired by this issue). This modification make it so double clicking on a .uxf file opens it with UMLet.

From 33e41df40e81d5107d8dc69f04a66917a09f2e31 Mon Sep 17 00:00:00 2001
From: c-meier <dev@c-meier.ch>
Date: Mon, 12 Oct 2020 19:05:43 +0200
Subject: [PATCH 16/16] Add support for mimetype

---
 PKGBUILD      | 10 +++++++---
 umlet.desktop |  3 ++-
 umlet.xml     | 11 +++++++++++
 3 files changed, 20 insertions(+), 4 deletions(-)
 create mode 100644 umlet.xml

diff --git a/PKGBUILD b/PKGBUILD
index 70c8bae..32a909f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,14 +10,16 @@ pkgdesc="Free UML Tool for Fast UML Diagrams (stand-alone version)"
 arch=('any')
 url="https://www.umlet.com"
 license=('GPL')
-depends=('java-runtime')
+depends=('java-runtime' 'shared-mime-info' 'xdg-utils')
 makedepends=('unzip' 'patch')
 source=("http://www.umlet.com/umlet_${_pkgver}/umlet-standalone-${pkgver}.zip"
    'umlet.desktop'
-   'UMLet.sh.diff')
+   'UMLet.sh.diff'
+   'umlet.xml')
 md5sums=('1202a9f93780b2187bfcdf96f8984955'
          '4efcfeea2f54b849bc86e3f1905449be'
-         '8117f3f2bf7764d94c38ac8ca02ed279')
+         '8117f3f2bf7764d94c38ac8ca02ed279'
+         'ce49e10ddf7050d6ac820068f2dfc740')

 prepare() {
   cd "$srcdir"/Umlet
@@ -34,4 +36,6 @@ package() {
   mv "$srcdir"/Umlet "$pkgdir"/usr/share/umlet
   install -D -m644 "$srcdir"/umlet.desktop "$pkgdir"/usr/share/applications/umlet.desktop
   chmod a+x "$pkgdir"/usr/share/umlet/umlet.sh
+
+  install -Dm644 umlet.xml "$pkgdir"/usr/share/mime/packages/umlet.xml
 }
diff --git a/umlet.desktop b/umlet.desktop
index f88f02a..08d6610 100644
--- a/umlet.desktop
+++ b/umlet.desktop
@@ -4,8 +4,9 @@ Type=Application
 Name=UMLet
 GenericName=UMLet
 Comment=Free UML Tool for Fast UML Diagrams
-Exec=umlet
+Exec=umlet %f
 Icon=/usr/share/umlet/img/umlet_logo.png
 Terminal=false
 Categories=Development;
 StartupNotify=true
+MimeType=application/uxf+xml
diff --git a/umlet.xml b/umlet.xml
new file mode 100644
index 0000000..c290f36
--- /dev/null
+++ b/umlet.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+  <mime-type type="application/uxf+xml">
+    <comment xml:lang="en">Umlet uml diagram</comment>
+    <magic priority="80">
+      <match value="diagram program=&quot;umlet&quot;" type="string" offset="10:140"/>
+    </magic>
+    <icon name="umlet"/>
+    <glob pattern="*.uxf" weight="80"/>
+  </mime-type>
+</mime-info>
-- 
2.28.0

c-meier commented on 2020-10-12 16:42 (UTC)

Hello, I propose the following modification to the shell script. It allows opening filename with spaces. It also allow opening relative filename when the application is already open from another folder.

It requires readlink from the coreutils package.

@@ -66,11 +63,19 @@ case ${_OS_NAME} in
 esac

 if [ $# -eq 1 ] ; then
-  _UMLET_OPTS=-filename="${1}"
+  _UMLET_OPTS=(-filename="${1}")
 else
-  _UMLET_OPTS="$@"
+  _UMLET_OPTS=("$@")
 fi

+# Change the -filename path to be absolute
+for i in "${!_UMLET_OPTS[@]}"; do
+    if [[ ${_UMLET_OPTS[$i]} == -filename=* ]] ; then
+        _UMLET_FILE=$(readlink -f "${_UMLET_OPTS[$i]#"-filename="}")
+        _UMLET_OPTS[$i]=-filename="$_UMLET_FILE"
+    fi
+done
+
 exec "${JAVA_CMD}" \
   ${_UMLET_JAVA_OPTS} \
-  -jar ${_UMLET_HOME}/umlet.jar ${_UMLET_OPTS}
+  -jar ${_UMLET_HOME}/umlet.jar "${_UMLET_OPTS[@]}"