termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
2.12k stars 314 forks source link

Add support for compiling a package in pacman format #167

Closed Maxython closed 1 year ago

Maxython commented 2 years ago

For pacman users, this development will not be available, which is why they have to use apt, which is extremely risky.

I would like to know what needs to be done and does it require separate support?

twaik commented 1 year ago

I am not sure I am able to support both apt and pacman... I think it will be better to write instruction/script unpacking .deb and inner .tar archive to termux's prefix...

twaik commented 1 year ago

Can you please check latest build? I have apt so can not try it.

Maxython commented 1 year ago

The package was not compiled correctly. Screenshot_20230306-193312_Termux The reason for this is that the version is not specified in the .PKGINFO file using the pkgver value.

twaik commented 1 year ago

I thought I checked it twice before commiting... New build is ready.

Maxython commented 1 year ago

Architecture error. You specified it as all, but for pacman, support for all architectures is any.

One question: when updating the package, will you remove the TERMUX_PKG_REVISION value or specify 0 in it? Just, it's desirable to always have the value TERMUX_PKG_REVISION in the version of the package for pacman.

twaik commented 1 year ago

This package will not be distributed through termux-packages repos so I am not sure. It is considered to be distributed only through artifacts. But I am considering to make build receipt for termux-packages after merging this to master. There is some work to be done.

twaik commented 1 year ago

Can you please check latest build?

Maxython commented 1 year ago

Did you literally understand that you need a data folder (like a pacman system)? If so, then there I meant data the folder that is the source of the package (i.e. data/data/com.termux/files/*)

twaik commented 1 year ago

I am not sure about what exactly you are talking. Package itself should only install 2 files, which are /data/data/com.termux/files/usr/bin/termux-x11 and /data/data/com.termux/files/usr/libexec/termux-x11/loader.apk. And they are present in tar package along with .BUILDINFO, .MTREE, .PKGINFO.

twaik commented 1 year ago

Other user reported the package works. Can you please confirm it?

Maxython commented 1 year ago

I am not sure about what exactly you are talking

In short, you need to put data from prefix, and not create another data folder and put prefix in it. Because of this, pacman tries to install files at the coordinate /data/data/data/com.termux/*.

twaik commented 1 year ago

You are right. For some reason it has three data folder in depth. It is reusing older code of apt package generator and this folder already was there. How did I miss that...

twaik commented 1 year ago

Newer build should fix that.

Maxython commented 1 year ago

eeeemmm, why is there a dependency xorg-xwayland here, although there should be xwayland?

twaik commented 1 year ago

https://github.com/termux/termux-x11/issues/264

Maxython commented 1 year ago

It looks like you have set up a dependency for arch linux. But we need to configure this package for termux.

twaik commented 1 year ago

Done.

Maxython commented 1 year ago

Great, now the package is fully configured. Screenshot_20230308-184843_Termux