| #!/usr/bin/env python3 |
| # Copyright 2023 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| """Build whois 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 = ("%(p)s.tar.gz",) |
| |
| |
| def src_configure(_metadata): |
| """Configure the source.""" |
| ssh_client.emake( |
| "version.h", |
| "as_del.h", |
| "ip_del.h", |
| "ip6_del.h", |
| "new_gtlds.h", |
| "nic_handles.h", |
| "tld_serv.h", |
| ) |
| |
| |
| def src_compile(metadata): |
| """Compile the source.""" |
| ssh_client.emake( |
| f"SRCDIR={metadata['S']}", f"OUTPUT={metadata['workdir']}", cwd=FILESDIR |
| ) |
| |
| |
| def src_install(_metadata): |
| """Install the package.""" |
| |
| |
| ssh_client.build_package(sys.modules[__name__], "wasm") |