the package now always include the pkgrel

This commit is contained in:
Natanael Copa 2008-11-06 14:42:24 +00:00
parent ec3f3eaf61
commit 04738df3a7
1 changed files with 4 additions and 8 deletions

12
abuild
View File

@ -154,8 +154,7 @@ cleancache() {
}
cleanpkg() {
local p=$pkgname-$pkgver
[ $pkgrel -ne 0 ] && p="$p-r$pkgrel"
local p="$pkgname-$pkgver-$pkgrel"
rm -f "$PKGDEST/$p.apk" "$PKGDEST/$p.src.tar.gz"
local i
for i in $subpackages; do
@ -303,22 +302,19 @@ rootpkg() {
}
srcpkg() {
local p="$pkgname-$pkgver"
[ "$pkgrel" -ne 0 ] && p="$p-r$pkgrel"
local p="$pkgname-$pkgver-$pkgrel"
local prefix="${startdir##*/}"
local i files="$prefix/APKBUILD"
for i in $source; do
files="$files $prefix/${i##*/}"
done
mkdir -p "$PKGDEST"
(cd .. && tar -zcf $PKGDEST/$p.src.tar.gz $files)
(cd .. && tar -zcf "$PKGDEST/$p.src.tar.gz" $files)
}
# check if package is up to date
up2date() {
local p="$pkgname-$pkgver"
[ "$pkgrel" -ne 0 ] && p="$p-r$pkgrel"
local pkg="$PKGDEST/$p.apk"
local pkg="$PKGDEST/$pkgname-$pkgver-$pkgrel.apk"
local i s
cd "$startdir"
[ -f "$pkg" ] || return 1