Skip to content

addpkg(main/apkeditor): 1.4.2 #24426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed

addpkg(main/apkeditor): 1.4.2 #24426

wants to merge 6 commits into from

Conversation

Veha0001
Copy link

No description provided.

@TomJo2000
Copy link
Member

Copy link
Member

@TomJo2000 TomJo2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This is a pre-written reply)
I can't seem to find a package request for this project.
So I'll just go through an abbreviated version of the package request checklist below really quick.

Note

For future reference, please open a package request before spending the time to write a package build.

Package requests give us a heads up to evaluate if a package is suitable for packaging in the main Termux repositories.
https://github.com/termux/termux-packages/issues/new?template=02-package-request.yml
If you intend to package

Not all projects will meet out packaging guidelines.
In case this project does not, it may still be suitable for inclusion in the TUR

Packaging policy acknowledgement

  • The project is actively developed.

  • The project has existing packages and is "well known".

  • Licensed under an open source license.

  • Not available through a language package manager: pip, npm, cpan, cargo, etc.

  • Not taking up too much disk space (< 100MiB per architecture, exceptions can be made)

  • Not duplicating the functionality of existing packages.

  • Not serving hacking, malware, phishing, spamming, spying, ddos functionality.

  • I certify that I have read Termux Packaging Policy and understand that my request will be denied if it is found lacking.

This is a bit of an odd case.

TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=true

RAW_JAR=$TERMUX_PKG_CACHEDIR/APKEditor-${TERMUX_PKG_VERSION}.jar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't usually add "global" non-standard control variable outside of build step functions.

mkdir -p $TERMUX_PKG_SRCDIR
termux_download $TERMUX_PKG_SRCURL \
$RAW_JAR \
$TERMUX_PKG_SHA256
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no need to override the download step.
This is a regular github release artifact and the standard version of termux_step_get_source can handle that just fine.

Copy link
Author

@Veha0001 Veha0001 Apr 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With TERMUX_PKG_SKIP_SRC_EXTRACT=true.
If don't add termux_step_get_source() then where is the downloaded raw jar?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


termux_step_make_install() {
install -Dm600 $RAW_JAR \
$TERMUX_PREFIX/share/java/apkeditor.jar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably go into $PREFIX/libexec/apkeditor/apkeditor.jar,
but I'm not entirely sure if that's the convention we use for java packages.

TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@Veha0001"
TERMUX_PKG_VERSION=1.4.2
TERMUX_PKG_SRCURL=https://github.com/REAndroid/APKEditor/releases/download/V${TERMUX_PKG_VERSION}/APKEditor-${TERMUX_PKG_VERSION}.jar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The appears to be a precompiled release JAR.
That is fine for Java I suppose, but it's unusually since we usually compile packages from source.

TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This build script just downloads a JAR and puts it in the directory it needs to go.
Why would it be unsafe for on device builds?

@Veha0001
Copy link
Author

Most of this build.sh code, I just copied from package like apksigner, ecj.. so there are a few things idk there because I'm a newbie...

Why not..: REAndroid/APKEditor#180

@Veha0001
Copy link
Author

I think I updated all the outdated.
Merge if wanted...

@robertkirkman
Copy link
Contributor

This can be run just by downloading the release .jar and using these commands, right?

pkg upgrade
pkg install openjdk-17
java -jar apkeditor.jar

that seems to me like there is no special setup or compilation needed, so it seems unnecessary for it to come from pkg install.

@robertkirkman
Copy link
Contributor

It is how the project is documented for use, so In my opinion it is easier to copy and paste commands from the project README, if the users already know where they downloaded the .jar to. https://github.com/REAndroid/APKEditor/blob/master/README.md

@Veha0001
Copy link
Author

Close (termux-user-repository/tur#1687).

Thanks 🙏

@Veha0001 Veha0001 closed this Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants