Adjust the Template
Explore how to adjust APKBUILD templates to resolve build errors such as failed test checks and unnecessary subpackages. Understand how to prepare your package for successful building and submit it through a forked Alpine repositories workflow on GitLab.
We'll cover the following...
Preface
Let’s continue from our previous lesson. After newapkbuild is run, the following APKBUILD gets generated:
We now have to adjust parts of the APKBUILD for it to correctly generate an .apk package for us. The easiest way to do this is by checking if the package simply gets built when we run the following command to generate the .apk package:
Run the command above in the terminal below:
As we can see, the build fails with the following error message:
Apparently, guesser-game has no tests, so the check() phase of the APKBUILD fails to run. We can fix this by removing the check() function from the APKBUILD and adding options="!check" to it. This ensures abuild doesn’t try to run any nonexistent tests. We can try this by running the following command ... ...