You are not logged in.

#1 2024-11-18 05:24:23

korigamik
Member
Registered: 2024-11-18
Posts: 5

[REQUEST] focusclock-git

I want to create a new package on the AUR called focusclock-git.
It is my own package that I plan to update and maintain and can be found at https://github.com/KorigamiK/focusclock

This is a working PKGBUILD that I have tested myself:

# Maintainer: KorigamiK <korigamik@gmail.com>
_pkgname=focusclock
pkgname="${_pkgname}-git"
pkgver=r6.eece4cb 
pkgrel=1
pkgdesc="A clock overlay that sits on top of all windows to help you focus."
arch=("x86_64" "i686" "aarch64" "armv7h" "armv6h")
url="https://github.com/KorigamiK/focusclock"
license=("GPL3")
depends=("gtk4-layer-shell" "gtkmm-4.0")
makedepends=("cmake" "git")
provides=("focusclock")
conflicts=("focusclock")
source=("git+https://github.com/KorigamiK/focusclock.git")
sha512sums=("SKIP")

pkgver() {
  cd "$srcdir/${_pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "$srcdir/${_pkgname}"
  mkdir -p build
}

build() {
  cd "$srcdir/${_pkgname}"
  cmake -B build -S . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
  cmake --build build
}

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

Can I request this package to be published?

Offline

#2 2024-11-18 05:42:46

korigamik
Member
Registered: 2024-11-18
Posts: 5

Re: [REQUEST] focusclock-git

Solved, I think I have it published it myself https://aur.archlinux.org/packages/focusclock-git although I'm still unable to download it though my aur helper

Offline

#3 2024-11-18 09:40:29

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,926

Re: [REQUEST] focusclock-git

prepare() {
  cd "$srcdir/${_pkgname}"
  mkdir -p build
}

Will fail if the folder is already present, cmake has logic inplace to handle that case.

all functions in PKGBUILD start in $srcdir, just use cd $_pkgname when  needed.
For a cmake PKGBUILD it's usually better/more readable to not change directory, but use -S with the directory where sources are .

cmake -B build -S ${_pkgname } <replace_with_options>

You should also look at https://wiki.archlinux.org/title/CMake_ … guidelines to verify if your CMakeLists.txt avoids common bad practices.


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

Online

#4 2024-11-18 19:43:34

korigamik
Member
Registered: 2024-11-18
Posts: 5

Re: [REQUEST] focusclock-git

thanks for the input, I've updated the pkgbuild now.

btw when/how can I install my package from aur helpers like paru since they don't seem to list the package right now

Offline

#5 2024-11-18 20:03:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,170

Re: [REQUEST] focusclock-git

Worksforme™ why do you think they don't list it?

Offline

#6 2024-11-18 20:07:45

korigamik
Member
Registered: 2024-11-18
Posts: 5

Re: [REQUEST] focusclock-git

Not sure but this is what I get on searching for it:

~ ❯ paru -Q focusclock-git
error: package 'focusclock-git' was not found

Offline

#7 2024-11-18 22:58:13

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,170

Re: [REQUEST] focusclock-git

-Q queries local and already installed packages. To install something you intend to install you use -S... like pacman, which is why paru is an AUR wrapper around the pacman syntax. If you want to search not yet installed packages you use -Ss

Last edited by V1del (2024-11-18 22:58:58)

Offline

#8 2024-11-18 23:34:56

korigamik
Member
Registered: 2024-11-18
Posts: 5

Re: [REQUEST] focusclock-git

ah, I didn't know that had to read pacman man page but I works when I use -S. not sure how but somehow I assumed -Q was for searching possible options and not downloading

Offline

#9 2024-11-19 02:50:55

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,193

Re: [REQUEST] focusclock-git

-Q is for things you have installed.  -S is for all of the things in the repositories you have enabled.

For example -Qm will show you all foreign packages you have installed.  -Qe will show you everything you have explicitly installed.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB