NPAPI infrastructure provides macros for ports that install NPAPI plugins.
NPAPI is a plugin architecture, supported by many browsers. To name a few: Mozilla/Seamonkey, Firefox, Opera and Konqueror.
NPAPI plugins are currently installed in a variety of directories, usually under X11BASE. However, I hereby propose to install all plugins in LOCALBASE/lib/npapi/PKGBASE. We can then employ Linkfarming to make plugins available to browsers and let users actually tune what plugins to enable in which browsers. Look into www/linux-mplayer-plugin/Makefile.npapi for more info. I hope to convert other ports later.
To experience all the benefits of the infrastructure, support must be introduced into both plugin ports (miniports) and application ports (apps):
- Miniports should be developed using the npapi macro package (Makefile.npapi)
- Apps should exec the following actions, both when installed from ports and as packages:
- on install: cp -R cp -R %%LOCALBASE%%/lib/npapi/symlinks/%%APP_NAME%%/ %D/lib/%%APP_NAME%%/plugins/
- on deinstall: find %D/lib/%%APP_NAME%%/plugins/ -depth 1 -type l -delete
Miniport installation paths
www/mplayer-plugin will be installed into lib/npapi/mplayerplug-in/
Links are then made in lib/npapi/symlinks/browser for each native browser
www/linux-mplayer-plugin will be installed into lib/npapi/linux-mplayerplug-in/
Links are then made in lib/npapi/symlinks/linux-browser for each linux binary browser
Links are also made in browser plugins dirs, like share/opera/plugins/ and lib/firefox/plugins/
In general, a miniport is installed into lib/npapi/PKGBASE/ by default (last component tunable by NPAPI_ID, the whole path tunable by NPAPI_NPAPIDIR) and links are made for browsers, supported by the plugin. Browser support is defined by miniport maintainers by setting the USE_NPAPI variable to strings like "*", "firefox thunderbird", "*-firefox-devel", "linux-*" and so on. It can be further fine-tuned by users by setting WITH_NPAPI variable. This way we avoid most name clashes (and in a lot better fashion that we currently do).