The libraries do not need to be compiled first (although they could be). To accomplish this first you'll need a Build.rakumod
file in the root of your distribution:
class Builder {
method build($dist-path) {
# do build stuff to your module
# which is located at $dist-path
}
# Only needed for panda compatability
method isa($what) {
return True if $what.^name eq 'Panda::Builder';
callsame;
}
}
Then you'll want to use a module like LibraryMake. Here we use it's make
routine in the build
method:
use LibraryMake;
class Builder {
method build($dist-path) {
make($dist-path, "$dist-path/resources");
# or you could do the appropriate `shell` calls
# yourself and have no extra dependencies
}
...
This method is supported by the package managers zef and panda, and also allows it to be manually ran via raku -I. -MBuild -e 'Builder.new.build($*CWD)'
Here is a working example