You are not logged in.
TL;DR I have a small program that I'd like to package on the AUR, and I would like two packages. One of those should be `center-git`, which gets updated every commit to master and the other should be `center` which only gets updated whenever there is a new tag (you can think of it as the "stable" release).
So far I'm managed to get `center-git` working, but `center` not so much. Here is my PKGBUILD:
# Maintainer: Thomas Voss <mail@thomasvoss.com>
pkgname=center
pkgver=1.0.0
pkgrel=1
pkgdesc="Center text to standard output"
arch=('x86_64' 'i686')
url="https://git.thomasvoss.com/center"
license=('BSD')
makedepends=('git')
provides=("$pkgname")
conflicts=("$pkgname")
source=("$pkgname::git+git://git.thomasvoss.com/center.git#tag=v$pkgver")
b2sums=('SKIP')
pkgver() {
cd "$pkgname"
git describe --tags --long | sed 's/^v//; s/-.*//'
}
build() {
cd $pkgname
make
}
package() {
cd $pkgname
make DESTDIR="$pkgdir" install
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}The key part here is adding "#tag=v${pkgver}" which I got from here: https://man.archlinux.org/man/PKGBUILD. … CS_SOURCES
When I run `makepkg -s; cd center; git log --oneline` though I can see that HEAD is on the latest commit and not the latest tag. I'm not really quite sure how to proceed but maybe someone here does.
Last edited by MangoMan1 (2022-10-13 01:44:07)
Fair.
Offline
The directory centre is the git mirror of the repository. The directory src/centre is used for the build.
Offline
The directory centre is the git mirror of the repository. The directory src/centre is used for the build.
Yes, but from the PKGBUILD(5) manual:
fragment
(optional) Allows specifying a revision number or branch for makepkg to checkout from the VCS. A fragment has the form type=value, for example to checkout a given revision the source line would be source=(url#revision=123). The available types depends on the VCS being used:...
git
branch, commit, tag...
I'm following what the manual says to do, but it doesn't seem to be working
Fair.
Offline
$ cd src/center/
$ git describe
v1.0.0
$ cd ../..
$ cd center/
$ git describe
v1.0.0-1-g106b303Last edited by loqs (2022-10-13 01:40:43)
Offline
Ah yeah I see now. So it was working the whole time, I just looked in the wrong place ![]()
Thanks!
Fair.
Offline