summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-10-02 06:05:18 +0200
committerDan McGee <dpmcgee@gmail.com>2007-10-02 06:06:38 +0200
commit05d0bb6fcc284c302320272a7901084fea087b15 (patch)
treebb87a4605da7b632a457352086b7efa3d147f49f
parentd7e3a3ed63042802e4b36d949b48d7a668d59968 (diff)
downloaddevtools-05d0bb6fcc284c302320272a7901084fea087b15.tar.gz
devtools-05d0bb6fcc284c302320272a7901084fea087b15.tar.xz
Updates for makepkg3 and current -> core change
Taken from makepkg3.patch that was in the PKGBUILD tree. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--Makefile2
-rw-r--r--checkpkg25
-rwxr-xr-xextrapkg29
3 files changed, 40 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 7666a54..15d3b3b 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,6 @@ install:
mkdir -p $(DESTDIR)/usr/bin
install -m 755 checkpkg $(DESTDIR)/usr/bin
install -m 755 extrapkg $(DESTDIR)/usr/bin
- ln -s extrapkg $(DESTDIR)/usr/bin/currentpkg
+ ln -s extrapkg $(DESTDIR)/usr/bin/corepkg
ln -s extrapkg $(DESTDIR)/usr/bin/testingpkg
ln -s extrapkg $(DESTDIR)/usr/bin/unstablepkg
diff --git a/checkpkg b/checkpkg
index 86753f3..63035ff 100644
--- a/checkpkg
+++ b/checkpkg
@@ -1,5 +1,7 @@
#!/bin/bash
+source /etc/makepkg.conf
+
strip_url() {
echo $1 | sed 's|^.*://.*/||g'
}
@@ -11,9 +13,20 @@ fi
source PKGBUILD
-if [ ! -f $pkgname-$pkgver-$pkgrel.pkg.tar.gz ]; then
- echo "You must have a built package to check."
- exit 1
+pkgfile=${pkgname}-${pkgver}-${pkgrel}-${CARCH}.pkg.tar.gz
+oldstylepkgfile=${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
+
+if [ ! -f $pkgfile ]; then
+ if [ -f $PKGDEST/$pkgfile ]; then
+ pkgfile=$PKGDEST/$pkgfile
+ elif [ -f $oldstylepkgfile ]; then
+ pkgfile=$oldstylepkgfile
+ elif [ -f $PKGDEST/$oldstylepkgfile ]; then
+ pkgfile=$PKGDEST/$oldstylepkgfile
+ else
+ echo "You must have a built package to check."
+ exit 1
+ fi
fi
tmp=`pacman -Spd --noconfirm $pkgname`
@@ -27,7 +40,7 @@ pkgurl=`echo $tmp | rev | cut -d ' ' -f 1 | rev`
oldpkg=`strip_url $pkgurl`
-if [ "$oldpkg" = "$pkgname-$pkgver-$pkgrel.pkg.tar.gz" ]; then
+if [ "$oldpkg" = "$pkgfile" ]; then
echo "The built package is the one in the repo right now!"
exit 1
fi
@@ -41,7 +54,7 @@ if [ ! -f $oldpkg ]; then
fi
tar tzf $oldpkg > filelist-old
-tar tzf $pkgname-$pkgver-$pkgrel.pkg.tar.gz > filelist
+tar tzf $pkgfile > filelist
sort -o filelist filelist
sort -o filelist-old filelist-old
@@ -51,7 +64,7 @@ diff filelist-old filelist
if diff filelist-old filelist | grep '\.so\.' > /dev/null 2>&1; then
mkdir -p pkg
cd pkg
- tar xzf ../$pkgname-$pkgver-$pkgrel.pkg.tar.gz > /dev/null
+ tar xzf ../$pkgfile > /dev/null
for i in `diff ../filelist-old ../filelist | grep \> | grep \.so\. | awk '{print $2}'`; do
echo -n "${i}: "
objdump -p $i | grep SONAME
diff --git a/extrapkg b/extrapkg
index 4821167..58c6095 100755
--- a/extrapkg
+++ b/extrapkg
@@ -10,22 +10,28 @@ if [ ! -f PKGBUILD ]; then
fi
source PKGBUILD
-pkgfile=${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
+pkgfile=${pkgname}-${pkgver}-${pkgrel}-${CARCH}.pkg.tar.gz
+oldstylepkgfile=${pkgname}-${pkgver}-${pkgrel}.pkg.tar.gz
if [ ! -f $pkgfile ]; then
- pkgfile=$PKGDEST/$pkgfile
-fi
-
-if [ ! -f $pkgfile ]; then
- echo "File $pkgfile doesn't exist"
- exit 1
+ if [ -f $PKGDEST/$pkgfile ]; then
+ pkgfile=$PKGDEST/$pkgfile
+ oldstylepkgfile=$PKGDEST/$oldstylepkgfile
+ elif [ -f $oldstylepkgfile ]; then
+ pkgfile=$oldstylepkgfile
+ elif [ -f $PKGDEST/$oldstylepkgfile ]; then
+ pkgfile=$PKGDEST/$oldstylepkgfile
+ else
+ echo "File $pkgfile doesn't exist"
+ exit 1
+ fi
fi
if [ "$cmd" == "extrapkg" ]; then
repo="extra"
tag="CURRENT"
-elif [ "$cmd" == "currentpkg" ]; then
- repo="arch"
+elif [ "$cmd" == "corepkg" ]; then
+ repo="core"
tag="CURRENT"
elif [ "$cmd" == "testingpkg" ]; then
repo="testing"
@@ -45,6 +51,11 @@ else
echo "Must configure tupkg via ~/.tupkg, cancelled"
exit 1
fi
+ if [ "$(basename $pkgfile)" != "$(basename $oldstylepkgfile)" ]; then
+ echo "Renaming makepkg3 package for compatability"
+ mv $pkgfile $oldstylepkgfile
+ pkgfile=$oldstylepkgfile
+ fi
tupkg $pkgfile
fi
if [ $? -ne 0 ]; then