#!/usr/bin/env python
import Params
import autowaf
import sys

# Version of this package (even if built as a child)
LV2CORE_VERSION = '3.0'

# Variables for 'waf dist'
APPNAME = 'lv2core'
VERSION = LV2CORE_VERSION

# Mandatory variables
srcdir = '.'
blddir = 'build'

def set_options(opt):
	opt.add_option('--bundle-only', action='store_true', default=False, dest='bundle_only',
			help="Only install bundle (not header or pkg-config file)")
	autowaf.set_options(opt)

def configure(conf):
	autowaf.configure(conf)

def build(bld):
	if not Params.g_options.bundle_only:
		# Header
		install_files('INCLUDEDIR', '', 'lv2.h')
	
		# Pkgconfig file
		autowaf.build_pc(bld, 'LV2CORE', LV2CORE_VERSION, [])

	# Bundle (data)
	install_files('LV2DIR', 'lv2core.lv2', 'lv2core.lv2/lv2.ttl lv2core.lv2/manifest.ttl')

