You are not logged in.

#1 2026-05-14 16:43:22

summers
Member
Registered: 2016-01-27
Posts: 33

How to specify a git branch in PKGBUILD

Hi, the PKGBUILD I'm using downloads a git archive via:

source=("git+https:url)

Is there a way to download a specific tag e.g. "git clone --branch"?

Offline

#2 2026-05-14 17:17:43

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 611

Re: How to specify a git branch in PKGBUILD

https://man.archlinux.org/man/PKGBUILD. … CS_SOURCES
Specify tag=tagname as fragment part.

Last edited by dimich (2026-05-14 17:23:03)

Offline

#3 2026-05-15 07:00:56

summers
Member
Registered: 2016-01-27
Posts: 33

Re: How to specify a git branch in PKGBUILD

So I need a query as part of the URL that selects the git branch? Let me look into what query goes on the end of the url for selecting branch across https.

Offline

#4 2026-05-15 08:13:49

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 611

Re: How to specify a git branch in PKGBUILD

summers wrote:

So I need a query as part of the URL that selects the git branch?

It's a part of source file definition, not a part of URL. It is parsed by makepkg and passed to git checkout command.

summers wrote:

Let me look into what query goes on the end of the url for selecting branch across https.

"git+https://" and "https://some-web-site/project.git" are different download protocols.

Offline

#5 2026-05-15 16:21:25

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,985

Re: How to specify a git branch in PKGBUILD

Moderator Note
Moving to Creating & Modifying Packages


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

Board footer

Powered by FluxBB