Commit fa204f85 authored by Bartłomiej Piotrowski's avatar Bartłomiej Piotrowski Committed by Natanael Copa
Browse files

abuild: remove *.la files by default

Libtool archives are useless in the most of cases and can be safely
removed. A quick grep shows that *.la files are explicitly removed in
903 APKBUILDs, while intentionally preserved only in 17.

postcheck() is discussable place to perform the deletion, but it's
currently the only function being run for each subpackage, including
the artifact of package().
parent 32656aff
...@@ -616,13 +616,12 @@ postcheck() { ...@@ -616,13 +616,12 @@ postcheck() {
return 1 return 1
fi fi
fi fi
# look for *.la files
i=$(find "$dir" -name '*.la' | sed "s|^$dir|\t|") # remove *.la files if libtool is not set
if [ -n "$i" ] && ! options_has "libtool"; then if ! options_has "libtool"; then
error "Libtool archives (*.la) files found and \$options has no 'libtool' flag:" find "$dir" -name '*.la' -type f -delete
echo "$i"
return 1
fi fi
# look for /usr/lib/charset.alias # look for /usr/lib/charset.alias
if [ -e "$dir"/usr/lib/charset.alias ] \ if [ -e "$dir"/usr/lib/charset.alias ] \
&& ! options_has "charset.alias"; then && ! options_has "charset.alias"; then
Markdown is supported
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