To create a new extension, add a subdirectory in extensions. Then create a Makefile.am like the one in example, replacing the EXTENSION_ID with the basename of your extension, which must match the UUID in metadata.json. If you need additional files, add them to EXTENSION_EXTRA. Then modify extensions/Makefile.am and configure.ac. It should be pretty self-explanatory. Don't forget to add any translatable file to po/POTFILES.in, and then you're done.