jedahan / zr

zsh plugin manager written in rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Publish PKGBUILD for installation on Arch Linux

I60R opened this issue · comments

commented

Hello, and thanks for making this program!

I'd like to install it with my distro package manager instead of cargo, however this requires a PKGBUILD file to be published into AUR. Could you publish it?

The following PKGBUILD works for me:

# Maintainer: Jonathan Dahan <hi@jonathan.is>

pkgname=zr
pkgver=0.7.2
pkgrel=1
makedepends=('rust' 'cargo')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
pkgdesc="quick, simple zsh package manager"
license=('MPL-2.0')
source=("git+https://github.com/jedahan/zr.git")
md5sums=('SKIP')

package() {
    cd "${srcdir}"/zr
    cargo install --path . --root="${pkgdir}/usr"
    rm "${pkgdir}/usr/.crates.toml"
}

I’m not on arch, but am happy to give you permission to publish it. A few questions about the pkgbuild first though. Can you add the md5sum? I do have releases pushed through github, so does this have support for stable versions? Are there any other pieces of metadata that will help arch users, for example pointing to the changelog or readme?

commented

As far as I understand, integrity checks already are well handled by git, so there's no need in populating md5sums entry. It's also discouraged to publish binaries to AUR in the case when sources are available, so compiling from the sources is fine.

I don't know if there's somehting useful that could be added to this PKGBUILD; there's a brief mentioning of changelog entry in Arch wiki, however I've never seen it's used somewhere.

If you give me permission to publish this PKGBUILD, then I'll reformat it accordingly to VCS package guildelines with version autobump, to skip manually updating burden

commented
# Maintainer: 160R <160R@protonmail.com>

pkgname=zr-git
pkgver=git
pkgrel=1
makedepends=('rust' 'cargo' 'git')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
pkgdesc="quick, simple zsh package manager"
license=('MPL-2.0')
source=("git+https://github.com/jedahan/zr.git")
md5sums=('SKIP')

pkgver() {
    cd "${srcdir}"/zr
    git describe --tags --abbrev=0
}

package() {
    cd "${srcdir}"/zr
    cargo install --path . --root="${pkgdir}/usr"
    rm "${pkgdir}/usr/.crates.toml"

    install -D -m644 license "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

This will pick the lastest tag in repository and will use it as package version.
Also, license is included.

Thank you!