1

I'm new to Arch Linux and just wanted to theme my Gnome Shell by installing gnome-shell-extension-user-theme for the Gnome Tweak Tool. However I keep getting an error when trying to build gnome-shell-extension-common-git from AUR. The version number contains a hypen but if I edit the PKGBUILD it just gets written over again.

I run:

yaourt gnome-shell-extension-common-git

View contents of PKGBUILD:

# Maintainer: Alucryd <alucryd at gmail dot com>
# Contributor: Sebastian Lenz <sebastian@archusers.de>

pkgname=gnome-shell-extension-common-git
pkgver=3.8.1.7
pkgrel=1
pkgdesc="Common files for the GNOME Shell Extensions"
arch=('any')
url="http://live.gnome.org/GnomeShell/Extensions"
license=('GPL' 'LGPL')
depends=('gnome-shell')
makedepends=('git' 'gnome-common' 'intltool')
provides=('gnome-shell-extension-common')
conflicts=('gnome-shell-extension-git' 'gnome-shell-extension-common')
source=('git+http://git.gnome.org/browse/gnome-shell-extensions#branch=gnome-3-8')
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}"/gnome-shell-extensions

  git describe | sed 's|\(.*-.*\)-.*|\1|;s|-|.|'
}

build() {
  cd "${srcdir}"/gnome-shell-extensions

  ./autogen.sh --prefix=/usr --disable-schemas-compile --enable-extensions=""
  make
}

package() {
  cd "${srcdir}"/gnome-shell-extensions

  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:

Get an error when building:

==> Starting pkgver()...
==> Updated version: gnome-shell-extension-common-git 3.8.3.1.real-2-1
==> ERROR: pkgver is not allowed to contain colons, hyphens or whitespace.
==> ERROR: Makepkg was unable to build gnome-shell-extension-common-git.
==> Restart building gnome-shell-extension-common-git ? [y/N]

New Contents of PKGBUILD:

# Maintainer: Alucryd <alucryd at gmail dot com>
# Contributor: Sebastian Lenz <sebastian@archusers.de>

pkgname=gnome-shell-extension-common-git
pkgver=3.8.3.1.real-2
pkgrel=1
pkgdesc="Common files for the GNOME Shell Extensions"
arch=('any')
url="http://live.gnome.org/GnomeShell/Extensions"
license=('GPL' 'LGPL')
depends=('gnome-shell')
makedepends=('git' 'gnome-common' 'intltool')
provides=('gnome-shell-extension-common')
conflicts=('gnome-shell-extension-git' 'gnome-shell-extension-common')
source=('git+http://git.gnome.org/browse/gnome-shell-extensions#branch=gnome-3-8')
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}"/gnome-shell-extensions

  git describe | sed 's|\(.*-.*\)-.*|\1|;s|-|.|'
}

build() {
  cd "${srcdir}"/gnome-shell-extensions

  ./autogen.sh --prefix=/usr --disable-schemas-compile --enable-extensions=""
  make
}

package() {
  cd "${srcdir}"/gnome-shell-extensions

  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:

If I edit the file to remove the hypthen it makes no difference as it is added again when I try to build again.

  • 1
    Please leave a note on the AUR page so that the PKGBUILD maintainer updates the PKGBUILD with Evan's fix – jasonwryan Jul 6 '13 at 21:00
3

Change

git describe | sed 's|\(.*-.*\)-.*|\1|;s|-|.|'

to

git describe | sed 's|\(.*-.*\)-.*|\1|;s|-|.|g'

The package version originally had one hyphen in it. The version you are building has two hyphens. The g at the end of the s (substitute) command causes sed to substitute for multiple matches instead of just one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.