Is there an existing issue for this?
Pain
The current package violates the Linux packaging guidelines.
The /usr/share hierarchy is for all read-only architecture independent data files. However, spotube binary itself, as well as its libs, are all architecture-dependent.
/usr/share/appdata is legacy path, AppStream metadata should now install to /usr/share/metainfo
Suggested solution
Self-contained packages should install to /opt/pkg/, example /opt/spotube. Than, symbolic link /usr/bin/spotube -> /opt/spotube/spotube.
Install AppStream metadata to /usr/share/metainfo/com.github.KRTirtho.Spotube.metainfo.xml
Finally, it should look like:
/opt/spotube/
├── spotube
├── data/...
└── lib/...
/usr/share/
├── applications/spotube.desktop
├── icons/spotube/spotube-logo.png
└── metainfo/com.github.KRTirtho.Spotube.metainfo.xml
/usr/bin/spotube -> /opt/spotube/spotube
Useful resources
Definition of /usr/share
/usr/share : Architecture-independent data: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html
This hierarchy is intended to be shareable among all architecture platforms of a given OS; thus, for example, a site with i386, Alpha, and PPC platforms might maintain a single /usr/share directory that is centrally-mounted.
Sample PKGBUILD for a Flutter app by Arch Wiki
User:Gromit/Flutter package guidelines: https://wiki.archlinux.org/title/User%3AGromit/Flutter_package_guidelines
Important: Legacy Path: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#spec-component-location
AppStream tools scan the /usr/share/appdata/ path for legacy compatibility as well. It should not be used anymore by new software though, even on older Linux distributions (like RHEL 7 and Ubuntu 16.04 LTS) the metainfo path is well supported. Support for the legacy path will likely be dropped completely with a future AppStream 1.0 release.
Additional information
No response
Self grab
Is there an existing issue for this?
Pain
The current package violates the Linux packaging guidelines.
The
/usr/sharehierarchy is for all read-only architecture independent data files. However,spotubebinary itself, as well as its libs, are all architecture-dependent./usr/share/appdatais legacy path, AppStream metadata should now install to/usr/share/metainfoSuggested solution
Self-contained packages should install to
/opt/pkg/, example/opt/spotube. Than, symbolic link/usr/bin/spotube->/opt/spotube/spotube.Install AppStream metadata to
/usr/share/metainfo/com.github.KRTirtho.Spotube.metainfo.xmlFinally, it should look like:
/opt/spotube/ ├── spotube ├── data/... └── lib/... /usr/share/ ├── applications/spotube.desktop ├── icons/spotube/spotube-logo.png └── metainfo/com.github.KRTirtho.Spotube.metainfo.xml /usr/bin/spotube -> /opt/spotube/spotubeUseful resources
Definition of
/usr/share/usr/share : Architecture-independent data: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html
Sample PKGBUILD for a Flutter app by Arch Wiki
User:Gromit/Flutter package guidelines: https://wiki.archlinux.org/title/User%3AGromit/Flutter_package_guidelines
Important: Legacy Path: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#spec-component-location
Additional information
No response
Self grab