| #!/usr/bin/env python3 | |
| # Copyright 2019 The ChromiumOS Authors | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| """Build binaryen package.""" | |
| from pathlib import Path | |
| import sys | |
| FILESDIR = Path(__file__).resolve().parent | |
| sys.path.insert(0, str(FILESDIR.parent.parent / "bin")) | |
| import ssh_client # pylint: disable=wrong-import-position | |
| ARCHIVES = ("%(PN)s-version_%(PV)s-x86_64-linux.tar.gz",) | |
| S = "%(workdir)s/%(PN)s-version_%(PV)s" | |
| def src_install(metadata): | |
| """Install the package.""" | |
| # For now we assume everything in here is a program. | |
| srcbindir = metadata["S"] / "bin" | |
| for target in srcbindir.iterdir(): | |
| path = ssh_client.BUILD_BINDIR / target.name | |
| ssh_client.symlink(target, path) | |
| ssh_client.build_package(sys.modules[__name__], "build") |