-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbuild
More file actions
executable file
·41 lines (27 loc) · 1.05 KB
/
build
File metadata and controls
executable file
·41 lines (27 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python3
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Build mandoc package."""
import os
import sys
FILESDIR = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, os.path.join(FILESDIR, '..', '..', 'bin'))
import ssh_client # pylint: disable=wrong-import-position
ARCHIVES = ('%(P)s.tar.gz',)
PATCHES = ('%(P)s.patch',)
def src_configure(_metadata):
"""Configure the source."""
for var in ('AR', 'CC', 'CFLAGS', 'CPPFLAGS', 'LDFLAGS'):
os.environ.pop(var, None)
if not os.path.exists('Makefile.local'):
ssh_client.run(['./configure'])
def src_compile(_metadata):
"""Compile the source."""
ssh_client.emake('mandoc')
def src_install(metadata):
"""Install the package."""
target = os.path.join(metadata['S'], 'mandoc')
path = os.path.join(ssh_client.BUILD_BINDIR, 'mandoc')
ssh_client.symlink(target, path)
ssh_client.build_package(sys.modules[__name__], 'build')