You are not logged in.

#1 2015-08-11 22:31:29

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Constructive criticism for my PKGBUILD? - mediterranean-gtk-themes-git

Can anyone see any problems with this before I upload it?

PKGBUILD

# Maintainer: Slithery <aur at slithery dot uk>

pkgname=mediterranean-gtk-themes-git
pkgver=v2.03.0.1.r30.g1c33164
pkgrel=1
pkgdesc="The Mediterranean family of GTK+2/3 themes"
arch=('any')
url=(https://github.com/rbrito/mediterranean-gtk-themes)
license=('GPL3')
optdepends=('gtk-engines: For GTK2 support'
            'gtk-engine-murrine: for GTK2 support'
            'gtk3: for GTK3 support')
makedepends=('git')
source=("${pkgname}::git+${url}")
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/${pkgname}"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

package () {
  cd ${srcdir}/${pkgname}
  find Mediterranean*/ -type f -exec install -Dm644 "{}" "${pkgdir}/usr/share/themes/{}" \;
}

Last edited by Slithery (2015-08-11 23:03:23)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#2 2015-08-12 02:20:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,553

Re: Constructive criticism for my PKGBUILD? - mediterranean-gtk-themes-git

Nothing major:

I prefer not to have the preceding "v" on the pkgver, it screws with vercmp.
The whole "set -o pipefail" subshell isn't really necessary, but if you want it to be totally generic, I guess it's ok.
You missed quoting the cd path in the package function. You could actually get rid of of ${srcdir} completely, as the functions are now guaranteed to start there.

Offline

Board footer

Powered by FluxBB