Difference between revisions of "How To Make a MPB Package"
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
* Browse through other examples so you get an idea of other variations of the makefiles (how to use cmake or waf for example) | * Browse through other examples so you get an idea of other variations of the makefiles (how to use cmake or waf for example) | ||
* If you want to rebuild after a change to your plugin or the .mk then it is often easiest to just delete the previous build's directory for your plugin ~/mod-workdir/plugins-dep/build/<packagename>-<version> | * If you want to rebuild after a change to your plugin or the .mk then it is often easiest to just delete the previous build's directory for your plugin ~/mod-workdir/plugins-dep/build/<packagename>-<version> | ||
+ | |||
+ | Plugin packages reside in plugins/package/ directory. | ||
+ | |||
+ | Here's an example of a plugin package file: | ||
+ | <source lang="makefile"> | ||
+ | ###################################### | ||
+ | # | ||
+ | # abgate | ||
+ | # | ||
+ | ###################################### | ||
+ | |||
+ | ABGATE_VERSION = 1.1.7 | ||
+ | ABGATE_SITE = http://download.sourceforge.net/abgate/ | ||
+ | ABGATE_SOURCE = abGate-$(ABGATE_VERSION).tar.gz | ||
+ | ABGATE_BUNDLES = abGate.lv2 | ||
+ | |||
+ | ABGATE_TARGET_MAKE = $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) | ||
+ | |||
+ | define ABGATE_BUILD_CMDS | ||
+ | $(ABGATE_TARGET_MAKE) | ||
+ | endef | ||
+ | |||
+ | define ABGATE_INSTALL_TARGET_CMDS | ||
+ | $(ABGATE_TARGET_MAKE) install DESTDIR=$(TARGET_DIR) | ||
+ | cp -rL $($(PKG)_PKGDIR)/abGate.lv2/* $(TARGET_DIR)/usr/lib/lv2/abGate.lv2/ | ||
+ | endef | ||
+ | |||
+ | $(eval $(generic-package)) | ||
+ | </source> |
Revision as of 21:17, 13 September 2017
This page describes how to make a plugin package for mod-plugin-builder (or MPB for short)
Plugin packages are buildroot files. Because of that it must comply with Buildroot rules.
A few important notes:
- The package name is defined by the folder name and cannot contain '.'
- There must be a <packagename>.mk file inside the package folder
- The package name and '.mk' file name must be the same
- Inside the '.mk' file all defined variables must start with the package name in uppercase replacing '-' with '_'
- You need to define the generated plugin bundle names in the <PACKAGE_NAME>_BUNDLES variable
- Browse through other examples so you get an idea of other variations of the makefiles (how to use cmake or waf for example)
- If you want to rebuild after a change to your plugin or the .mk then it is often easiest to just delete the previous build's directory for your plugin ~/mod-workdir/plugins-dep/build/<packagename>-<version>
Plugin packages reside in plugins/package/ directory.
Here's an example of a plugin package file:
######################################
#
# abgate
#
######################################
ABGATE_VERSION = 1.1.7
ABGATE_SITE = http://download.sourceforge.net/abgate/
ABGATE_SOURCE = abGate-$(ABGATE_VERSION).tar.gz
ABGATE_BUNDLES = abGate.lv2
ABGATE_TARGET_MAKE = $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
define ABGATE_BUILD_CMDS
$(ABGATE_TARGET_MAKE)
endef
define ABGATE_INSTALL_TARGET_CMDS
$(ABGATE_TARGET_MAKE) install DESTDIR=$(TARGET_DIR)
cp -rL $($(PKG)_PKGDIR)/abGate.lv2/* $(TARGET_DIR)/usr/lib/lv2/abGate.lv2/
endef
$(eval $(generic-package))