summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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() {