rvaiya / warpd

A modal keyboard-driven virtual pointer
MIT License
2.85k stars 126 forks source link

Update list of AUR packages #198

Closed matheusfillipe closed 1 year ago

matheusfillipe commented 1 year ago

I've created a few more packages for this. warpd-git buils from the latest commit while warpd-wayland and warpd build from the latest release.

rvaiya commented 1 year ago

Thanks. I took a peek at the PKGBUILDs, is there a reason you are hardcoding paths and manually calling install? You can (should?) just do DESTDIR=${pkgdir} make install. Additionally, a single binary is now built for both X and wayland if you just run make (you will need to update the package dependencies accordingly).

matheusfillipe commented 1 year ago

@rvaiya The reason I let it be two packages is because a wayland user wont want to download dependencies for Xorg and vice versa, so the packages have different dependencies.

DESTDIR=${pkgdir} make install that might be a better idea indeed. I think that comes back from the time there wasn't a make install

rvaiya commented 1 year ago

If you want to build exclusively for X or Wayland you now need to set DISABLE_WAYLAND and DISABLE_X respectively.

The reason I let it be two packages is because a wayland user wont want to download dependencies for Xorg and vice versa, so the packages have different dependencies.

I see. In that case you might want to also create a dedicated X package. The default package should probably build a binary compatible with both though (the wayland overhead is relatively small since it only needs the wayland client library and cairo (which is already present on most systems)).

matheusfillipe commented 1 year ago

Actually that doesn't work because the environment variable doesn't get passed to make from within the pkgbuild. I don't know why but it tries to install to the root /usr/local/ then, the variable is empty for some reason. I am not sure if thats a common issue with PKGBUILDS, should be possible. Also I didn't bother on disabling the build for Xorg or Wayland on each case because the binary is quite small anyway and that issue with the env still applies.

I see. In that case you might want to also create a dedicated X package. The default package should probably build a binary compatible with both though (the wayland overhead is relatively small since it only needs the wayland client library and cairo (which is already present on most systems)).

I was thinking on doing that with the warpd package, I think is just a matter of adding cairo and wayland as dependencies to it. Anyway still seems that programs ported to wayland have the -wayland on arch and the rest is just assumed to be for Xorg. So i dont really know... I am trying to create as few new packages as possible here :)

roland-5 commented 1 year ago

@matheusfillipe I use Sway with wayland only mode and sadly your package warpd-wayland doesn't work for me. warpd-wayland-git for another AUR user working for me. If I try your normal wayland version it doesn't want to start up.

matheusfillipe commented 1 year ago

@roland-rollo thanks for the feedback, I don't currently have proper ways to test wayland. If the package is installing successfully is probably not an issue with the PKGBUILD itself. Did you try running warpd -f ? There were some recent changes with the way keybindings are written in the config. Try checking that out, maybe is another error. You can just check if it is any different from download the source of the latest build: https://github.com/rvaiya/warpd/releases/tag/v1.3.4 and building it manually.

I also have an issue with version 1.3.4 and from commit: 40f7cf3 * Fix input processing (#171) --> This have completely broken warpd for me, it will just block my keyboard entirely in X11, but i think is a separate issue and I am still trying to figure out why myself. But maybe you have a similar issue.

matheusfillipe commented 1 year ago

@rvaiya The main problem with the old Makefile that applies to both warpd and warpd-wayland on AUR are those errors:

install -m644 warpd.1.gz /home/matheus/Programs/warpd/aur/warpd/pkg/warpd/usr/share/man/man1/
install: cannot create regular file '/home/matheus/Programs/warpd/aur/warpd/pkg/warpd/usr/share/man/man1/': Not a directory

The install lines of the Makefile should be as:

    install -Dm644 warpd.1.gz -t $(DESTDIR)$(PREFIX)/share/man/man1/
    install -Dm755 bin/warpd -t $(DESTDIR)$(PREFIX)/bin/

And then I could in the PKGBUILD: make install DESTDIR="$pkgdir"

But I saw there were a lot of changes in the Makefile meanwhile, that basically address that problem, so check out how it is on warpd-git now. Will be like that for warpd and warpd-wayland in future releases as well.

rvaiya commented 1 year ago

Actually that doesn't work because the environment variable doesn't get passed to make from within the pkgbuild.

You can also do make install DESTDIR=foo.

I was thinking on doing that with the warpd package, I think is just a matter of adding cairo and wayland as dependencies to it. Anyway still seems that programs ported to wayland have the -wayland on arch and the rest is just assumed to be for Xorg. So i dont really know... I am trying to create as few new packages as possible here :)

