You are not logged in.
Pages: 1
Hi, This is my first time making a PKGBUILD and contributing to the AUR.
I'm basing this off of the rustlings PKGBUILD, but since this uses a binary release, it doesn't require a build step.
I have carelessly pushed a gostlings.git package as well, but I don't know how to delete it, for this one it hasn't been pushed and I wanted it to be reviewed first.
# Maintainer: Riel Joseph <bulaybulay.rielj@gmail.com>
#
pkgname=golings-bin
pkgver=0.6.2
pkgrel=1
pkgdesc="Rustlings for Golang this time"
arch=('x86_64')
url="https://github.com/mauricioabreu/golings"
license=('APACHE')
depends=('go')
provides=("golings")
conflicts=("golings")
install="golings.install"
source_x86_64=("golings_${pkgver}_Linux_x86_64.tar.gz::https://github.com/mauricioabreu/golings/releases/download/v${pkgver}/golings_${pkgver}_Linux_x86_64.tar.gz")
sha256sums_x86_64=('3235016060403a807961d5bda9643104fea022a6283eb09ebb4bbc36131a28c7')
package() {
install -D golings -t "$pkgdir"/usr/bin/
install -Dm 644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
Should I include tar as one of the makedepends and also git on the depends?
Last edited by RielJ (2023-12-13 09:36:02)
Offline
Note: Packages in the AUR assume that base-devel is installed in the build environment.
base-devel contains libtool which depends on tar, so depending on tar is not needed.
The package doesn't use git at all, so doesn't need it.
There is a problem with the license though :
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format.
Such a copyright notice is not included in the license file, possibly making the license invalid .
You should file a ticket with upstream to correct this.
Why did you decide upon creating a -bin package instead of building from source ?
Last edited by Lone_Wolf (2023-12-13 10:47:15)
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
install="golings.install"
Please post the contents of golings.install.
Offline
https://wiki.archlinux.org/title/Arch_User_Repository#Prerequisites wrote:Note: Packages in the AUR assume that base-devel is installed in the build environment.
base-devel contains libtool which depends on tar, so depending on tar is not needed.
The package doesn't use git at all, so doesn't need it.
There is a problem with the license though :
apache license v2 wrote:APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format.Such a copyright notice is not included in the license file, possibly making the license invalid .
You should file a ticket with upstream to correct this.Why did you decide upon creating a -bin package instead of building from source ?
For applying the apache license, all I need is to add a LICENSE file to the directory where the PKGBUILD is resided?
I find it easier to run the bin package instead of building it from source, but I'm going to try and implement the source one.
Offline
install="golings.install"
Please post the contents of golings.install.
This is inspired by https://aur.archlinux.org/packages/rustlings package so the content is very much the same.
post_install() {
echo "You still need to clone the official golings repository!"
}
Offline
https://wiki.archlinux.org/title/Arch_User_Repository#Prerequisites wrote:Note: Packages in the AUR assume that base-devel is installed in the build environment.
base-devel contains libtool which depends on tar, so depending on tar is not needed.
The package doesn't use git at all, so doesn't need it.
There is a problem with the license though :
apache license v2 wrote:APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format.Such a copyright notice is not included in the license file, possibly making the license invalid .
You should file a ticket with upstream to correct this.Why did you decide upon creating a -bin package instead of building from source ?
This is going to be the PKGBUILD if it's going to use the source instead of the bin.
# Maintainer: Riel Joseph <bulaybulay.rielj@gmail.com>
pkgname=golings
pkgver=0.6.2
pkgrel=1
pkgdesc="Rustlings for Golang this time"
arch=('x86_64')
url="https://github.com/mauricioabreu/golings"
license=('APACHE')
depends=('go')
provides=("golings")
conflicts=("golings")
install="golings.install"
source=("${pkgname}-${pkgver}::git+https://github.com/mauricioabreu/golings.git#tag=v${pkgver}")
md5sums=('SKIP')
build() {
cd ${pkgname}-${pkgver}/golings
go build -o ../../golings
}
package() {
cd ${srcdir}
install -D golings -t "$pkgdir"/usr/bin/
cd ${pkgname}-${pkgver}
install -Dm 644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
Last edited by RielJ (2023-12-14 07:50:27)
Offline
Hi, This is my first time making a PKGBUILD and contributing to the AUR.
My edits, according this wiki article:
# Maintainer: Riel Joseph <bulaybulay.rielj at gmail dot com>
pkgname=golings-bin
pkgver=0.6.2
pkgrel=1
pkgdesc="Rustlings for Golang this time"
arch=('x86_64')
url="https://github.com/mauricioabreu/${pkgname%-bin}"
license=('APACHE')
depends=('go')
source=("${pkgname%-bin}-${pkgver}.tar.gz::${url}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_Linux_x86_64.tar.gz")
sha256sums=('3235016060403a807961d5bda9643104fea022a6283eb09ebb4bbc36131a28c7')
conflicts=(${pkgname%-bin})
install=${pkgname%-bin}.install
package() {
install -Dm755 ${pkgname%-bin} -t ${pkgdir}/usr/bin/
}
Offline
Nebulosa, why do you leave out the license and the docs? The license file is absolutely needed, and te README.md does not harm.
Offline
Nebulosa, why do you leave out the license and the docs? The license file is absolutely needed, and te README.md does not harm.
You are right, license absolutely needed, but common licenses already installed in system. If it was, for example, 'MIT' - it requies explicit installation.
Regarding the README file, installing it not a common practice and, I think, just useless.
Offline
Pages: 1