| KARAF = '//lib:apache-karaf' |
| BRANDING = '//tools/package/branding:onos-tools-package-branding' |
| |
| FEATURES = [ |
| '//features:onos-thirdparty-base', |
| '//features:onos-thirdparty-web', |
| '//features:onos-api', |
| '//features:onos-core', |
| '//features:onos-incubator', |
| '//features:onos-rest', |
| '//features:onos-gui', |
| '//features:onos-cli', |
| #'//features:onos-security', |
| ] |
| |
| #TODO move to buck-tools |
| export_file ( |
| name = 'onos-prep-karaf', |
| ) |
| |
| genrule( |
| name = 'onos-karaf', |
| srcs = glob(['bin/*', 'etc/*', 'init/*']), |
| bash = '$(location :onos-prep-karaf) $OUT $(location %s) %s $(location %s)'\ |
| % (KARAF, ONOS_VERSION, BRANDING), |
| out = 'karaf.zip', |
| ) |
| |
| compile_features( |
| name = 'onos-features', |
| features = FEATURES, |
| ) |
| |
| staged_repos = ['$(location %s-repo)' % f for f in FEATURES] |
| staged_apps = ['$(location %s)' % a for a in APPS] |
| |
| # feature_coords = 'foo:bar:1.3' |
| sources = [ '$(location :onos-features)', ] |
| sources += staged_repos + staged_apps |
| |
| genrule( |
| name = 'onos-package', |
| out = 'onos.tar.gz', |
| bash = '$(exe //buck-tools:onos-stage) $OUT $(location :onos-karaf) ' + ' '.join(sources), |
| visibility = [ 'PUBLIC' ], |
| ) |
| |
| genrule( |
| name = 'onos-run', |
| out = 'onos-run', |
| srcs = [ 'onos-run-karaf' ], |
| bash = 'sed "s#ONOS_TAR=#ONOS_TAR=$(location :onos-package)#" $SRCS > $OUT; chmod +x $OUT', |
| executable = True, |
| visibility = [ 'PUBLIC' ], |
| ) |