newapkbuild: omit depends_dev if no *.h or *.hpp file found

This commit is contained in:
Jakub Jirutka 2016-05-24 01:30:23 +02:00 committed by Natanael Copa
parent 630c244cfe
commit a3ce23dd53

View File

@ -207,6 +207,12 @@ __EOF__
done done
echo "builddir=$builddir" >> APKBUILD echo "builddir=$builddir" >> APKBUILD
# Subpackage -dev is usually required only for C/C++. Since depends_dev
# confuses a lot people, remove it if there's no .h or .hpp file.
find "$sdir" -name "*.h" -o -name "*.hpp" -maxdepth 3 \
| head -n 1 | grep -q ".*" \
|| sed -i -e '/^depends_dev=.*/d' -e 's/\$depends_dev\s*//' APKBUILD
# Check if its autotools # Check if its autotools
if [ -z "$buildtype" ]; then if [ -z "$buildtype" ]; then
if [ -x "$sdir"/configure ]; then if [ -x "$sdir"/configure ]; then