DIR_NETBSD_CATALOG = '/usr/local/www/nuxi.nl/public/distfiles/cloudabi-ports/netbsd'
DIR_OPENBSD_CATALOG = '/usr/local/www/nuxi.nl/public/distfiles/cloudabi-ports/openbsd'

# Location of the catalog signing keys.
DEBIAN_PRIVATE_KEY = '31344B15'
FREEBSD_PRIVATE_KEY = '/home/edje/.cloudabi-ports-freebsd.key'

# Zap the old temporary directory.
util.remove_and_make_dir(DIR_TMP)

# Parse all of the BUILD rules.
repo = Repository(os.path.join(DIR_TMP, 'install'))
# repo = Repository(os.path.join(os.getcwd(), '_obj/install'))
for filename in util.walk_files(os.path.join(os.getcwd(), 'packages')):
    if os.path.basename(filename) == 'BUILD':
        repo.add_build_file(filename, DIR_DISTFILES)
target_packages = repo.get_target_packages()

# The catalogs that we want to create.
debian_path = os.path.join(DIR_TMP, 'debian')
debian_catalog = DebianCatalog(DIR_DEBIAN_CATALOG, debian_path)
freebsd_path = os.path.join(DIR_TMP, 'freebsd')
freebsd_catalog = FreeBSDCatalog(DIR_FREEBSD_CATALOG, freebsd_path)
netbsd_path = os.path.join(DIR_TMP, 'netbsd')
netbsd_catalog = NetBSDCatalog(DIR_NETBSD_CATALOG, netbsd_path)
openbsd_path = os.path.join(DIR_TMP, 'openbsd')
openbsd_catalog = OpenBSDCatalog(DIR_OPENBSD_CATALOG, openbsd_path)

# Build all packages.
catalog_set = CatalogSet({
    debian_catalog, freebsd_catalog, netbsd_catalog, openbsd_catalog,
Exemple #2
0
#!/usr/bin/env python3
# Copyright (c) 2015 Nuxi, https://nuxi.nl/
#
# SPDX-License-Identifier: BSD-2-Clause

import logging
import os
import sys

from src import util
from src.repository import Repository

# Setup logging
logging.basicConfig(level=logging.INFO)

# Locations relative to the source tree.
DIR_ROOT = os.getcwd()
DIR_DISTFILES = os.path.join(DIR_ROOT, '_obj/distfiles')
DIR_TMP = os.path.join(DIR_ROOT, '_obj/fixup_patches')

# Parse all of the BUILD rules.
repo = Repository(None)  # type: ignore
for arg in sys.argv[1:]:
    for filename in util.walk_files(arg):
        if os.path.basename(filename) == 'BUILD':
            repo.add_build_file(filename, DIR_DISTFILES)

# Regenerate all the patches.
for distfile in repo.get_distfiles():
    distfile.fixup_patches(DIR_TMP)
import stat
import subprocess
import sys

from src import config
from src import util
from src.repository import Repository

# Locations relative to the source tree.
DIR_ROOT = os.getcwd()
DIR_DISTFILES = os.path.join(DIR_ROOT, '_obj/distfiles')
DIR_INSTALL = os.path.join(DIR_ROOT, '_obj/install')
DIR_REPOSITORY = os.path.join(DIR_ROOT, 'packages')

# Parse all of the BUILD rules.
repo = Repository(DIR_INSTALL)
for dirname, filename in util.walk_files(DIR_REPOSITORY):
    if filename == 'BUILD':
        repo.add_build_file(os.path.join(dirname, 'BUILD'), DIR_DISTFILES)
target_packages = repo.get_target_packages()

if len(sys.argv) > 1:
    # Only build the packages provided on the command line.
    for name in set(sys.argv[1:]):
        for arch in config.ARCHITECTURES:
            target_packages[(name, arch)].build()
else:
    # Build all packages.
    for name, arch in target_packages:
        target_packages[(name, arch)].build()