From a3ce23dd53e4dc307dd01c9bdab80b31191555bd Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Tue, 24 May 2016 01:30:23 +0200 Subject: newapkbuild: omit depends_dev if no *.h or *.hpp file found --- newapkbuild.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'newapkbuild.in') diff --git a/newapkbuild.in b/newapkbuild.in index b0349c6..d19e197 100644 --- a/newapkbuild.in +++ b/newapkbuild.in @@ -207,6 +207,12 @@ __EOF__ done 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 if [ -z "$buildtype" ]; then if [ -x "$sdir"/configure ]; then -- cgit v1.2.3-60-g2f50