From 4dd64d6af4562b5b9b810be9f820fbb121c2d986 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Wed, 3 Feb 2010 18:29:08 -0600
Subject: mp: add support for multi pkg's from single pkgbuild

---
 build_tools/bin/mp | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/build_tools/bin/mp b/build_tools/bin/mp
index 82f665d..97a457e 100755
--- a/build_tools/bin/mp
+++ b/build_tools/bin/mp
@@ -37,8 +37,8 @@ function bump {
 	echo "bumped $pkgname release from $package_pkgrel to $new_pkgrel"
 	. PKGBUILD	
    fi
-   TOTALPKG="$pkgname"-"$pkgver"-"$pkgrel"-"$CARCH".pkg.tar.gz
-   SRCPKG="$pkgname"-"$pkgver"-"$pkgrel".src.tar.gz
+#   TOTALPKG="$pkgname"-"$pkgver"-"$pkgrel"-"$CARCH".pkg.tar.gz
+#   SRCPKG="$pkgname"-"$pkgver"-"$pkgrel".src.tar.gz
 
 }
 
@@ -85,7 +85,7 @@ function update-repo {
     echo "DOCROOT=$DOCROOT"
     echo
     #remove old package from local copy
-    DELPKG="$pkgname"-"$pkgver"-*-"$CARCH".pkg.tar.gz
+    DELPKG="$_pkgname"-"$pkgver"-*-"$CARCH".pkg.tar.gz
     #echo $DOCROOT
     #echo $DELPKG
     echo "Removing old packages from $CARCH/$REPO:"
@@ -101,7 +101,7 @@ function update-repo {
 
 
 function update-src-pkg {
-	DELPKG="$pkgname"-"$pkgver"-*.src.tar.gz
+	DELPKG="$_pkgname"-"$pkgver"-*.src.tar.gz
 	echo "Removing old src pkg"
 	if [ ! -d $PKGHOME/$REPO/$SRCPKG ]
 	then
@@ -150,17 +150,22 @@ function dup_check {
 
 #MAIN PROGRAM
 
+echo "---------------"
 find_repo
 dup_check
 bump
-echo "---------------"
 
 makepkg  --asroot  $cmdline || exit 1
-echo "---------updating database ----------"
-update-repo #&& pacman -Sy
-echo "----------creating source package---------"
-makepkg -f --holdver  --asroot  --source  &&  update-src-pkg
-
+makepkg -f --holdver  --asroot  --source    update-src-pkg
 
+for _pkgname in ${pkgname[@]}
+	do
+	echo $_pkgname
+	   TOTALPKG="$_pkgname"-"$pkgver"-"$pkgrel"-"$CARCH".pkg.tar.gz
+	   SRCPKG="$_pkgname"-"$pkgver"-"$pkgrel".src.tar.gz
+	echo "---------updating database ----------"
+	update-repo 
+	update-src-pkg
+done
 
 
-- 
cgit v0.12