You are not logged in.

#1 2023-06-30 17:43:36

iamprecious
Member
Registered: 2023-06-30
Posts: 1

PKGBUILD Review: Rangoli

Hey, I am new to creating packages and found some software that was not in the AUR: https://github.com/rnayabed/rangoli

I am primarily concerned about the dependency of this program with hidapi. The makefile also installs hidapi along with this program using git submodules, so I cannot just add it as a dependency. When I leave it like this it works unless hidapi is already installed, in which case pacman tries to overrwrite some hidapi config files, so the installation fails. Should I fix this by adding a provides and conflicts array both with hidapi in them? Or would another solution be better? Also, some files apart from binaries are installed in /usr/bin which does not respect convention, would that be an issue?

This is the PKGBUILD:

pkgname=rangoli-git
pkgver=2.0.r15.ge194721
pkgrel=1
pkgdesc="Free, Open Source, Lightweight, Cross-platform Software for Royal Kludge Keyboards"
arch=('any')
url="https://github.com/rnayabed/rangoli"
license=('GPL3')
depends=('qt6-base' 'qt6-declarative' 'python3' 'glibc' 'gcc-libs' 'systemd-libs')
makedepends=('cmake' 'gcc' 'ninja'  'git')
source=("git+https://github.com/rnayabed/rangoli.git")
sha256sums=('SKIP')

prepare(){
    cd "rangoli"
    git submodule update --init
}

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

build() {
    cd "rangoli"

    cmake -B build -G Ninja -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr"
    cmake --build build --parallel
}


package() {
  cd "rangoli/build"
  DESTDIR="${pkgdir}" cmake --install .
}

Offline

#2 2023-07-01 11:23:55

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,616

Re: PKGBUILD Review: Rangoli

gcc is part of base-devel which is assumed to be present when building aur packages, no need to have it as makedepend .

git submodules require special treatment, see https://wiki.archlinux.org/title/VCS_pa … submodules .
(Following that will also make hidapi more visible .)

Also, some files apart from binaries are installed in /usr/bin which does not respect convention, would that be an issue?

yes, https://github.com/rnayabed/rangoli/issues/36

The hidapi issue also sounds like it needs to be dealt with by  upstream.

Maybe someone capable to write such patches will see this thread and be interested enough to create them for you .

Welcome to archlinux forums .


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

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2023-07-01 11:29:07

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,895

Re: PKGBUILD Review: Rangoli

At first glance, arch=('any') seems wrong. Is the final, built package architecture independent, ie, you can build it on x86_64 and run it on ARM? If not, you can't use 'any'.

Offline

#4 2023-07-01 15:45:50

loqs
Member
Registered: 2014-03-06
Posts: 17,861

Re: PKGBUILD Review: Rangoli

rangoli-git-2.0.r15.ge194721-1-x86_64-build.log

-- The CXX compiler identification is GNU 13.1.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE  
-- Found OpenGL: /usr/lib/libOpenGL.so   
-- Found WrapOpenGL: TRUE  
-- Found XKB: /usr/lib/libxkbcommon.so (found suitable version "1.5.0", minimum required is "0.5.0") 
-- Found WrapVulkanHeaders: /usr/include  
-- Could NOT find Qt6Svg (missing: Qt6Svg_DIR)
CMake Error at CMakeLists.txt:56 (find_package):
  Found package configuration file:

    /usr/lib/cmake/Qt6/Qt6Config.cmake

  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find required Qt component "Svg".

  Expected Config file at "/usr/lib/cmake/Qt6Svg/Qt6SvgConfig.cmake" does NOT
  exist



  Configuring with --debug-find-pkg=Qt6Svg might reveal details why the
  package was not found.

  Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some
  of the path variables that find_package uses to try and find the package.



-- Configuring incomplete, errors occurred!

Offline

Board footer

Powered by FluxBB