You are not logged in.

#1 2023-01-05 09:54:03

Adriik
Member
From: Argentina
Registered: 2022-03-10
Posts: 128

PKGBUILD feedback: footy-git

I was searching for a simple football fixture, and I found this: https://github.com/fritzrehde/footy

So, I made this PKGBUILD following the repo instructions:

# Maintainer: Adrián Romero <adriik.linux@proton.me>
pkgname=footy-git
_pkgname=footy
pkgver=r81.0608ed5
pkgrel=1
pkgdesc='A simple shell script that displays the latest football scores, fixtures and standings.'
arch=('any')
url='https://github.com/fritzrehde/footy'
license=('MIT')
depends=('jq' 'bash')
makedepends=('git') 
provides=("$_pkgname")
source=("$_pkgname::git+$url")
install="$_pkgname.install"
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/$_pkgname"

	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

}

package() {
	cd "$srcdir/$_pkgname"

	install -D -m644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	make install INSTALL_DIR="$pkgdir/usr/bin/"
}

And the install file:

post_install() {
  cat << EOF

Since footy uses the data provided by football-data.org, an api-key is required.
  
Set the api-key by running footy -k <api-key> 
or manually create the file $HOME/.config/footy/api-key.txt containing only the api-key.'

EOF
}

I know it's a simple PKGBUILD, but maybe there's a dumb error that I can't see or you guys have a more elegant solution.
I'm asking for feedback because I want to submit this to AUR, and I don't want to submit something ugly.

Thanks.


Solo soy un loco más. Please use [code] [/code] tags.
Command cheatsheetCommand not found?
If I write something wrong in English, please correct me.

Offline

#2 2023-01-05 10:54:30

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: PKGBUILD feedback: footy-git

source=("$_pkgname::git+$url")

will probably fail as the clone url needs toi be $url.git  .

Personally I'd put the  make install command before the command to place the license as it feels cleaner to me that way.


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

#3 2023-01-05 11:32:23

Adriik
Member
From: Argentina
Registered: 2022-03-10
Posts: 128

Re: PKGBUILD feedback: footy-git

will probably fail as the clone url needs toi be $url.git  .

< LANG=C makepkg
==> Making package: footy-git r81.0608ed5-1 (Thu Jan  5 08:22:34 2023)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning footy git repo...
Cloning into bare repository '/tmp/footy/footy'...
remote: Enumerating objects: 294, done.
remote: Counting objects: 100% (77/77), done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 294 (delta 43), reused 56 (delta 24), pack-reused 217
Receiving objects: 100% (294/294), 45.39 KiB | 815.00 KiB/s, done.
Resolving deltas: 100% (153/153), done.
==> Validating source files with md5sums...
    footy ... Skipped
==> Extracting sources...
  -> Creating working copy of footy git repo...
Cloning into 'footy'...
done.

It seems to work using the url without the .git:

> LANG=C git clone https://github.com/fritzrehde/footy
Cloning into 'footy'...
remote: Enumerating objects: 294, done.
remote: Counting objects: 100% (77/77), done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 294 (delta 43), reused 56 (delta 24), pack-reused 217
Receiving objects: 100% (294/294), 45.39 KiB | 693.00 KiB/s, done.
Resolving deltas: 100% (153/153), done.

But to be safe, I'm going to add the .git in PKGBUILD.


Solo soy un loco más. Please use [code] [/code] tags.
Command cheatsheetCommand not found?
If I write something wrong in English, please correct me.

Offline

Board footer

Powered by FluxBB