How to create your "own" packet downloader function


Is it possible to add a script execution in the middle of the configuration offered by
Or is it possible to have my own download function?

I would like to run a script when there is still the .git folder.

I'm using PKG_SOURCE_PROTO:=git because when I download an archive (tar.gz) I can't have submodules in my build_dir, I don't know why it's not downloading my submodules by the way.

I tried to use "github_archive" protocol or just https link without specifying the protocol.

I read the openwrt documentation without success.

Best Regards,
Tom Douady.