Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 834623

Summary: app-laptop/asus-touchpad: asus touchpad numpad switch driver (New Package)
Product: Gentoo Linux Reporter: Marco Clocchiatti <ziapannocchia>
Component: New packagesAssignee: Default Assignee for New Packages <maintainer-wanted>
Status: CONFIRMED ---    
Severity: normal CC: jstein
Priority: Normal Keywords: EBUILD
Version: unspecified   
Hardware: Other   
OS: Linux   
URL: https://github.com/mohamed-badaoui/asus-touchpad-numpad-driver
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: new ebuild
new ebuild
new ebuild

Description Marco Clocchiatti 2022-03-05 14:10:44 UTC
A large variety of asus laptops can use the touchpad both as a mouse emulator or a numpad keypad.

switching between these modes may be provided by a special software at the url reported above.

This software works well on my ZenBook UX363EA_UX371EA laptop.

In the attachment, I provide a working ebuild to install the driver.
I propose the app-laptop/ category.
Actually, the ebuild downloads a static copy of commit d80980af6ef776ee6acf42c193689f207caa7968 of the original software.

Reproducible: Always

Steps to Reproduce:
1. emerge app-laptop/asus-touchpad-numpad-driver
2. systemctl enable asus-touchpad numpad driver
3. systemctl start asus-touchpad-numpad-driver

Actual Results:  
your asus touch switchs from touchpad to numpad mode.
Comment 1 Marco Clocchiatti 2022-03-05 14:11:50 UTC
Created attachment 766340 [details]
new ebuild
Comment 2 Jonas Stein gentoo-dev 2022-03-06 01:33:51 UTC
Thank you for your contribution. I had a short look on the ebuild. 
Here a few ideas:

* Please test the ebuild with repoman full -d -x https://wiki.gentoo.org/wiki/Repoman and pkgcheck scan --net
* SRC_URI="https://github.com/cloc3/portage/raw/main/distfiles/${P}.zip"
would require a dependency on unzip hence we always use tar.gz if possible

* Why do HOMEPAGE and SRC_URI differ?
HOMEPAGE="https://github.com/mohamed-badaoui/asus-touchpad-numpad-driver" 
SRC_URI="https://github.com/cloc3/portage/raw/main/distfiles/${P}.zip"
Comment 3 Marco Clocchiatti 2022-03-06 03:05:30 UTC
(In reply to Jonas Stein from comment #2)

Thank you for your reply.
> 
> * Please test the ebuild with repoman full -d -x
> https://wiki.gentoo.org/wiki/Repoman and pkgcheck scan --net
> * SRC_URI="https://github.com/cloc3/portage/raw/main/distfiles/${P}.zip"
> would require a dependency on unzip hence we always use tar.gz if possible
> 
repoman seems ok:

cloc3@cloc3 ~/github/portage $ repoman full -dx

RepoMan scours the neighborhood...
RepoMan sez: "If everyone were like you, I'd be out of business!"

pkgscan gives some issues. I'll come later with a fix, but I need an explanation about your second issue:

> * Why do HOMEPAGE and SRC_URI differ?
> HOMEPAGE="https://github.com/mohamed-badaoui/asus-touchpad-numpad-driver" 
> SRC_URI="https://github.com/cloc3/portage/raw/main/distfiles/${P}.zip"

I'm not a gentoo developer, but I see that often the HOMEPAGE differs from SRC_URI in gentoo ebuilds. For examples:

sci-visualization/xd3d/xd3d-8.3.1-r1.ebuild
HOMEPAGE="http://www.cmap.polytechnique.fr/~jouve/xd3d/"
SRC_URI="mirror://gentoo/${P}.tar.gz"

So, I've done something similar for my ebuild.
I downloaded sources from homepage github in zip format (commit d80980af6ef776ee6acf42c193689f207caa7968) and I put them in a kind of personal "mirror" as a static copy of the original. That's also the reason because sources are not a tar.gz archive.

So, what exactly is the proper way to do here?
Comment 4 Marco Clocchiatti 2022-03-06 15:14:22 UTC
Created attachment 766431 [details]
new ebuild

cloc3@cloc3 ~/github/portage $ repoman full -dx

RepoMan scours the neighborhood...
RepoMan sez: "If everyone were like you, I'd be out of business!"
cloc3@cloc3 ~/github/portage $ pkgcheck scan --net


fixed for pkgcheck issues.
use flags removed accordingly with https://devmanual.gentoo.org/general-concepts/use-flags/index.html#when-not-to-use-use-flags

SRC_URI points to a static copy of the Homepage sources. commit: d80980af6ef776ee6acf42c193689f207caa7968
(if this is wrong, please give me your instructions).
Comment 5 Marco Clocchiatti 2022-03-08 09:18:18 UTC
Created attachment 766583 [details]
new ebuild

fixed minor error on line 56.
sorry for the problem.