You are not logged in.

#1 2023-04-21 15:21:07

sguyader
Member
Registered: 2023-04-21
Posts: 4

PKGBUILD review: xpano-git

Hi,

I want to submit the following PKGBUILD, which makes a package for Xpano, an automated photo stitching tool, with focus on simplicity and ease of use.
I have tried to follow the steps to create a git repo to submit this new package, but I don't quite understand everything.

Here's the PKGBUILD:

# Maintainer: Sébastien Guyader <sguyader@gmail.com>

_pkgname=xpano
pkgname="$_pkgname-git"
pkgver=0.12.0.r1.g4d9afc6
pkgrel=1
pkgdesc="Automated photo stitching tool, with focus on simplicity and ease of use"
arch=('x86_64')
url='https://github.com/krupkat/xpano'
license=('GPL3')
depends=('gtk3' 'opencv>=4.4.0' 'sdl2' 'spdlog' 'catch2v3')
makedepends=('cmake' 'git')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=('xpano::git+https://github.com/krupkat/xpano.git'
		'alpaca::git+https://github.com/p-ranav/alpaca.git'
		'imgui::git+https://github.com/krupkat/imgui.git'
		'nativefiledialog-extended::git+https://github.com/btzy/nativefiledialog-extended.git'
		'thread-pool::git+https://github.com/krupkat/thread-pool.git'
		)
md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')

pkgver(){
	cd $_pkgname
	git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	git -C xpano submodule init
	local _submodule
	for _submodule in alpaca imgui nativefiledialog-extended thread-pool
	do
		git -C xpano config --local submodule.external/${_submodule}.url "$srcdir/${_submodule}"
	done
	git -C xpano -c protocol.file.allow='always' submodule update
}

build() {
	cmake -B build -S $_pkgname \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_TESTING=ON \
		-DCMAKE_EXPORT_COMPILE_COMMANDS=OFF
	cmake --build build -j $(nproc)
}

check() {
	cd build
	#ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

If someone can upload it to the AUR, and wants to maintain it, that would be great.
Thank you.

Offline

#2 2023-04-21 16:35:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: PKGBUILD review: xpano-git

You shouldn't build all the dependencies as part of the package - just list them in the depends field.  Some of these already exist in the AUR (e.g., imgui).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2023-04-22 18:20:54

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: PKGBUILD review: xpano-git

The catch2v3 package does not build for me, so I cannot test the rest of the PKGBUILD.

Offline

#4 2023-04-22 18:45:27

sguyader
Member
Registered: 2023-04-21
Posts: 4

Re: PKGBUILD review: xpano-git

Trilby wrote:

You shouldn't build all the dependencies as part of the package - just list them in the depends field.  Some of these already exist in the AUR (e.g., imgui).

thanks, I'll add to the depends() section the packages already available for Arch.

Offline

#5 2023-04-22 18:46:33

sguyader
Member
Registered: 2023-04-21
Posts: 4

Re: PKGBUILD review: xpano-git

Stefan Husmann wrote:

The catch2v3 package does not build for me, so I cannot test the rest of the PKGBUILD.

I was able to install it on Manjaro.

Offline

#6 2023-04-22 19:01:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: PKGBUILD review: xpano-git

sguyader wrote:

I'll add to the depends() section the packages already available for Arch.

No, they should *all* just be added to the depends list.  And some of them should then also be packaged as needed.

(catch2v3 also built fine for me)

Last edited by Trilby (2023-04-22 19:04:29)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2023-04-22 19:49:19

sguyader
Member
Registered: 2023-04-21
Posts: 4

Re: PKGBUILD review: xpano-git

Trilby wrote:
sguyader wrote:

I'll add to the depends() section the packages already available for Arch.

No, they should *all* just be added to the depends list.  And some of them should then also be packaged as needed.

This is why I was asking for someone to takeover: it's my first PKGBUILD, and since I've seen some PKGBUILDs calling git for dependencies in the prepare() section, I thought it was fine.
Please enlighten me: if I just add the dependencies in the depends() list and remove them from prepare(), what will happen for the dependencies that are not available yet from Arch repos?

Regarding imgui, the author of the xpano software just told that he pulls a specific branch from the imgui git repo, and this is not available in the imgui Arch package. Please take a look here: https://github.com/krupkat/xpano/issues/85

Offline

Board footer

Powered by FluxBB