From 43b1f1de09d323c6a0e1de8b672eab3156aaaeb0 Mon Sep 17 00:00:00 2001 From: Gabriel Russo Date: Thu, 16 Jun 2022 01:26:05 -0400 Subject: [PATCH] New package: umlet-15 --- srcpkgs/umlet/template | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 srcpkgs/umlet/template diff --git a/srcpkgs/umlet/template b/srcpkgs/umlet/template new file mode 100644 index 000000000000..e21a39cf202b --- /dev/null +++ b/srcpkgs/umlet/template @@ -0,0 +1,48 @@ +# Template file for 'umlet' +pkgname=umlet +version=15 +revision=1 +wrksrc=${pkgname}-2022-04-26_UMLet_v${version} +hostmakedepends="unzip" +makedepends="apache-maven" +depends="openjdk11" +short_desc="Simple, text driven UML drawing tool" +maintainer="Gabriel Russo " +license="GPL-3.0-or-later" +homepage="https://www.umlet.com/" +distfiles="https://github.com/umlet/umlet/archive/refs/tags/2022-04-26_UMLet_v${version}.tar.gz" +checksum=f9e31176d6068681bdc40a97bd67da28a85e5665bf0ba459f474915a77c904c1 + +do_build() { + export MAVEN_OPTS="$MAVEN_OPTS -Duser.home=${wrksrc}" + mvn clean package -pl umlet-standalone -am -Dmaven.test.skip=true +} + +pre_install() { + unzip umlet-standalone/target/umlet-standalone-${version}*.zip + + # Fix umlet launcher to use freedesktop icon-theme-spec standard + vsed 's|img/umlet_logo\.png|umlet|' -i Umlet/umlet.desktop + + # Fix Error: Unable to access jarfile umlet.jar + vsed 's|umlet\.jar|/usr/bin/umlet\.jar|' -i Umlet/umlet.desktop + + rm -r Umlet/img + rm Umlet/*.exe + + vmkdir usr/lib + vmkdir usr/bin +} + +do_install() { + for _i in 16 20 24 32 40 48 64; do + vmkdir usr/share/icons/hicolor/${_i}x${_i}/apps + vinstall umlet-standalone/target/classes/umlet_logo${_i}.png 644 usr/share/icons/hicolor/${_i}x${_i}/apps umlet.png + done + + vinstall Umlet/umlet.desktop 644 usr/share/applications + + vcopy Umlet/ usr/lib/ + + ln -s /usr/lib/Umlet/umlet.jar ${DESTDIR}/usr/bin/umlet.jar +}