diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-07 22:32:52 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-07 22:33:12 +0200 |
commit | 6c2fc64d74a1369a856eb3dbb324f1f263d58255 (patch) | |
tree | 7e544512c8a1cde3595290a537ee6b1bb8b83dfd | |
parent | 1264917824163aa4c25d3b4482619a79eba41d54 (diff) | |
download | abuild-6c2fc64d74a1369a856eb3dbb324f1f263d58255.tar.gz abuild-6c2fc64d74a1369a856eb3dbb324f1f263d58255.tar.bz2 abuild-6c2fc64d74a1369a856eb3dbb324f1f263d58255.tar.xz abuild-6c2fc64d74a1369a856eb3dbb324f1f263d58255.zip |
newapkbuild: create check() function
-rw-r--r-- | newapkbuild.in | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/newapkbuild.in b/newapkbuild.in index 59c5f70..541f261 100644 --- a/newapkbuild.in +++ b/newapkbuild.in @@ -104,6 +104,18 @@ build_python() { __EOF__ } +check_make() { + cat >>APKBUILD<<__EOF__ + make check +__EOF__ +} + +check_python() { + cat >>APKBUILD<<__EOF__ + python3 setup.py check +__EOF__ +} + # Package sections package_make() { cat >>APKBUILD<<__EOF__ @@ -277,6 +289,24 @@ __EOF__ __EOF__ + # Create check() function + cat >>APKBUILD<<__EOF__ +check() { + cd "\$builddir" +__EOF__ + + case "$buildtype" in + make|cmake|autotools|perl) + check_make;; + python) + check_python;; + esac + + cat >>APKBUILD<<__EOF__ +} + +__EOF__ + # Create package() function cat >>APKBUILD<<__EOF__ package() { |