I'm not familiar enough with arch conventions to comment, but from a distribution perspective I favour a single binary so the user doesn't have to explicitly (un/re)install one or the other. Maybe something like warpd (runs on both), warpd-x and warpd-wayland makes sense?

I also have an issue with version 1.3.4 and from commit: 40f7cf3 * Fix input processing (#171) --> This have completely broken warpd for me, it will just block my keyboard entirely in X11,

Yes, this sounds like a bug. Please file a separate issue with more information. You might want to try v1.3.5, which was just released and includes a few bugfixes.

And then I could in the PKGBUILD: make install DESTDIR="$pkgdir"

+1. The makefile should alreay obey DESTDIR, so this is already possible.

matheusfillipe commented 1 year ago

@rvaiya I've updated the PKGBUILD's. Now warpd is a package for both and warpd-wayland only depends on wayland libxkbcommon cairo.

These wayland dependencies are very lightweight so I agree with you. I don't think warpd-X is needed. I made wayland be a optional dependency so it will only work if you explicitly want to install wayland.

rvaiya commented 1 year ago

I believe you are missing some dependencies in warpd-git. You can also remove make man from the build step (and scdoc as a dependency), since the generated man page is checked in. Other than that, it looks good at a glance.

matheusfillipe commented 1 year ago

warp-git is updated with your suggestions and I made it be just like warpd with the wayland optdependency

roland-5 commented 1 year ago

@matheusfillipe what AUR package is now good for wayland only people? I tried to build warpd-wayland but it vomiting error (I cleared paru folder from everything):

:: Downloading PKGBUILDs...
 (1/1) warpd-wayland-v1.3.5-1                        [---------------------------------------------------------------------------------]
fetching devel info...
==> Making package: warpd-wayland v1.3.5-1 (Sun 06 Nov 2022 06:25:21 PM CET)
==> Retrieving sources...
  -> Downloading warpd-wayland.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 10.0M    0 10.0M    0     0  8511k      0 --:--:--  0:00:01 --:--:-- 24.4M
==> Validating source files with md5sums...
    warpd-wayland.tar.gz ... Passed
==> Making package: warpd-wayland v1.3.5-1 (Sun 06 Nov 2022 06:25:23 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found warpd-wayland.tar.gz
==> Validating source files with md5sums...
    warpd-wayland.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting warpd-wayland.tar.gz with bsdtar
==> Sources are ready.
warpd-wayland-v1.3.5-1: parsing pkg list...
==> Making package: warpd-wayland v1.3.5-1 (Sun 06 Nov 2022 06:25:25 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
/home/roland/.cache/paru/clone/warpd-wayland/PKGBUILD: line 21: cd: warpd-wayland-1.3.5: No such file or directory
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'warpd-wayland-v1.3.5-1':
error: packages failed to build: warpd-wayland-v1.3.5-1
matheusfillipe commented 1 year ago

You are right @roland-rollo, I've updated with a quick patch. Try again

roland-5 commented 1 year ago

Now working. Thanks. I can confirm that with version 1.3.5 warpd-wayland package works as intended (hint mode and others). So previously problems were with older version.

matheusfillipe commented 1 year ago

@rvaiya could this get merged?

matheusfillipe commented 1 year ago

@rvaiya ?

rvaiya commented 1 year ago

Merged. Sorry for the delay.