bundled LV2 plugin build and deployment

This commit is contained in:
Robin Gareus 2013-10-20 17:24:59 +02:00
parent d6e2e34025
commit 9faae9c8a3
6 changed files with 30 additions and 23 deletions

View file

@ -29,7 +29,7 @@
#include "lv2/lv2plug.in/ns/ext/urid/urid.h" #include "lv2/lv2plug.in/ns/ext/urid/urid.h"
#include "lv2/lv2plug.in/ns/ext/midi/midi.h" #include "lv2/lv2plug.in/ns/ext/midi/midi.h"
#define RSY_URI "http://gareus.org/oss/lv2/reasonablesynth" #define RSY_URI "https://community.ardour.org/node/7596"
/* the synth interface */ /* the synth interface */
static void * synth_alloc (void); static void * synth_alloc (void);

View file

@ -1,8 +1,7 @@
@prefix lv2: <http://lv2plug.in/ns/lv2core#> . @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> .
<http://gareus.org/oss/lv2/reasonablesynth> <https://community.ardour.org/node/7596>
a lv2:Plugin ; a lv2:Plugin ;
lv2:binary <reasonablesynth@LIB_EXT@> ; lv2:binary <reasonablesynth@LIB_EXT@> ;
rdfs:seeAlso <reasonablesynth.ttl> . rdfs:seeAlso <reasonablesynth.ttl> .

View file

@ -5,7 +5,6 @@
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix pg: <http://lv2plug.in/ns/ext/port-groups#> . @prefix pg: <http://lv2plug.in/ns/ext/port-groups#> .
@prefix units: <http://lv2plug.in/ns/extensions/units#> .
@prefix urid: <http://lv2plug.in/ns/ext/urid#> . @prefix urid: <http://lv2plug.in/ns/ext/urid#> .
<http://gareus.org/rgareus#me> <http://gareus.org/rgareus#me>
@ -14,7 +13,7 @@
foaf:mbox <mailto:robin@gareus.org> ; foaf:mbox <mailto:robin@gareus.org> ;
foaf:homepage <http://gareus.org/> . foaf:homepage <http://gareus.org/> .
<http://gareus.org/oss/lv2/reasonablesynth> <https://community.ardour.org/node/7596>
a lv2:Plugin, lv2:InstrumentPlugin, doap:Project; a lv2:Plugin, lv2:InstrumentPlugin, doap:Project;
doap:license <http://usefulinc.com/doap/licenses/gpl> ; doap:license <http://usefulinc.com/doap/licenses/gpl> ;
doap:maintainer <http://gareus.org/rgareus#me> ; doap:maintainer <http://gareus.org/rgareus#me> ;

View file

@ -15,30 +15,33 @@ def configure(conf):
conf.load('compiler_c') conf.load('compiler_c')
autowaf.configure(conf) autowaf.configure(conf)
autowaf.set_c99_mode(conf) autowaf.set_c99_mode(conf)
autowaf.check_pkg(conf, 'lv2', atleast_version='1.4.1', if Options.options.lv2:
uselib_store='LV2_1_4_1') autowaf.check_pkg(conf, 'lv2', atleast_version='1.4.0',
uselib_store='LV2_1_4_0')
def build(bld): def build(bld):
bundle = 'reasonablesynth.lv2' bundle = 'reasonablesynth.lv2'
module_pat = re.sub('^lib', '', bld.env.cshlib_PATTERN) module_pat = re.sub('^lib', '', bld.env.cshlib_PATTERN)
module_ext = module_pat[module_pat.rfind('.'):] module_ext = module_pat[module_pat.rfind('.'):]
# Build RDF files if bld.is_defined ('HAVE_LV2'):
for i in ['manifest.ttl', 'reasonablesynth.ttl']: # Build RDF files
bld(features = 'subst', for i in ['manifest.ttl', 'reasonablesynth.ttl']:
source = i + '.in', bld(features = 'subst',
target = '%s/%s' % (bundle, i), source = i + '.in',
install_path = '${LV2DIR}/%s' % bundle, target = '../../LV2/%s/%s' % (bundle, i),
LIB_EXT = module_ext) install_path = '${LV2DIR}/%s' % bundle,
LIB_EXT = module_ext)
# Build plugin library # Build plugin library
obj = bld(features = 'c cshlib', obj = bld(features = 'c cshlib',
source = 'lv2.c', source = 'lv2.c',
dep_files = 'rsynth.c', dep_files = 'rsynth.c',
name = 'reasonablesynth', name = 'reasonablesynth',
target = '%s/reasonablesynth' % bundle, target = '../../LV2/%s/reasonablesynth' % bundle,
install_path = '${LV2DIR}/%s' % bundle, install_path = '${LV2DIR}/%s' % bundle,
use = 'LV2_1_4_1') use = 'LV2_1_4_0'
obj.env.cshlib_PATTERN = module_pat )
obj.env.cshlib_PATTERN = module_pat
# vi:set ts=4 sw=4 et: # vi:set ts=4 sw=4 et:

View file

@ -534,6 +534,9 @@ cp -R ../../gtk2_ardour/splash.png $Shared
cp -R ../../gtk2_ardour/small-splash.png $Shared cp -R ../../gtk2_ardour/small-splash.png $Shared
cp -R ../../gtk2_ardour/ArdourMono.ttf $Shared cp -R ../../gtk2_ardour/ArdourMono.ttf $Shared
# install bundled LV2s to <app>/lib/LV2/
cp -R $BUILD_ROOT/libs/LV2 $APPLIB/
# go through and recursively remove any .svn dirs in the bundle # go through and recursively remove any .svn dirs in the bundle
for svndir in `find $APPDIR -name .svn -type d`; do for svndir in `find $APPDIR -name .svn -type d`; do
rm -rf $svndir rm -rf $svndir

View file

@ -417,6 +417,9 @@ for svndir in `find $APPDIR -name .svn -type dir`; do
rm -rf $svndir rm -rf $svndir
done done
# install bundled LV2s to <app>/Contents/lib/LV2/
cp -R $BUILD_ROOT/libs/LV2 $Frameworks/
# now fix up the executables # now fix up the executables
echo "Fixing up executable dependency names ..." echo "Fixing up executable dependency names ..."
executables=$MAIN_EXECUTABLE executables=$MAIN_EXECUTABLE