You are not logged in.
Hello fellow arch users, I have made a nice little program and a PKGBUILD to go with it, would somebody be so kind as to give me some feedback on it
(I think I will wait to see if anybody is interested in it before publishing it to the aur though)
# Maintainer: Nicolai Dagestad <aur@nicolai.dagestad.fr>
pkgname='url_handler-git'
pkgver=1.0.0.r0.2d0ffb9
pkgrel=1
arch=('x86_64' 'aarch64')
licence=('GPL3')
pkgdesc="A little go program to handle opening URI/URLs for you"
depends=('glibc')
makedepends=('go' 'git' 'scdoc')
optdepends=('wl-clipboard: wayland clipboard support'
'xclip: Xorg clipboard support')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
backup=('etc/xdg/url_handler/config.ini')
source=('git+https://git.sr.ht/~nicolai_dagestad/url_handler')
md5sums=('SKIP')
pkgver() {
cd "${pkgname%-git}"
printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}
build() {
export GOPATH="$srcdir"
cd "$srcdir/${pkgname%-git}"
go build -ldflags \
"-X main.AppName=url_handler \
-X main.VersionNumber=$pkgver"
scdoc < url_handler.1.scd | gzip > url_handler.1.gz
scdoc < url_handler.5.scd | gzip > url_handler.5.gz
}
package() {
export GOPATH="$srcdir"
cd "$srcdir/${pkgname%-git}"
install -Dm 755 url_handler -t "$pkgdir/usr/bin";
install -Dm 755 config.example.ini "$pkgdir/etc/xdg/url_handler/config.ini"
install -Dm 755 url_handler.1.gz -t "$pkgdir/usr/share/man/man1"
install -Dm 755 url_handler.5.gz -t "$pkgdir/usr/share/man/man5"
mkdir -p "$pkgdir/usr/share/url_handler/"
}
What I am most unsure about is the architecture, technically the package is only limited by what architectures the go compiler can run on so it might be incomplet.
Offline
Looks like you did find the vcs packages guidelines and use a pkgver function, but didn't look at the https://wiki.archlinux.org/title/Go_package_guidelines .
Please check them and adjust the PKGBUILD
Welcome to archlinux forums
Last edited by Lone_Wolf (2022-02-16 12:54:54)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
I did indeed not see that one, thank you (EDIT: seems like there is no support for emojis here )
Last edited by ndagestad (2022-02-16 17:45:53)
Offline