You are not logged in.

#1 2022-04-22 19:12:18

musiclover
Member
Registered: 2021-12-22
Posts: 4

PKGBUILD review request: omegaide

Ok so I made a pkgbuild for the Omega IDE but I have some concerns. This is a java based IDE.

PKGBUILD:

# Maintainer: musiclover <musiclover382@protonmail.com>

pkgname=omegaide
pkgver=2.2
pkgrel=1
pkgdesc="The Blazing Fast Java IDE and the Instant IDE for any programming language."
arch=("x86_64")
url="http://omegaui.github.io/omegaide"
depends=('java-environment')
makedepends=('imagemagick')
license=('GPL3')
source=('omegaide' 'omegaide.desktop' "https://github.com/omegaui/omegaide/releases/download/v$pkgver-stable/Omega.IDE.jar")
sha256sums=('97ea7c5d9f88871214b5edfafc6d3e1df29b3eb850722488c5e27d04ec0d2a7c'
            'f1eeb0416924e5d0b7c9ed7e07ba0c360946351f7e3e7f9baedf99aaccd351ed'
            '98ebc4fc7ea2281d2ff15175f73ba85639fa434965581e108e1c35e294787db6')
noextract=('Omega.IDE.jar')

package() {
	bsdtar xf Omega.IDE.jar omega_ide_icon500.png
	install -Dm644 Omega.IDE.jar "$pkgdir"/usr/share/java/$pkgname/$pkgname.jar
	install -Dm775 $pkgname "$pkgdir"/usr/bin/$pkgname
	install -Dm775 $pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
	for i in 16 22 24 32 48 64 128 256 512 ; do
		convert -resize ${i}x$i omega_ide_icon500.png omega_ide_icon$i.png
		install -Dm644 omega_ide_icon$i.png \
		"$pkgdir"/usr/share/icons/hicolor/${i}x$i/apps/omegaide.png
	done
}

omegaide:

#!/bin/sh
exec /usr/bin/java -jar '/usr/share/java/omegaide/omegaide.jar' "$@"

omegaide.desktop:

[Desktop Entry]
Name=Omega IDE
Comment=Java Development Environment
Icon=omegaide
Exec=omegaide
Terminal=false
Type=Application
Categories=Development;IDE;Java;
StartupNotify=true
  1. The process to extract omega_ide_icon500.png from Omega.IDE.jar. I avoided extracting the whole archive for the sake of speed, but since I can't see a noticeable difference I might as well let makepkg take care of it and Keep It Simple™.

  2. The resizing stuff I did for the icons. Since the author didn't include other resolutions than 500x500, I had to resize everything manually. I decided to rescale one to 512x512, which is an "upscale", but the difference is so small I couldn't notice any real issues with the upscaled icon.

  3. Also, the resizing stuff requires imagemagick which is not needed by program itself. Don't know if it's allowed.

Thanks!

Last edited by musiclover (2022-04-22 19:15:46)

Offline

#2 2022-04-22 19:41:01

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,513
Website

Re: PKGBUILD review request: omegaide

If you keep the bsdtar extraction for the png, the that command should be in a prepare function not in the package function.  The same is true of the icon resizing, though I could see an argument for this being in a build function instead (but either way, this should not be in the package function).  Requring imagemagick as a makedepend when it's not needed at runtime is absolutely allowed - that's the whole purpose of makedepends.  Whether or not that's the best way to handle icons I'm not entirely sure, but if you use imagemagic to do this in the PKBUILD, then having imagamagic as a madedepends is 100% correct.

Other than these details, the PKGBUILD appears good to me - however I don't have any experience with java packaging, though it looks like you properly followed the wiki page for java packaging standards.

Last edited by Trilby (2022-04-22 19:43:50)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-04-23 11:18:45

musiclover
Member
Registered: 2021-12-22
Posts: 4

Re: PKGBUILD review request: omegaide

Thanks, I edited the pkgbuild accordingly and pusblished the package.

Offline

#4 2022-04-23 12:46:22

willemw
Member
Registered: 2013-02-19
Posts: 98

Re: PKGBUILD review request: omegaide

It should be:

arch=('any')
depends=('java-environment>=17')

There are some .so files in the .jar file, I see. They seem to cover all or most architectures, so probably "arch=('any')" is still correct.

Last edited by willemw (2022-04-23 12:51:54)

Offline

#5 2022-04-23 13:28:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,513
Website

Re: PKGBUILD review request: omegaide

The 'arch' list could be expanded to include the other architectures for which alternative .so files are provided but it's not required as it's best to test on such architectures before listing them.  But the architecture certainly isn't "any" as there are a finite number of architectures supported by the precombiled binary objects.

Why do you think a versioned dependency is needed just to exclude old versions that are no longer available in the repos?  There is no need to list greater-than versioned dependencies when the only requirement is "current or better".

Last edited by Trilby (2022-04-23 13:29:58)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2022-04-23 17:25:15

willemw
Member
Registered: 2013-02-19
Posts: 98

Re: PKGBUILD review request: omegaide

@Trilby:

Good argument that the "arch" array is not 'any' but 'x86_64'. (The upstream source file here is pre-compiled. It includes binaries for several architectures. Usually, a pre-compiled file is made for only a single architecture.)

Upstream mentions "JDK 17 or above is required to build / run".

Offline

Board footer

Powered by FluxBB