You are not logged in.

#1 2017-03-30 12:27:05

amlamarra
Member
Registered: 2015-06-25
Posts: 50

PKGBUILD review request: timertab

Hello, I already submitted this to the AUR (https://aur.archlinux.org/packages/timertab/) and had others look at it, but I never made a post here and figured more eyes wouldn't hurt.

This is a bash script I wrote to help me manage my Systemd timers. Figured others might benefit from it. Here's a direct link to the Github page: https://github.com/amlamarra/timertab

# Maintainer: Andrew Lamarra <andrew DOT lamarra AT gmail DOT com>
pkgname=timertab
pkgver=1.2
pkgrel=1
pkgdesc="An easy way to manage your Systemd Timers."
arch=('any')
url="https://github.com/amlamarra/timertab"
license=('GPL')
depends=('systemd' 'bash')
source=("https://github.com/amlamarra/$pkgname/archive/$pkgver.tar.gz")
sha256sums=('62b00321fc6060342c1164063706817ff4c2b9be6735b61c81dca4aa603c7587')

package () {
	install -Dm755 "$srcdir/$pkgname-$pkgver/$pkgname" "$pkgdir/usr/bin/$pkgname"
	install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

Offline

#2 2017-03-30 12:53:58

mis
Member
Registered: 2016-03-16
Posts: 234

Re: PKGBUILD review request: timertab

Looking at the GitHub repo the license is GPL 3, so it should be

license=('GPL3')

And for GPL/GPL2/GPL3 you don't need to install a LICENSE file. Other than that it looks good to me.

Just some minor notes:
The functions in PKGBUILD files guarantee to start in $srcdir, so you  could reduce the package() function to

package() {
  install -Dm755 "$pkgname-$pkgver/$pkgname" "$pkgdir/usr/bin/$pkgname"
}

or (but this is only about personal preference wink )

package() {
  cd $pkgname-$pkgver
  install -Dm755 timertab "$pkgdir"/usr/bin/timertab
}

Maybe you want to save the source tarball as $pkgname-$pkgver.tar.gz instead of just $pkgver.tar.gz

source=("$pkgname-$pkgver.tar.gz::https://github.com/amlamarra/$pkgname/archive/$pkgver.tar.gz")

Also personal preference..

Last edited by mis (2017-03-30 13:01:37)

Offline

#3 2017-03-30 13:05:14

amlamarra
Member
Registered: 2015-06-25
Posts: 50

Re: PKGBUILD review request: timertab

Thanks for the help!

So for the first release, I created it with git & pushed to Github. After that I created them on Github. I don't see how to change the name of the tarball/zip. Do you know how?

Offline

#4 2017-03-30 13:11:16

mis
Member
Registered: 2016-03-16
Posts: 234

Re: PKGBUILD review request: timertab

You don't need to do that on GitHub. Writing the name in front of the source url folled by :: tells makepkg to save the file it downloads with that name.

source=("some-name.tar.gz::https://github.com/amlamarra/$pkgname/archive/$pkgver.tar.gz")

The above would save the tarball as some-name.tar.gz

Offline

#5 2017-03-30 13:29:27

amlamarra
Member
Registered: 2015-06-25
Posts: 50

Re: PKGBUILD review request: timertab

Awesome, thanks!  My updated PKGBUILD:

# Maintainer: Andrew Lamarra <andrew DOT lamarra AT gmail DOT com>
pkgname=timertab
pkgver=1.2
pkgrel=1
pkgdesc="An easy way to manage your Systemd Timers."
arch=('any')
url="https://github.com/amlamarra/timertab"
license=('GPL3')
depends=('systemd' 'bash')
source=("$pkgname-$pkgver.tar.gz::https://github.com/amlamarra/$pkgname/archive/$pkgver.tar.gz")
sha256sums=('62b00321fc6060342c1164063706817ff4c2b9be6735b61c81dca4aa603c7587')

package () {
	install -Dm755 "$pkgname-$pkgver/$pkgname" "$pkgdir/usr/bin/$pkgname"
}

Offline

Board footer

Powered by FluxBB