On Thu, Apr 4, 2013 at 10:24 AM, Stefan Husmann <stefan-husmann@t-online.de>wrote:
Hello,
I have problems to find a good solution for a bazaar based PKGBUILD to do an autobump of pkgver.
I use this PKGBUILD # Maintainer: Stefan Husmann <stefan-husmann@t-online.de> # based on a PKGBUILD of Mathias Nedrebø <mathias <at> nedrebo.org>
pkgname=emacs-xwidget-bzr pkgver=101273 pkgrel=1 arch=('i686' 'x86_64') pkgdesc="Emacs, bazaar-version from the xwidget branch" url="http://www.gnu.org/**software/emacs/emacs.html<http://www.gnu.org/software/emacs/emacs.html> " license=('GPL3') depends=('alsa-lib' 'gpm' 'giflib' 'desktop-file-utils' 'hicolor-icon-theme' 'libwebkit3' 'm17n-lib' 'gobject-introspection' 'imagemagick' 'librsvg' 'gconf') makedepends=('bzr' 'texinfo' 'glproto') options=('docs' '!emptydirs') provides=('emacs') conflicts=('emacs') install=emacs.install backup=('usr/share/**applications/emacs.desktop' 'usr/share/emacs/site-lisp/**subdirs.el') source=(bzr+http://bzr.**savannah.gnu.org/r/emacs/**xwidget<http://bzr.savannah.gnu.org/r/emacs/xwidget> ) md5sums=('SKIP') _bzrmod=xwidget
pkgver() { bzr version-info $srcdir/$_bzrmod | awk '/revno:/ {print $2}' }
build() { cd $srcdir/${_bzrmod} export CFLAGS="`pkg-config --cflags webkitgtk-3.0 ` -DHAVE_WEBKIT_OSR -g" export LDFLAGS="`pkg-config --libs webkitgtk-3.0 ` `pkg-config --libs MagickWand `"
./autogen.sh && ./configure --prefix=/usr --with-xwidgets \ --with-x-toolkit=gtk3 --with-sound \ --libexecdir=/usr/lib --localstatedir=/var --with-rsvg \ --with-gconf
make bootstrap make }
package() { cd $srcdir/${_bzrmod} make DESTDIR=$pkgdir install chown -R root:root $pkgdir/usr for _i in 16x16 24x24 32x32 48x48 128x128 do mv $pkgdir/usr/share/icons/**hicolor/${_i}/apps/emacs.png \ $pkgdir/usr/share/icons/**hicolor/${_i}/apps/$pkgname.**png done mv $pkgdir/usr/share/icons/**hicolor/scalable/apps/emacs.**svg \ $pkgdir/usr/share/icons/**hicolor/scalable/apps/$**pkgname.svg mv $pkgdir/usr/share/icons/**hicolor/scalable/mimetypes/**emacs-document.svg \ $pkgdir/usr/share/icons/**hicolor/scalable/mimetypes/$** pkgname-document.svg chmod 775 $pkgdir/var/games # adding the READMEs. install -Dm644 $srcdir/${_bzrmod}-build/**README \ $pkgdir/usr/share/doc/$**pkgname/README install -Dm644 $srcdir/${_bzrmod}-build/**README.xwidget \ $pkgdir/usr/share/doc/$**pkgname/README.xwidget # remove conflict with ctags package mv "$pkgdir"/usr/bin/{ctags,**ctags.emacs} mv "$pkgdir"/usr/share/man/man1/{**ctags.1.gz,ctags.emacs.1.gz} # remove conflict with the texinfo-package rm $pkgdir/usr/share/info/info.**info.gz # fix perms on /var/games chgrp -R games "$pkgdir"/var/games chmod 775 "$pkgdir"/var/games chmod 775 "$pkgdir"/var/games/emacs chmod 664 "$pkgdir"/var/games/emacs/* }
this gives : [haawda@frege 4.1]$ LANG=C makepkg ==> Making package: emacs-xwidget-bzr 101273-1 (Thu Apr 4 10:19:00 CEST 2013) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... -> Branching http://bzr.savannah.gnu.org/r/**emacs/xwidget<http://bzr.savannah.gnu.org/r/emacs/xwidget> ... bzr: ERROR: No such file: u'/home/haawda/paketierung/** maintained_by_me/emacs-**xwidget-bzr/4.1/xwidget/.bzr': [Errno 20] Not a directory: '/home/haawda/paketierung/**maintained_by_me/emacs-** xwidget-bzr/4.1/xwidget/.bzr' ==> ERROR: Failure while branching http://bzr.savannah.gnu.org/r/** emacs/xwidget <http://bzr.savannah.gnu.org/r/emacs/xwidget> Aborting...
Any clues?
'bzr revno <path>' will give you the rev number in one go. You can either use the distant repo path, or the local path. -- Maxime