You are not logged in.

#1 2022-09-26 22:28:39

laymoth
Member
Registered: 2022-09-25
Posts: 5

[SOLVED] PKGBUILD review request: hidamari-git

Hidamari is a video wallpaper for Linux. It is written in python.

Here's the PKGBUILD:

# Maintainer: Ali Rohman <laymoth@pm.me>

pkgname=hidamari-git
pkgver=3.0.beta4.r0.ga1b752c
_pkgver=3.0-beta4
pkgrel=1
pkgdesc='Video wallpaper for Linux. Written in Python.'
arch=('x86_64')
url='https://github.com/jeffshee/hidamari'
license=('GPL3')
depends=('python-gobject' 'python-pillow' 'python-pydbus' 'python-vlc' 'yt-dlp' 'ffmpeg' 'vlc' 'libx11' 'gnome-desktop-4' 'python-requests' 'libwnck3' 'mesa-utils' 'vdpauinfo' 'libappindicator-gtk3' 'xdg-user-dirs' 'webkit2gtk')
makedepends=('git' 'meson')
provides=("${pkgname%-git}")
source=("git+https://github.com/jeffshee/hidamari.git#tag=v${_pkgver}")
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/${pkgname%-git}"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir/${pkgname%-git}"
  meson setup build
}

build() {
  arch-meson "${pkgname%-git}" build
}

package() {
  meson install -C build --destdir "$pkgdir"
}

Any suggestions are welcome :)

Last edited by laymoth (2022-11-28 23:07:15)

Offline

#2 2022-09-26 22:53:05

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,827

Re: [SOLVED] PKGBUILD review request: hidamari-git

A -git package doesn't build from a tag. Either build from HEAD or make it a release package.

Offline

#3 2022-09-26 23:43:02

yochananmarqos
Member
Registered: 2020-02-05
Posts: 101
Website

Re: [SOLVED] PKGBUILD review request: hidamari-git

There's no need for a prepare() function. See Meson package guidelines:

build() {
  arch-meson "${pkgname%-git}" build
  meson compile -C build
}

Offline

#4 2022-09-27 08:22:06

laymoth
Member
Registered: 2022-09-25
Posts: 5

Re: [SOLVED] PKGBUILD review request: hidamari-git

Scimmia wrote:

A -git package doesn't build from a tag. Either build from HEAD or make it a release package.

Thanks! I will change the package name to hidamari.

Offline

#5 2022-09-27 08:34:25

laymoth
Member
Registered: 2022-09-25
Posts: 5

Re: [SOLVED] PKGBUILD review request: hidamari-git

yochananmarqos wrote:

There's no need for a prepare() function. See Meson package guidelines:

build() {
  arch-meson "${pkgname%-git}" build
  meson compile -C build
}

Is this correct?

# Maintainer: Ali Rohman <laymoth@pm.me>

pkgname=hidamari
pkgver=3.0.beta4
_pkgver=3.0-beta4
pkgrel=1
pkgdesc='Video wallpaper for Linux. Written in Python.'
arch=('x86_64')
url='https://github.com/jeffshee/hidamari'
license=('GPL3')
depends=('python-gobject' 'python-pillow' 'python-pydbus' 'python-vlc' 'yt-dlp' 'ffmpeg' 'vlc' 'libx11' 'gnome-desktop-4' 'python-requests' 'libwnck3' 'mesa-utils' 'vdpauinfo' 'libappindicator-gtk3' 'xdg-user-dirs' 'webkit2gtk')
makedepends=('git' 'meson')
provides=("hidamari")
source=("git+https://github.com/jeffshee/hidamari.git#tag=v${_pkgver}")
sha256sums=('SKIP')

build() {
  arch-meson "${pkgname}" build
  meson compile -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
}

Last edited by laymoth (2022-09-27 10:59:00)

Offline

#6 2022-09-27 10:40:29

loqs
Member
Registered: 2014-03-06
Posts: 15,500

Re: [SOLVED] PKGBUILD review request: hidamari-git

provides=("hidamari")

All packages provide $pkgname making the provides line redundant.

Offline

#7 2022-09-27 10:58:25

laymoth
Member
Registered: 2022-09-25
Posts: 5

Re: [SOLVED] PKGBUILD review request: hidamari-git

