summaryrefslogtreecommitdiffstats
path: root/build_tools
diff options
context:
space:
mode:
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/bin/mp21
1 files changed, 20 insertions, 1 deletions
diff --git a/build_tools/bin/mp b/build_tools/bin/mp
index 76c08ea..49dfb1b 100755
--- a/build_tools/bin/mp
+++ b/build_tools/bin/mp
@@ -6,9 +6,10 @@
. /etc/makepkg.conf
. PKGBUILD
PKGHOME=/data/pkg_repo/packages
+SRCPKGHOME=/data/pkg_repo/src_packages
mydir=`pwd`
TOTALPKG="$pkgname"-"$pkgver"-"$pkgrel"-"$CARCH".pkg.tar.gz
-
+SRCPKG="$pkgname"-"$pkgver"-"$pkgrel".src.tar.gz
if [ x`basename $0` = xmpr ]
then
@@ -20,6 +21,7 @@ fi
+
function find_repo {
echo $mydir|grep -q "extra"
if [ $? = 0 ]
@@ -67,6 +69,18 @@ function update-repo {
}
+function update-src-pkg {
+ DELPKG="$pkgname"-"$pkgver"-*.src.tar.gz
+ echo "Removing old src pkg"
+ if [ ! -d $PKGHOME/$REPO/$SRCPKG ]
+ then
+ echo "Creating src_pkg directory"
+ mkdir -p $SRCPKGHOME/$REPO
+ fi
+ rm -vf $SRCPKGHOME/$REPO/$DELPKG
+ echo "copying src_pkg to $SRCPKGHOME/$REPO"
+ cp -f $PKGHOME/$SRCPKG $SRCPKGHOME/$REPO
+}
@@ -76,4 +90,9 @@ find_repo
makepkg --holdver --asroot $@ || exit 1
echo "---------updating database ----------"
update-repo #&& pacman -Sy
+echo "----------creating source package---------"
+makepkg -f --holdver --asroot --source && update-src-pkg
+
+
+