[pacman-dev] Split installs for makepkg

Mark Constable markc at renta.net
Sun Feb 10 01:58:59 EST 2008


I'd like any opinion about doing split installs using the
method outlined below. Is this a reasonable approach or am
I missing something obvious?

It seems to work okay and does not involve any hacking or
patching of /usr/bin/makepkg. This example is for building
qt-copy and qt-copy-doc from KDE4 svn trunk using
qt-copy/PKGBUILD as the "parent" PKGBUILD and removing the
build() function from the "child" PKGBUILD.qt-copy-doc and
putting that logic into the parent build_doc() function...

pkgname=qt-copy
pkgver=4.3.3
pkgrel=7
_pkgfqn=qt-x11-opensource-src-$pkgver
... other typical pre build variables

build()
{
  ... pre make instructions

  make || return 1
  build_doc
  ## ie; requires build_examples() + PKGBUILD.qt-copy-examples
  #build_examples
  make INSTALL_ROOT=$startdir/pkg install || return 1

  ... post make instructions
}

build_doc()
{
  mkdir -p $pkgdir/usr/share/doc/qt
  cp -r $srcdir/$_pkgfqn/doc/html/* $pkgdir/usr/share/doc/qt

  cd $startdir
  makepkg --asroot -R -p PKGBUILD.qt-copy-doc
  rm -rf $pkgdir/*
  cd $srcdir/$_pkgfqn
}

# ll /home/packages
total 38268
-rw-r--r-- 1 archlinux users 16812720 2008-02-10 16:07 qt-copy-4.3.3-7-x86_64.pkg.tar.bz2
-rw-r--r-- 1 archlinux users 22322007 2008-02-10 16:06 qt-copy-doc-4.3.3-7-any.pkg.tar.bz2

# pacman -Qi qt-copy
Name           : qt-copy
Version        : 4.3.3-7
URL            : http://www.trolltech.com/products/qt
Licenses       : GPL
Groups         : kdesvn  kdesvn-all
Provides       : qt=4.3.3
Depends On     : libpng  libjpeg  libxi  libxcursor  libxinerama  mesa  fontconfig  libxrandr  dbus  glib2
Optional Deps  : None
Required By    : poppler-qt  qca  qimageblitz  qt-copy-doc  soprano  strigi tapioca-qt  telepathy-qt
Conflicts With : qt
Replaces       : None
Installed Size : 45785.92 K
Packager       : Mark Constable <markc at renta.net>
Architecture   : x86_64
Build Date     : Sun 10 Feb 2008 16:07:08 EST
Install Date   : Sun 10 Feb 2008 16:07:13 EST
Install Reason : Explicitly installed
Install Script : No
Description    : The QT gui toolkit

# pacman -Qi qt-copy-doc
Name           : qt-copy-doc
Version        : 4.3.3-7
URL            : http://www.trolltech.com/products/qt
Licenses       : GPL
Groups         : None
Provides       : qt-doc
Depends On     : qt>=4.3.3
Optional Deps  : None
Required By    : None
Conflicts With : qt-doc
Replaces       : None
Installed Size : 56325.43 K
Packager       : Mark Constable <markc at renta.net>
Architecture   : any
Build Date     : Sun 10 Feb 2008 16:06:56 EST
Install Date   : Sun 10 Feb 2008 16:15:09 EST
Install Reason : Explicitly installed
Install Script : No
Description    : The QT gui toolkit documentation

--markc




More information about the pacman-dev mailing list