loqs wrote:
provides=("hidamari")

All packages provide $pkgname making the provides line redundant.

Thanks for the information.

# Maintainer: Ali Rohman <laymoth@pm.me>

pkgname=hidamari
pkgver=3.0.beta4
_pkgver=3.0-beta4
pkgrel=1
pkgdesc='Video wallpaper for Linux. Written in Python.'
arch=('x86_64')
url='https://github.com/jeffshee/hidamari'
license=('GPL3')
depends=('python-gobject' 'python-pillow' 'python-pydbus' 'python-vlc' 'yt-dlp' 'ffmpeg' 'vlc' 'libx11' 'gnome-desktop-4' 'python-requests' 'libwnck3' 'mesa-utils' 'vdpauinfo' 'libappindicator-gtk3' 'xdg-user-dirs' 'webkit2gtk')
makedepends=('git' 'meson')
source=("git+https://github.com/jeffshee/hidamari.git#tag=v${_pkgver}")
sha256sums=('SKIP')

build() {
  arch-meson "${pkgname}" build
  meson compile -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
}

Any other suggestion?

Last edited by laymoth (2022-09-27 11:00:14)

Offline

#8 2022-09-27 13:26:51

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,512

Re: [SOLVED] PKGBUILD review request: hidamari-git

depends=('python-gobject' 'python-pillow' 'python-pydbus' 'python-vlc' 'yt-dlp' 'ffmpeg' 'vlc' 'libx11' 'gnome-desktop-4' 'python-requests' 'libwnck3' 'mesa-utils' 'vdpauinfo' 'libappindicator-gtk3' 'xdg-user-dirs' 'webkit2gtk')

Those dependencies look weird, why does a wallpaper program require a youtube downloader, mesa-utils and vdpauinfo ?
The addtion of gnome-desktop-4 suggests it uses gtk4 , but why would it then also need a gtk3 utility ?

How did you determine the deps ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#9 2022-09-27 14:02:58

laymoth
Member
Registered: 2022-09-25
Posts: 5

Re: [SOLVED] PKGBUILD review request: hidamari-git

Lone_Wolf wrote:
depends=('python-gobject' 'python-pillow' 'python-pydbus' 'python-vlc' 'yt-dlp' 'ffmpeg' 'vlc' 'libx11' 'gnome-desktop-4' 'python-requests' 'libwnck3' 'mesa-utils' 'vdpauinfo' 'libappindicator-gtk3' 'xdg-user-dirs' 'webkit2gtk')

Those dependencies look weird, why does a wallpaper program require a youtube downloader, mesa-utils and vdpauinfo ?
The addtion of gnome-desktop-4 suggests it uses gtk4 , but why would it then also need a gtk3 utility ?

How did you determine the deps ?

I took the reference from:
https://github.com/jeffshee/hidamari/bl … amari.spec
https://github.com/jeffshee/hidamari/is … 1241902990
https://github.com/jeffshee/hidamari/is … 1242068001
https://github.com/jeffshee/hidamari/is … 1242077254

Offline

#10 2022-09-27 14:56:24

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,512

Re: [SOLVED] PKGBUILD review request: hidamari-git

It now makes a bit more sense.
Archlinux doesn't have a concept of 'weak depedencies' , but optional depeendencies may come close.

Fortunately there's a good method to determine what's needed on archlinux : build in a clean chroot  without deps to see where things go wrong and add the needed ones.
Working on it now.

Added:

There doesn't appear to be any elf binaries in the package, so it should be arch=('any') instead of x86_64.

Minimum needed to build succesfully and satisfy external dependencies

depends=('python-gobject' 'python-pillow' 'python-pydbus' 'python-vlc' 'yt-dlp' 'dconf' 'python-requests')
makedepends=('git' 'meson' 'gtk-update-icon-cache' 'desktop-file-utils')

vlc & ffmpeg are pulled in by python-vlc so don't need to be mentioned explicitly.

runtime tests made clear libwnck3, libappindicator-gtk3, webkit2gtk, gnome-desktop-4 and mesa-utils are hard dependencies.
A missing vdpauinfo results in a warning, so should be an optdepend .

Last edited by Lone_Wolf (2022-09-27 18:44:59)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB