예제 #1
0
def build(build):
    return basic.build(
        build_folder='build',
        configure=lambda: cmake('-DFREEGLUT_BUILD_DEMOS=OFF', folder='..'),
        compile=make,
        install=lambda: make('install')
    )
예제 #2
0
def build(build):
    packages = basic.build()

    packages['ui-resources/dejavu'].drain_build_cache(
        'ttf/*.ttf', 'usr/share/fonts/dejavu/')

    return packages
예제 #3
0
def build(build):

    # TODO:
    #   - Include the configuration in /boot/
    #   - Symlink or rename vmlinuz to vmlinuz-X.Y.Z.

    packages = basic.build(
        configure=lambda: make('olddefconfig'),
        compile=make,
        install=install_linux,
        deplinker=None,
    )

    packages['kernel/linux'].drain(
        'usr/lib/*',
        'boot/*',
    )

    # Remove useless files
    with stdlib.pushd(packages['kernel/linux'].wrap_cache):
        stdlib.cmd(
            f'find \\( -name .install -o -name ..install.cmd \\) -delete')

    # Drain documentation
    packages['kernel/linux-doc'].drain_build_cache('Documentation/*',
                                                   'usr/doc/linux/')

    # Packages member of `raven-os/essentials` should explicitly state all
    # of their dependencies, including indirect ones.
    packages['kernel/linux'].requires('raven-os/corefs')

    return packages
예제 #4
0
def build(build):
    return basic.build(
        build_folder='libtiff-build',
        configure=lambda: cmake(folder='..', generator='Ninja'),
        compile=ninja,
        install=ninja_install,
        check=ninja_test,
    )
예제 #5
0
def build(build):
    packages = basic.build(
        install=install_rust,
        split=drain_all_with_doc,
    )

    packages['dev-lang/rust'].requires('dev-apps/gcc')
    packages['dev-lang/rust'].requires('dev-apps/binutils')

    return packages
예제 #6
0
def build(build):
    packages = basic.build(build_folder='build',
                           configure=lambda: cmake(folder='..'),
                           compile=make,
                           install=lambda: make('install'))

    packages['dev-libs/graphite2-dev'].drain('usr/local/{share,include}/',
                                             'usr/share/graphite2/*.cmake')

    return packages
예제 #7
0
def build(build):
    packages = basic.build(
        compile=lambda: stdlib.cmd('python3 setup.py build'),
        install=lambda: stdlib.cmd(
            f'python3 setup.py install --root={build.install_cache}'),
        split=drain_all,
    )

    # Packages member of `raven-os/essentials` should explicitly state all
    # of their dependencies, including indirect ones.
    packages['dev-apps/meson'].requires('raven-os/corefs')

    return packages
예제 #8
0
def build(build):
    packages = basic.build(
        compile=lambda: stdlib.cmd('python3 configure.py --bootstrap'),
        check=lambda: stdlib.
        cmd('./ninja ninja_test && ./ninja_test --gtest_filter=-SubprocessTest.SetWithLots'
            ),
        split=split_ninja,
    )

    # Packages member of `raven-os/essentials` should explicitly state all
    # of their dependencies, including indirect ones.
    packages['dev-apps/ninja'].requires('raven-os/corefs')

    return packages
예제 #9
0
def build(build):

    packages = basic.build(
        compile=make,
    )

    # Drain protocols and services
    packages['sys-libs/iana-etc'].drain_build_cache('protocols', 'etc/')
    packages['sys-libs/iana-etc'].drain_build_cache('services', 'etc/')

    # Packages member of `raven-os/essentials` should explicitly state all
    # of their dependencies, including indirect ones.
    packages['sys-libs/iana-etc'].requires('raven-os/corefs')

    return packages
예제 #10
0
def build(build):

    os.environ[
        'PKG_CONFIG_PATH'] = '/usr/lib/pkgconfig:/tools/lib/pkgconfig'  # TODO FIXME
    os.environ['LANG'] = 'en_US.UTF-8'

    packages = basic.build(
        build_folder='build',
        extract=extract_systemd,
        patch=patch_systemd,
        configure=lambda: stdlib.cmd('''meson \
            --prefix=/usr                   \
            --sysconfdir=/etc               \
            --localstatedir=/var            \
            -Dblkid=true                    \
            -Dbuildtype=release             \
            -Ddefault-dnssec=no             \
            -Dfirstboot=false               \
            -Dinstall-tests=false           \
            -Dkmod-path=/usr/bin/kmod       \
            -Dldconfig=false                \
            -Dmount-path=/usr/bin/mount     \
            -Drootprefix=                   \
            -Drootlibdir=/usr/lib           \
            -Dsplit-usr=true                \
            -Dsulogin-path=/usr/bin/sulogin \
            -Dsysusers=false                \
            -Dumount-path=/usr/bin/umount   \
            -Db_lto=false                   \
            -Drpmmacrosdir=no               \
            ..
        '''),
        compile=lambda: stdlib.cmd('ninja'),
        install=lambda: stdlib.cmd('ninja install'),
        split=split_systemd,
    )

    # Packages member of `raven-os/essentials` should explicitly state all
    # of their dependencies, including indirect ones.
    packages['sys-apps/systemd'].requires('raven-os/corefs')
    packages['sys-apps/systemd'].requires('sys-apps/shadow')
    packages['sys-apps/systemd'].requires('sys-apps/bash')
    packages['sys-apps/systemd'].requires('sys-apps/coreutils')

    packages['sys-apps/systemd'].load_instructions('./instructions.sh')

    return packages
