- de compiler dans /tmp. Si vous êtes comme moi avec un /tmp en tmpfs, la vitesse de compilation est très largement augmentée.
- ajout d'un mot clef 'all' permettant de se passer de la liste des architectures sur lequel le paquet compile (arch=()).
Le mot clef all permet de compiler sur une architecture et de générer les paquet qui va bien en fonction de l'architecture sur laquelle il a été compilé. C'est différent de any qui génère un paquet pour l'architecture 'any' (hum... j'aurais vu noarch pour préciser l'indépendance vis-à-vis d'une architecture, et any* à la place de mon malheureux all (*as any architecture)). All permet de compiler un paquet i586 sur une machine avec le CARCH définit à i586 sans avoir à modifier la liste arch=() du PKGBUILD.
Il convient de préciser que l'on passe outre la vérification et si un paquet ne compile vraiment pas, car testé sur cette architecture, pour des raisons x ou y alors ça va merdoyer. All est donc à réserver pour ses paquets à soi afin d'éviter de faire de longues modifications sur les PKGBUILD. Du genre quand on a une longue liste de PKGBUILD perso et des machines aux architectures hétérogènes, comme moi.
Code : Tout sélectionner
--- scripts/makepkg.sh.in 2008-02-27 20:14:02.000000000 +0100
+++ scripts/makepkg-modif 2008-05-25 15:42:58.000000000 +0200
@@ -141,7 +141,7 @@
# If it's a clean exit and -c/--clean has been passed...
msg "$(gettext "Cleaning up...")"
cd "$startdir"
- rm -rf pkg src
+ rm -rf pkg src /tmp/$pkgname/
if [ "$pkgname" != "" ]; then
# Can't do this unless the BUILDSCRIPT has been sourced.
rm -f "${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log*"
@@ -1328,6 +1328,10 @@
CARCH='any'
fi
+if [ "$arch" = 'all' -o "$arch" = "" ]; then
+ arch=$CARCH
+fi
+
if ! in_array $CARCH ${arch[@]}; then
if [ "$IGNOREARCH" = "0" ]; then
error "$(gettext "%s is not available for the '%s' architecture.")" "$pkgname" "$CARCH"
@@ -1346,6 +1350,11 @@
exit 1
fi
+mkdir -p /tmp/$pkgname/{src,pkg}
+rm -rf $startdir/{src,pkg}
+ln -fs /tmp/$pkgname/src $startdir/src
+ln -fs /tmp/$pkgname/pkg $startdir/pkg
+
# We need to run devel_update regardless of whether we are in the fakeroot
# build process so that if the user runs makepkg --forcever manually, we
# 1) output the correct pkgver, and 2) use the correct filename when
@@ -1464,6 +1473,7 @@
if [ -d "$pkgdir" -a "$REPKG" = "0" ]; then
msg "$(gettext "Removing existing pkg/ directory...")"
rm -rf "$pkgdir"
+ rm -rf "/tmp/$pkgname/pkg"
fi
mkdir -p "$pkgdir"
cd "$startdir"