You are not logged in.

#1 2023-12-13 09:31:17

RielJ
Member
Registered: 2021-06-25
Posts: 30

PKGBUILD review: golings

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

#2 2023-12-13 10:46:12

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,394

Re: PKGBUILD review: golings

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 ?

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 to complicated ?
Try clean chroot manager by graysky

Offline

#3 2023-12-13 22:34:33

loqs
Member
Registered: 2014-03-06
Posts: 17,765

Re: PKGBUILD review: golings

install="golings.install"

Please post the contents of golings.install.

Offline

#4 2023-12-14 04:43:05

RielJ
Member
Registered: 2021-06-25
Posts: 30

Re: PKGBUILD review: golings

Lone_Wolf wrote:
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

#5 2023-12-14 04:44:12

RielJ
Member
Registered: 2021-06-25
Posts: 30

Re: PKGBUILD review: golings

loqs wrote:
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

#6 2023-12-14 07:49:53

RielJ
Member
Registered: 2021-06-25
Posts: 30

Re: PKGBUILD review: golings

Lone_Wolf wrote:
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

#7 2023-12-14 12:17:28

Nebulosa
Member
Registered: 2009-08-24
Posts: 48

Re: PKGBUILD review: golings

RielJ wrote:

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

#8 2023-12-14 19:49:00

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: PKGBUILD review: golings

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

#9 2023-12-15 07:57:13

Nebulosa
Member
Registered: 2009-08-24
Posts: 48

Re: PKGBUILD review: golings

Stefan Husmann wrote:

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

Board footer

Powered by FluxBB