diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-05-24 01:30:23 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-06-13 12:37:20 +0000 |
commit | a3ce23dd53e4dc307dd01c9bdab80b31191555bd (patch) | |
tree | 8e6fe23da0957cf1429c37295e6d381944cd4a68 | |
parent | 630c244cfe79e6ae2139968f8772d07846a9d82b (diff) | |
download | abuild-a3ce23dd53e4dc307dd01c9bdab80b31191555bd.tar.gz abuild-a3ce23dd53e4dc307dd01c9bdab80b31191555bd.tar.bz2 abuild-a3ce23dd53e4dc307dd01c9bdab80b31191555bd.tar.xz abuild-a3ce23dd53e4dc307dd01c9bdab80b31191555bd.zip |
newapkbuild: omit depends_dev if no *.h or *.hpp file found
-rw-r--r-- | newapkbuild.in | 6 |
1 files changed, 6 insertions, 0 deletions
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 |