summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-02-13 10:05:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-02-13 13:49:25 +0000
commitd66a5ee4565cd1b702f3e27f96a9bb2d85b67e80 (patch)
treebc7173582ea3980ab9b0e7e199f6406fc1c017f2 /abuild.in
parent92af0b86972f34ae0607ad173f946b97c0815e4f (diff)
downloadabuild-d66a5ee4565cd1b702f3e27f96a9bb2d85b67e80.tar.gz
abuild-d66a5ee4565cd1b702f3e27f96a9bb2d85b67e80.tar.bz2
abuild-d66a5ee4565cd1b702f3e27f96a9bb2d85b67e80.tar.xz
abuild-d66a5ee4565cd1b702f3e27f96a9bb2d85b67e80.zip
abuild: run postcheck for subpackages as well
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in37
1 files changed, 23 insertions, 14 deletions
diff --git a/abuild.in b/abuild.in
index 84029ba..4bd14e7 100755
--- a/abuild.in
+++ b/abuild.in
@@ -536,6 +536,25 @@ get_split_func() {
echo $func
}
+postcheck() {
+ local dir="$1" name="$2" i=
+ msg "Running postcheck for $name"
+ # look for *.la files
+ i=$(find "$dir" -name '*.la' | sed "s|^$dir|\t|")
+ if [ -n "$i" ] && ! options_has "libtool"; then
+ error "Libtool archives (*.la) files found and \$options has no 'libtool' flag:"
+ echo "$i"
+ return 1
+ fi
+ # check directory permissions
+ i=$(find "$dir" -type d -perm -777 | sed "s|^$dir|\t|")
+ if [ -n "$i" ]; then
+ warning "World writeable directories found:"
+ echo "$i"
+ fi
+ return 0
+}
+
prepare_subpackages() {
local i
cd "$startdir"
@@ -543,27 +562,17 @@ prepare_subpackages() {
local func=$(get_split_func $i)
# call abuild recursively, setting subpkg{dir,name}
msg "Running split function $func..."
- subpkgdir="$pkgbasedir/${i%:*}" subpkgname="${i%:*}" \
+ local dir="$pkgbasedir/${i%:*}" name="${i%:*}"
+ subpkgdir="$dir" subpkgname="$name" \
$0 $func prepare_package || return 1
+ postcheck "$dir" "$name" || return 1
done
- # post check
- i=$(find "$pkgdir" -name '*.la' | sed "s|^$pkgdir|\t|")
- if [ -n "$i" ] && ! options_has "libtool"; then
- error "Libtool archives (*.la) files found and \$options has no 'libtool' flag:"
- echo "$i"
- return 1
- fi
+ postcheck "$pkgdir" "$pkgname" || return 1
# post check for /usr/share/locale
if [ -d "$pkgdir"/usr/share/locale ]; then
warning "Found /usr/share/locale"
warning2 "Maybe add \$pkgname-lang to subpackages?"
fi
- # check directory permissions
- i=$(find "$pkgdir" -type d -perm -777 | sed "s|^$pkgdir|\t|")
- if [ -n "$i" ]; then
- warning "World writeable directories found:"
- echo "$i"
- fi
}
default_lang() {