summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rwxr-xr-xabuild.in26
2 files changed, 7 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 1979acd..112ebbb 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ VERSION := 2.8.2
prefix ?= /usr
sysconfdir ?= /etc
datadir ?= $(prefix)/share/$(PACKAGE)
-abuildrepo ?= ~/.cache/apks
+abuildrepo ?= ~/.cache/abuild
LUA_VERSION = 5.1
LUA_SHAREDIR ?= $(prefix)/share/lua/$(LUA_VERSION)/
diff --git a/abuild.in b/abuild.in
index cd55865..c7d8814 100755
--- a/abuild.in
+++ b/abuild.in
@@ -773,21 +773,12 @@ create_apks() {
done
}
-# fish out the arch from an apk file
-apk_arch_prefix() {
- apk index -q "$1" | tar -zxO | awk -F: '$1 == "A" { print $2 }'
-}
-
-apk_arch_prefix_compat() {
- tar -zxOf "$1" .PKGINFO | awk -F" = " '$1 == "arch" { print $2 }'
-}
-
clean_abuildrepo() {
local apk
cd "$abuildrepo" || return 1
# remove compat symlink
- for d in "$abuildrepo/$CARCH" "$abuildrepo"/noarch; do
+ for d in "$abuildrepo/$CARCH"; do
[ -L "$d" ] && rm "$d"
done
@@ -800,19 +791,13 @@ clean_abuildrepo() {
}
mklinks_abuildrepo() {
- local apk get_prefix=apk_arch_prefix
- local version=$($APK --version | awk '{print $2}')
- if [ "$($APK version --test $version 2.1)" = '<' ]; then
- get_prefix=apk_arch_prefix_compat
- fi
- mkdir -p "$abuildrepo"/$CARCH "$abuildrepo"/noarch
+ local apk
+ mkdir -p "$abuildrepo"/$CARCH
cd "$abuildrepo" || return 1
# create links for this package
for apk in $(listpkg); do
[ -f "$PKGDEST"/$apk ] || continue
- local prefix=$($get_prefix "$PKGDEST"/$apk)
- mkdir -p "$abuildrepo"/$prefix
- ln -sf "$PKGDEST"/$apk "$abuildrepo"/$prefix/$apk
+ ln -sf "$PKGDEST"/$apk "$abuildrepo"/$CARCH/$apk
done
}
@@ -837,7 +822,8 @@ update_abuildrepo() {
fi
$APK index --quiet $oldindex --output "$index".unsigned \
--description "$repo $(cd $startdir && git describe)" \
- noarch/*.apk $CARCH/*.apk || exit 1
+ --rewrite-arch $CARCH \
+ $CARCH/*.apk || exit 1
msg "Signing the index..."
abuild-sign -q "$index".unsigned || exit 1
mv "$index".unsigned "$index"