You are not logged in.

#1 2025-01-21 14:17:21

Erwin Iosef
Member
Registered: 2024-05-22
Posts: 68

[SOLVED]PKGBUILD for cursor theme: Breeze Dark Red

# Maintainer:Erwin-Iosef
#PKGBUILD Credit https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=breeze-default-cursor-theme
pkgname=breeze-default-cursor-theme
pkgver=1.0
pkgrel=1
pkgdesc="Breeze Dark Red Cursor Theme."
arch=('any')
url="https://store.kde.org/p/2075700"
license=('GPL')
source=("git+https://github.com/Erwin-Iosef/Breeze-Dark-Red.git")
makedepends=('git')
sha256sums=('SKIP')

package() {
	install -d $pkgdir/usr/share/icons
	cp -r Breeze_Dark_Red $pkgdir/usr/share/icons/Breeze_Dark_Red
	find ${pkgdir} -type f -exec chmod 644 {} \;
	find ${pkgdir} -type d -exec chmod 755 {} \;
}

This is the PKGBUILD I created for Breeze Dark Red

I want to know if there is a way I could make the PKGBUILD grab the latest release from GitHub (something like pkgver() but for releases) and integrity checksum(like this sha) automatically.

I'd appreciate any improvement suggestions or advice also. Thank you as always.

Last edited by Erwin Iosef (2025-01-27 10:46:25)

Offline

#2 2025-01-21 15:15:39

Erwin Iosef
Member
Registered: 2024-05-22
Posts: 68

Re: [SOLVED]PKGBUILD for cursor theme: Breeze Dark Red

Actually ignore the source tag for now I'm working on it.

Offline

#3 2025-01-21 16:36:41

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,225

Re: [SOLVED]PKGBUILD for cursor theme: Breeze Dark Red

You can, but should not in your case, use SKIP in the checksum array. But for a binary download like that you should really have a checksum in place. Can you expand on why you want to ignore the checksum?

Offline

#4 2025-01-21 17:18:04

Erwin Iosef
Member
Registered: 2024-05-22
Posts: 68

Re: [SOLVED]PKGBUILD for cursor theme: Breeze Dark Red

I should update on the situation, I couldn't find the binary package, the source I posted was wrong and I could only download it on pling. Hence I replaced the source with my own git, so I guess I'll skip the checksum.

But as part of learning, I'd like to know how you can automate checksum and pkg latest release finding without having to do it manually.

Can you expand on why you want to ignore the checksum?

No no, I did not want to skip the checksum but a way to automate finding it, if possible.

Offline

#5 2025-01-21 17:20:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,347

Re: [SOLVED]PKGBUILD for cursor theme: Breeze Dark Red

Erwin Iosef wrote:

But as part of learning, I'd like to know how you can automate checksum and pkg latest release finding without having to do it manually.

Simple, you don't. At most, you script it outside the PKGBUILD.

Offline

#6 2025-01-21 17:23:10

Erwin Iosef
Member
Registered: 2024-05-22
Posts: 68

Re: [SOLVED]PKGBUILD for cursor theme: Breeze Dark Red

Oh okay. One last question would be if the lines

	find ${pkgdir} -type f -exec chmod 644 {} \;
	find ${pkgdir} -type d -exec chmod 755 {} \;

Are required, as I sampled this from another PKGBUILD and I just want it to install a cursor theme with the correct permissions.

Offline

#7 2025-01-21 17:31:05

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,347

Re: [SOLVED]PKGBUILD for cursor theme: Breeze Dark Red

You should be asking a lot more questions, you just turned this into an invalid VCS PKGBUILD.

https://wiki.archlinux.org/title/VCS_package_guidelines

Are the permissions wrong and need changed? Don't just copy random things, check.

Also, you must quote paths that have variables that could contain spaces, such as $srcdir and $pkgdir

That license is is no longer how Arch is specifying them. https://wiki.archlinux.org/title/PKGBUILD#license

Last edited by Scimmia (2025-01-21 17:32:32)

Offline

#8 2025-01-21 19:06:58

Erwin Iosef
Member
Registered: 2024-05-22
Posts: 68

Re: [SOLVED]PKGBUILD for cursor theme: Breeze Dark Red

Scimmia wrote:

You should be asking a lot more questions, you just turned this into an invalid VCS PKGBUILD.

Ah right, I got careless. It's done.

Are the permissions wrong and need changed? Don't just copy random things, check.

Yeah I got too lazy, I modified them and learnt some things along the way, thanks!

That license is is no longer how Arch is specifying them. https://wiki.archlinux.org/title/PKGBUILD#license

Right, fixed.

Here's the new PKGBUILD

# Maintainer:Erwin-Iosef erwiniosef@gmail.com
pkgname=breeze-dark-red-cursor-git
_curname="Breeze-Dark-Red"
pkgver=1.0
pkgrel=1
pkgdesc="Breeze Dark Red Cursor Theme by fbm224."
arch=('any')
url="https://store.kde.org/p/2075700"
license=('GPL-3.0-or-later')
source=("git+https://github.com/Erwin-Iosef/Breeze-Dark-Red.git")
makedepends=('git')
sha256sums=('SKIP')

pkgver() {
  cd "$_curname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

package() {
    cd "${srcdir}/${_curname}"
    install -dm755 "${pkgdir}/usr/share/icons"
	cp -dr --no-preserve=ownership ${_curname} $pkgdir/usr/share/icons/${_curname}
}

Last edited by Erwin Iosef (2025-01-21 19:57:17)

Offline

#9 2025-01-27 10:45:59

Erwin Iosef
Member
Registered: 2024-05-22
Posts: 68

Re: [SOLVED]PKGBUILD for cursor theme: Breeze Dark Red

Marking as solved

Offline

Board footer

Powered by FluxBB