예제 #11
0
def build(build):
    packages = basic.build(
        configure=lambda: stdlib.cmd(
            "./bootstrap --prefix=/usr          \
            --system-libs                       \
            --mandir=/share/man                 \
            --no-system-jsoncpp                 \
            --no-system-librhash                \
            --docdir=/share/doc/cmake-3.15.5"
        ),
        compile=make,
        install=lambda: make('install', f'DESTDIR={build.install_cache}'),
    )

    packages['dev-apps/cmake'].drain(
        'usr/share/cmake-3.15/'
    )

    return packages
예제 #12
0
def build(build):

    packages = basic.build(
        compile=make,
    )

    # Drain certificates and binaries
    packages['sys-libs/ca-certificates'].drain_build_cache('mozilla/*.crt', 'usr/share/ca-certificates/mozilla/')
    packages['sys-libs/ca-certificates'].drain_build_cache('sbin/update-ca-certificates', 'usr/bin/update-ca-certificates')

    packages['sys-libs/ca-certificates'].load_instructions('./instructions.sh')

    # Packages member of `raven-os/essentials` should explicitly state all
    # of their dependencies, including indirect ones.
    packages['sys-libs/ca-certificates'].requires('raven-os/corefs')
    packages['sys-libs/ca-certificates'].requires('sys-apps/bash')
    packages['sys-libs/ca-certificates'].requires('sys-apps/coreutils')
    packages['sys-libs/ca-certificates'].requires('sys-apps/findutils')
    packages['sys-libs/ca-certificates'].requires('sys-apps/sed')
    packages['sys-libs/ca-certificates'].requires('sys-libs/openssl')

    return packages
예제 #13
0
def build(
    build_folder='build',
    fetch=stdlib.fetch.fetch,
    extract=stdlib.extract.flat_extract_all,
    patch=stdlib.patch.patch_all,
    configure=stdlib.template.meson.meson,
    compile=stdlib.template.ninja.ninja,
    check=stdlib.template.ninja.ninja_test,
    install=stdlib.template.ninja.ninja_install,
    split=stdlib.split.system.system,
    deplinker=stdlib.deplinker.elf.elf_deplinker,
):
    """Download, build and wrap a software based on ``meson`` and ``ninja``.

    This exhaustive template is made of 8 steps:
        * ``fetch``
        * ``extract``
        * ``patch``
        * ``build``
        * ``check``
        * ``install``
        * ``split``
        * ``dependency linking``

    For each one of these steps, a function is called. This template simply calls each of them in the above order.
    All of these functions can be given as arguments, but each one of them has a default value that is explained below.
    If any of those functions is ``None``, the step is skipped.

    **Fetch**

        This step is used to download the source code. The default value is :py:func:`.fetch` with no argument.

    **Extract**

        This step is used to extract the downloaded source code. The default value is :py:func:`.flat_extract_all` with no argument.

    **Patch**

        This step is used to patch the downloaded source code. The default value is :py:func:`.patch_all`, with no argument.

    From now on, the current working directory is changed in favor of ``build_folder`` (which defaults to ``./build``).
    If the directory pointed by ``build_folder`` doesn't exist, it is created.

    **Configure**

        This step is used to configure the source code. The default value is :py:func:`.meson`, with no argument.

    **Build**

        This step compiles the source code. The default value is :py:func:`.ninja`, with no argument.

    **Check**

        This step runs the unit and integration tests. The default value is :py:func:`.ninja_test`, with no argument.

    **Install**

        This step installs the software in the install cache. The default value is :py:func:`.ninja_install`, with no argument.

    **Split**

        This step automatically splits the output of the build into multiple packages. The default value is :py:func:`~stdlib.split.system.system`.
        Alternative splitters can be found in the :py:mod:`~stdlib.split` module.

    **Dependency Linking**

        This step automatically finds requirements for the generated packages. The default value is :py:func:`~stdlib.deplinker.elf.elf_deplinker`.
        Alternative dependency linkers can be found in the :py:mod:`~stdlib.deplinker` module.

    """
    return basic.build(
        build_folder=build_folder,
        fetch=fetch,
        extract=extract,
        patch=patch,
        configure=configure,
        compile=compile,
        check=check,
        install=install,
        split=split,
        deplinker=deplinker,
    )
예제 #14
0
def build(build):
    return basic.build(build_folder='build',
                       configure=lambda: cmake('..'),
                       compile=make,
                       install=lambda: make('install'))