diff options
author | James Meyer <james.meyer@operamail.com> | 2008-11-16 03:51:01 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2008-11-16 03:51:01 (GMT) |
commit | 2b1ef4ece4d24c22730ce0dc864fe3ac68156569 (patch) | |
tree | 4177adccfa2d3f11bec29954283551db6e4b3c01 /build_tools/bin/mp | |
parent | 9d16357bc2f365efa96cbe0186a4e8f04686d728 (diff) | |
download | linhes_dev-2b1ef4ece4d24c22730ce0dc864fe3ac68156569.zip |
modify mp so that it builds src packages.
src packages will end up in /data/pkg/src_packages
Diffstat (limited to 'build_tools/bin/mp')
-rwxr-xr-x | build_tools/bin/mp | 21 |
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 + + + |