diff options
author | Bartłomiej Piotrowski <b@bpiotrowski.pl> | 2014-12-05 19:37:06 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-12-29 12:34:47 +0000 |
commit | fa204f85578296135d19987b55ddeb6622ff68a8 (patch) | |
tree | 86c0a9eb01bcb6db0126c50499fdd92fbae8863e | |
parent | 32656aff47ab1cc214457f5294cdfcccf400de9b (diff) | |
download | abuild-fa204f85578296135d19987b55ddeb6622ff68a8.tar.gz abuild-fa204f85578296135d19987b55ddeb6622ff68a8.tar.bz2 abuild-fa204f85578296135d19987b55ddeb6622ff68a8.tar.xz abuild-fa204f85578296135d19987b55ddeb6622ff68a8.zip |
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().
-rw-r--r-- | abuild.in | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -616,13 +616,12 @@ postcheck() { return 1 fi fi - # 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 + + # remove *.la files if libtool is not set + if ! options_has "libtool"; then + find "$dir" -name '*.la' -type f -delete fi + # look for /usr/lib/charset.alias if [ -e "$dir"/usr/lib/charset.alias ] \ && ! options_has "charset.alias"; then |