I have finished implementing the basics of package splitting in makepkg. Everything works as expected when just making packages and capturing logs but there is some small output issues that need tidying up and checking that other functionality work (e.g. repackaging is an issue....)

Anyway you can see the work on my "splitpkg" branch:
http://dev.archlinux.org/~allan/gitweb/gitweb.cgi?p=pacman.git;a=shortlog;h=refs/heads/splitpkg

For your interest, I have attached the same package written in three different ways to show you what makepkg can now do:

PKGBUILD.1 - Traditional build
PKGBUILD.2 - Splitting the packaging step from build step. Limits fakeroot usage
PKGBUILD.3 - Package splitting


# $Id: PKGBUILD 366 2008-04-19 13:01:23Z travis $
# Maintainer: Allan McRae <[EMAIL PROTECTED]>

pkgname=abs
pkgver=2.3
pkgrel=1
pkgdesc="Utilities to download and work with the Arch Build System (ABS)"
arch=('i686' 'x86_64')
url="http://projects.archlinux.org/git/?p=abs.git";
license=('GPL')
depends=('bash' 'rsync')
backup=(etc/abs.conf)
install=abs.install
source=(ftp://ftp.archlinux.org/other/abs/${pkgname}-${pkgver}.tar.gz)
md5sums=('d6fd791aa487ba8bb5ff48c3ace20592')

build() {
  cd ${srcdir}/${pkgname}

  make CONFDIR=/etc/ || return 1
  make CONFDIR=/etc/ DESTDIR=${pkgdir} install || return 1

  # Add readme file, and make base /var/abs path
  install -dm0755 ${pkgdir}/var/abs/local/
  install -Dm0644 ${srcdir}/abs/README ${pkgdir}/var/abs/README

  # change ABS tags for x86_64 to correct values
  if [ "$CARCH" = "x86_64" ]; then
    sed -i "s|i686|x86_64|g" ${pkgdir}/etc/abs.conf
  fi
}

# vim: set ts=2 sw=2 noet:
# $Id: PKGBUILD 366 2008-04-19 13:01:23Z travis $
# Maintainer: Allan McRae <[EMAIL PROTECTED]>

pkgname=abs
pkgver=2.3
pkgrel=1
pkgdesc="Utilities to download and work with the Arch Build System (ABS)"
arch=('i686' 'x86_64')
url="http://projects.archlinux.org/git/?p=abs.git";
license=('GPL')
depends=('bash' 'rsync')
backup=(etc/abs.conf)
install=abs.install
source=(ftp://ftp.archlinux.org/other/abs/${pkgname}-${pkgver}.tar.gz)
md5sums=('d6fd791aa487ba8bb5ff48c3ace20592')

build() {
 cd ${srcdir}/${pkgname}
 make CONFDIR=/etc/ || return 1

 # change ABS tags for x86_64 to correct values
 if [ "$CARCH" = "x86_64" ]; then
   sed -i "s|i686|x86_64|g" ${pkgdir}/etc/abs.conf
 fi
}

package() {
 cd ${srcdir}/${pkgname}
 make CONFDIR=/etc/ DESTDIR=${pkgdir} install || return 1

 # Add readme file, and make base /var/abs path
 install -dm0755 ${pkgdir}/var/abs/local/
 install -Dm0644 ${srcdir}/abs/README ${pkgdir}/var/abs/README
}

# vim: set ts=2 sw=2 noet:

# $Id: PKGBUILD 366 2008-04-19 13:01:23Z travis $
# Maintainer: Allan McRae <[EMAIL PROTECTED]>

pkgname=('abs-core' 'abs-readme')
pkgver=2.3
pkgrel=1
arch=('i686' 'x86_64')
url="http://projects.archlinux.org/git/?p=abs.git";
license=('GPL')
source=(ftp://ftp.archlinux.org/other/abs/abs-${pkgver}.tar.gz)
md5sums=('d6fd791aa487ba8bb5ff48c3ace20592')

build() {
  cd ${srcdir}/abs
  make CONFDIR=/etc/ || return 1
  
  # change ABS tags for x86_64 to correct values
  if [ "$CARCH" = "x86_64" ]; then
    sed -i "s|i686|x86_64|g" ${pkgdir}/etc/abs.conf
  fi
}

package_abs-core() {  
  pkgdesc="Utilities to download and work with the Arch Build System (ABS)"
  depends=('bash' 'rsync')
  backup=(etc/abs.conf)

  cd ${srcdir}/abs
  make CONFDIR=/etc/ DESTDIR=${pkgdir} install || return 1
}

package_abs-readme() {
  pkgdesc="ABS base directory and README file"
  depends=('abs')
  install=abs.install

  # Add readme file, and make base /var/abs path
  install -dm0755 ${pkgdir}/var/abs/local/
  install -Dm0644 ${srcdir}/abs/README ${pkgdir}/var/abs/README
}

# vim: set ts=2 sw=2 noet:
_______________________________________________
pacman-dev mailing list
[email protected]
http://archlinux.org/mailman/listinfo/pacman-dev

Reply via email to