You are not logged in.
Hello-
cbxv - Go program
Native dependencies:
libunarr (already in AUR as libunarr and libunarr-git).
gtk3
# Maintainer: name <name at domain dot com>
pkgname=cbxv-git
pkgver=0.4.1
pkgrel=1
pkgdesc='The high fidelity comic book viewer'
arch=('x86_64')
url='https://github.com/mftb0/cbxv'
license=('MIT')
depends=('gtk3' 'libunarr')
makedepends=('git' 'go' 'gtk3')
provides=('cbxv')
conflicts=('cbxv')
source=("${pkgname}::git+${url}")
sha1sums=('SKIP')
build() {
cd "${srcdir}/${pkgname}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build -o out/cbxv ./cmd/cbxv/*.go
}
package() {
cd "${srcdir}/${pkgname}"
install -Dm644 ${srcdir}/${pkgname}/LICENSE ${pkgdir}/usr/share/licenses/cbxv/LICENSE
install -Dm755 ${srcdir}/${pkgname}/out/cbxv ${pkgdir}/usr/bin/cbxv
install -Dm644 ${srcdir}/${pkgname}/build/assets/lin/wtf.swbd.cbxv.desktop ${pkgdir}/usr/share/applications/cbxv.desktop
install -Dm644 ${srcdir}/${pkgname}/build/assets/lin/logo_cbxv.png ${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/logo_cbxv.png
}
Thank you for your consideration.
Offline
Minor nits
depends=('gtk3' 'libunarr')
makedepends=('git' 'go' 'gtk3')
gtk3 is not needed in makedepends as well as depends.
install -Dm644 ${srcdir}/${pkgname}/LICENSE ${pkgdir}/usr/share/licenses/cbxv/LICENSE
$srcdir and $pkgdir should always be quoted as they may contain spaces.
The license should be in cbxv-git / $pkgname not cbxv.
Offline
Will do. Thanks so much for your feedback.
Offline
-git-packages shoud have a pkgver function. The rename of the repo in the source array is not needed.
Offline
I tried to incorporate all the changes mentioned here. Thanks for all the feedback.
# Maintainer: name <name at domain dot com>
pkgname=cbxv-git
pkgver=v0.4.1
pkgrel=1
pkgdesc='The high fidelity comic book viewer'
arch=('x86_64')
url='https://github.com/mftb0/cbxv'
license=('MIT')
depends=('libunarr')
makedepends=('git' 'go' 'gtk3')
provides=('cbxv')
conflicts=('cbxv')
source=("${pkgname}::git+${url}")
sha1sums=('SKIP')
pkgver() {
cd "${srcdir}/${pkgname}"
git describe --tags
}
build() {
cd "${srcdir}/${pkgname}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build -o out/cbxv ./cmd/cbxv/*.go
}
package() {
cd "${srcdir}/${pkgname}"
install -Dm644 "${srcdir}/${pkgname}"/LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
install -Dm755 "${srcdir}/${pkgname}"/out/cbxv "${pkgdir}"/usr/bin/cbxv
install -Dm644 "${srcdir}/${pkgname}"/build/assets/lin/wtf.swbd.cbxv.desktop "${pkgdir}"/usr/share/applications/cbxv.desktop
install -Dm644 "${srcdir}/${pkgname}"/build/assets/lin/logo_cbxv.png "${pkgdir}"/usr/share/icons/hicolor/1024x1024/apps/logo_cbxv.png
}
Offline