Commit fc414f81 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/abuild: use depend on the provides when possible

parent ccb9ff71
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgdesc="Script to build Alpine Packages"
pkgname=abuild
pkgver=2.12.1_git20120919
pkgver=2.12.1_git20121002
_ver=${pkgver%_git*}
pkgrel=0
url=http://git.alpinelinux.org/cgit/abuild/
......@@ -52,4 +52,4 @@ cpan() {
}
md5sums="92348750a3354c3ec7b811716543b8e5 abuild-2.12.1.tar.bz2
896303f1bf063284ce663f6e506fdacd abuild-git.patch"
d8f030d1e05ce84ac21fbab2d910e8d4 abuild-git.patch"
diff --git a/abuild.in b/abuild.in
index 2780d2e..e885dd9 100755
index 2780d2e..5c6c3dd 100755
--- a/abuild.in
+++ b/abuild.in
@@ -404,6 +404,9 @@ default_unpack() {
......@@ -64,7 +64,20 @@ index 2780d2e..e885dd9 100755
found=${j%/.provides-so}
found=${found##*/.control.}
break
@@ -911,26 +911,113 @@ trace_apk_deps() {
@@ -890,7 +890,11 @@ trace_apk_deps() {
self_provided="$self_provided $found"
fi
else
- missing="$missing $i"
+ if $APK info --quiet --installed "so:$i"; then
+ autodeps="$autodeps so:$i"
+ else
+ missing="$missing $i"
+ fi
fi
done
@@ -911,26 +915,113 @@ trace_apk_deps() {
fi
done
......@@ -76,10 +89,11 @@ index 2780d2e..e885dd9 100755
+ fi
+ [ -z "$autodeps" ] && return 0
for i in $autodeps; do
echo "depend = $i" >> "$dir"/.PKGINFO
done
}
- echo "depend = $i" >> "$dir"/.PKGINFO
+ echo "depend = $i"
+ done | sort -u >> "$dir"/.PKGINFO
+}
+
+find_scanelf_paths() {
+ local datadir="$1"
+ local paths="$datadir/lib:$datadir/usr/lib" i= rpaths=
......@@ -97,7 +111,7 @@ index 2780d2e..e885dd9 100755
+ fi
+ unset IFS
+ done < "$rpaths"
+ done
done
+ echo "$paths"
+}
+
......@@ -151,8 +165,8 @@ index 2780d2e..e885dd9 100755
+ grep -q -w "^$i" "$controldir"/.provides-so \
+ || echo $i
+ done > "$controldir"/.needs-so
+}
+
}
create_apks() {
- local file
+ local file= dir= name= ver= apk= datadir=
......@@ -186,7 +200,7 @@ index 2780d2e..e885dd9 100755
(
cd "$datadir"
# data.tar.gz
@@ -941,6 +1028,7 @@ create_apks() {
@@ -941,6 +1032,7 @@ create_apks() {
fi
tar -c "$@" | abuild-tar --hash | gzip -9 >"$dir"/data.tar.gz
......@@ -194,7 +208,7 @@ index 2780d2e..e885dd9 100755
# append the hash for data.tar.gz
local sha256=$(sha256sum "$dir"/data.tar.gz | cut -f1 -d' ')
echo "datahash = $sha256" >> "$dir"/.PKGINFO
@@ -951,10 +1039,12 @@ create_apks() {
@@ -951,10 +1043,12 @@ create_apks() {
| gzip -9 > control.tar.gz
abuild-sign -q control.tar.gz || exit 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment