I'm trying to create an .apk file. I read a number of tutorials about it, and tried to follow them as best as I could, I have APKBUILD file, I have the sample-version.tar.gz, have the checksum. But when I call abuild -r I get the error:

find: /home/maximk/package_test/pkg/sample: No such file or directory

Which is true, it's not there, but that because abuild cleans it up, so even if was to create it, abuild deletes it, so it seems that something is supposed to recreate it during the build, but doesn't

Do I need to add some value to APKBUILD? Nothing in the manual page seems to indicate that, though.

  • 1
    @K7AAY No, apk is a package manager for Alpine Linux, which has nothing to do with Android, despite having the same extension (rather annoying, but what can ya do?) – Maxim Nov 7 '19 at 23:07

By default, abuild behaves as described in the /etc/abuild/abuild.conf file.

So, if you don't want that abuild removes the package, you can modify this entry:

# what to clean up after a successful build
#CLEANUP="srcdir bldroot pkgdir deps"

By decommenting that entry an leaving only:

CLEANUP="bldroot deps"

You will have removed only the build root and the dependencies pulled at runtime in order to build your package (see depends= and makedepends= entries in the APKBUILD, for example).

Also, looking around that file, you will see other entries that might be useful. They are commented and self-explanatory.

.: Francesco

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.