Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
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

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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