What does $source do in our CE git PKGBUILDS?

I would like to know what does source=("${_pkgname}::git+https://github.com/EndeavourOS-Community-Editions/${_pkgname}.git") sha256sums=('SKIP') do?

Below is the complete PKGBUILD file.

_pkgname=awesome
pkgname=eos-skel-ce-awesome
pkgver=1.0
pkgrel=6
pkgdesc="pre user creation skel setup for Awesome EOS-CE"
arch=('any')
groups=('eos-ce')
url="https://github.com/EndeavourOS-Community-Editions/${_pkgname}"
license=('GPL')
conflicts=('eos-ce-sway')
depends=('git')
source=("${_pkgname}::git+https://github.com/EndeavourOS-Community-Editions/${_pkgname}.git")
sha256sums=('SKIP')

package() {
    PREFIX=/etc/skel
    cd "$_pkgname"
    mkdir -p "${pkgdir}${PREFIX}/.config/"
    cp -R ".config/" "${pkgdir}${PREFIX}/"
    install -Dm644 ".gtkrc-2.0" "${pkgdir}${PREFIX}/.gtkrc-2.0"
    install -Dm644 ".nanorc" "${pkgdir}${PREFIX}/.nanorc"
    install -Dm644 ".Xresources" "${pkgdir}${PREFIX}/.Xresources"
    install -Dm644 "xed.dconf" "${pkgdir}${PREFIX}/xed.dconf"
}

I am not sure what your question is.

The source line in a PKGBUILD determines where the files to build the package are located. In this case, that line tells you they are at https://github.com/EndeavourOS-Community-Editions/awesome.git

The line sha256sums=('SKIP') means we are ignoring package sums. I am not sure why that PKGBUILD is ignoring sums.

That need to be answered by @joekamprad he created that :slight_smile: .

I’m creating a PKGBUILD for something I’ve been doing for the last few days. I’m a bit confused between url and source.

  • Do I need to have a similar source url to the one in the PKGBUILD I shared?

  • Or just having the url pointing to my GitHub repository is enough?

  • I’m confused by the ${_pkgname}.::git+https://github.com/EndeavourOS-Community-Editions/${_pkgname}.git address format. Specifically ${_pkgname}.::git+https: part.

    • How does `${_pkgname}.::git+https:` this par work?
    • Just having the git `https://github.com/s4ndm4n82/eos-awesome-ce.git` not going to work?

NOTE: I know the ${_pkgname} is a variable defined at the start.

You probably need a source line, yes. That tells you where the files come from.

Unless it is a meta package, it will generally have a source of some sort.

The url is purely informational. It should link back to the project.

So the variable source contains the expanded and concatenated info on that line e.g.

a="Package"
b="version"
source=$a$band all of this text here.
echo $source

It basically creates a variable from different elements, by joining stuff together.

1 Like

The part before the :: is what is will be named. So basically it will be called awesome after it is downloaded.

git+https means that the source is a git repo and it will be accessed by https.

I just found what that ${_pkgname}.::git+https: part means.

source=('directory::url#fragment?query')

It was way inside the Arch wiki.

It is also described here:
https://wiki.archlinux.org/title/PKGBUILD#source

if it fetches the “source” directly from a git branch it does noit use a tarball file that could be checksummed so it skips to do so.
Not sure if it is needed to add this but from my knowledge it will fail on building package if the line is not there?

==> ERROR: Integrity checks are missing for: source

I’ll open up a new thread once I’m ready with my PKGBUILD and I would need some help putting this in AUR nothing big something small.

What I want to do is to fetch a set of files from my git repo and put them in the system.

There are lots of different ways to create a PKGBUILD. I would recommend one that does something similar to what you are trying to do and using that as a base.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.