xpano icon indicating copy to clipboard operation
xpano copied to clipboard

PKGBUILD proposal for Arch linux

Open sguyader opened this issue 1 year ago • 5 comments

Please find below a tentative PKGBUILD for Arch users. Note that the ctest command in the check() section is commented out, until test #20 is fixed.

# Maintainer: Sébastien Guyader <[email protected]>

_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
}

sguyader avatar Apr 21 '23 14:04 sguyader