[pacman-dev] Split installs for makepkg

Mark Constable markc at renta.net
Mon Feb 25 07:50:30 EST 2008


On 25 Feb 2008 22:04, Xavier wrote:
> >  IIRC something like this was proposed by Alessio AKA mOLOk.
> >  You can find it in ML archives or bugtracker.
> 
> Right, you referenced everything there :
> http://bugs.archlinux.org/task/8187
> 
> About Mark's proposal, that doesn't seem like the cleanest way.
> I mean, calling makepkg from a PKGBUILD sounds a bit ugly.
> Probably cleaner implementations involve hacking or patching of makepkg :)

I posted to ping the issue of split packages and the main
point of my current suggestion is that it indeed does *not*
require any patching of makepkg meaning I can, and am, using
the method right now to produce split packages via an unpatched
makepkg, albeit in a crude and perhaps ugly manner.

The only real world example in actual use, that I am aware of,
is the KDEmod method and that requires a fairly invasive 9k
patch that seems difficult to forward port to later versions
of makepkg. This bothers me and is why I looked into another
method to achieve at least simple split packages (*-doc and
*-dev) out from the main package. To my surprise I found the
absolute simplest recursive approach actually seems to work,
for my immediate needs. For the record here again is a
snippet from my current kde-svn build system...

build() {
  ... do regular stuff to build qt-copy
  build_doc
}

build_doc(){
  mv $pkgdir $pkgdir.orig && mkdir $pkgdir || return 1
  mkdir -p $pkgdir/{usr/bin,usr/share/doc}
  mv $pkgdir.orig/usr/share/doc/* $pkgdir/usr/share/doc
  mv $pkgdir.orig/usr/bin/qtdemo $pkgdir/usr/bin

  cd $startdir
  makepkg --asroot -R -p PKGBUILD.doc
  rm -rf $pkgdir
  mv $pkgdir.orig $pkgdir
  cd $srcdir/$_pkgfqn
}

# cat qt-copy/PKGBUILD.doc
pkgname=qt-copy-doc
pkgver=4.3.3
pkgrel=20080225
pkgdesc="The Qt Gui Toolkit Documentation"
arch=(any)
url=http://www.trolltech.com/products/qt
_pkgfqn=qt-x11-opensource-src-$pkgver
depends=("qt>=$pkgver")
source=(ftp://ftp.trolltech.com/qt/source/$_pkgfqn.tar.gz)
license=(GPL)
replaces=(qt-doc)
provides=(qt-doc)
conflicts=(qt-doc)

--markc




More information about the pacman-dev mailing list