You are not logged in.
This is the PKGBUILD:
# Maintainer: Bent Hillerkus <benthillerkus@gmail.com>
pkgrel=10
pkgver=3.0.2
pkgname=jetuml
_gitname=JetUML
_iconname=jet.png
_archivename="${_gitname}-${pkgver}.jar"
_archivefolder="/usr/share/java/${pkgname}/${_archivename}"
pkgdesc="A desktop application for fast UML diagramming"
changelog=.CHANGELOG
arch=('any')
url="https://github.com/prmr/${_gitname}"
license=('GPL3')
depends=('jdk-openjdk' 'java-openjfx')
makedepends=('gendesk')
source=("https://github.com/prmr/${_gitname}/releases/download/v${pkgver}/${_archivename}"
"${pkgname}.png::https://raw.githubusercontent.com/prmr/${_gitname}/v${pkgver}/icons/${_iconname}")
noextract=("${_archivename}")
md5sums=('400b9c6de6025419f8c0450317c41a15'
'3b8e71028b14563205716aeb592e0803')
_name=${_gitname}
_genericname="UML Diagrammer"
_exec="/usr/bin/java --module-path '/usr/lib/jvm/default/lib' --add-modules=javafx.controls,javafx.swing,java.desktop,java.prefs -jar ${_archivefolder}"
_categories="Development"
_comment="Create a new diagram"
_mimetypes="application/jet"
build() {
gendesk -f -n --pkgname ${pkgname} --pkgdesc "${pkgdesc}" --name ${_gitname} --genericname "${_genericname}" --comment "${_comment}" --exec "${_exec}" --categories "${_categories}" --mimetypes "${_mimetypes}"
}
package() {
install -Dm644 "${_archivename}" "${pkgdir}/${_archivefolder}"
install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm644 "$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
}
and for .CHANGELOG I've got
This release fixes a few leftover problems from 3.0.
## Usability Improvements
- Fixed bug causing the selection of fields in Object diagrams to changes their relative order (#377)
- Fixed insufficient name padding for some class diagram and use case diagram elements (#379)
- Fixed bug causing version migration between compatible versions.
## Code Improvement
- Removed unnecessary parameter in edge segmentation code (#378)
This is my first AUR submission, so I'd be eager to get all feedback; but I've also got some questions:
Should I include a shell script that starts the application instead of putting it only in the exec of the desktop file? If yes, how'd I do that, so that you can just run jetuml on a shell to start the program?
Does this actually work on systems other than mine? I had to remove some .jar in my java directory that provided a package that was already satisfied by base java.
Should I bother with the changelog? It's just copypasted from the GitHub releases page.
When I run makepkg, even with all the cleanup options, it leaves the two downloaded sources behind. Should I manually delete them in the install function after they've been copied into their target directories? Or is this just adding onto the cache that users purge manually?
Last edited by bent (2020-10-30 11:35:49)
Offline
This is my first AUR submission, so I'd be eager to get all feedback; but I've also got some questions:
Should I include a shell script that starts the application instead of putting it only in the exec of the desktop file? If yes, how'd I do that, so that you can just run jetuml on a shell to start the program?
Yes. Desktop files are of little use for Users not runing a DE. Look at other java programs in the repos or in AUR for examples.
Does this actually work on systems other than mine? I had to remove some .jar in my java directory that provided a package that was already satisfied by base java.
The Java version seems to be relevant to run it. I have openjdk 14 enabled, and it does not work.
Should I bother with the changelog? It's just copypasted from the GitHub releases page.
*shrug*
When I run makepkg, even with all the cleanup options, it leaves the two downloaded sources behind. Should I manually delete them in the install function after they've been copied into their target directories? Or is this just adding onto the cache that users purge manually?
That's completely normal. Do not touch these files.
Offline
I would get rid of all the unnecessary `$_foobar` variables, specially if they are referenced just once. It makes the PKGBUILD unreadable. YMMV.
Edit: do you really need to generate the desktop file every time the package is built? I would just provide it like many other packages (it is not likely to change very often). In the exec line put the path to the launcher script (see above comment).
Last edited by a821 (2020-10-30 13:40:30)
Offline
# Maintainer: Bent Hillerkus <benthillerkus+aur@gmail.com>
pkgrel=25
pkgver=3.0.2
pkgname=jetuml
_gitname=JetUML
_iconname=jet
_jarname=$_gitname-$pkgver
_installdirectory=/usr/share/java/$pkgname
_javaver=14
pkgdesc="A desktop application for fast UML diagramming"
changelog=CHANGELOG
arch=('any')
url="https://github.com/prmr/$_gitname"
license=('GPL3')
depends=("java-runtime-openjdk=$_javaver" "java-openjfx")
makedepends=('gendesk')
source=("https://github.com/prmr/$_gitname/releases/download/v$pkgver/$_jarname.jar"
"$pkgname.png::https://raw.githubusercontent.com/prmr/$_gitname/v$pkgver/icons/$_iconname.png")
noextract=("$_jarname.jar")
md5sums=('400b9c6de6025419f8c0450317c41a15'
'3b8e71028b14563205716aeb592e0803')
prepare() {
# Generate a runnable shell script
echo "#!/bin/sh
/usr/bin/java --module-path $_installdirectory/lib --add-modules=javafx.controls,javafx.swing,java.desktop,java.prefs -jar $_installdirectory/$_jarname.jar" \
> $pkgname
# Generate a desktop entry
# -f: forces and overrides the file if any
# -n: do not download an icon
# This tool assumes the icon has the same name as pkgname.
# For categories see https://standards.freedesktop.org/menu-spec/latest/apa.html
gendesk -f -n \
--pkgname $pkgname \
--pkgdesc "$pkgdesc" \
--name $_gitname \
--genericname "UML Diagrammer" \
--comment "Create a new UML diagram" \
--exec "/usr/bin/$pkgname" \
--categories "Development;FlowChart;2DGraphics;ComputerScience,Java" \
--mimetypes "application/jet"
}
package() {
# Taking cues from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=asciidocfx
install -dm755 "$pkgdir/usr/bin"
install -m755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm644 "$_jarname.jar" "$pkgdir/$_installdirectory/$_jarname.jar"
install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm644 "$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
# Workaround for FS#64121
install -dm755 "$pkgdir/$_installdirectory/lib"
cp -t "$pkgdir/$_installdirectory/lib" /usr/lib/jvm/java-$_javaver-openjdk/lib/javafx*
}
ok, so i've reworked it quite a bit to incorporate the feedback.
do you really need to generate the desktop file every time the package is built?
Probably not, but I suppose it makes it easier for me to maintain this way.
The Java version seems to be relevant to run it. I have openjdk 14 enabled, and it does not work.
Java 14 is the correct one. I've specified it in the dependencies more clearly.
It's a bit of a shame that I had to circumvent this misconfiguration in the way JavaFX is being installed with this solution, but alas, it works.
Last edited by bent (2020-10-30 17:02:59)
Offline
Please do not use gendesk, its value is highly questionable. The definition of the desktop file format is stable, and it is much easier to track the evolution of the file if you provide it as a source file directly; plus, it is faster and makes for a more concise PKGBUILD by separating data from code.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline