<commit_before>-- Sigma rules

-- base

package { 'ast-files' }

package { 'linux',
    source = { branch = 'ast50' }
}

package { 'xsdk' }

package { 'ucode',
    { 'install' }
}

-- tools

package { 'make', 'tools' }

-- FIXME: pkg scripts need review
-- if jagen.flag('debug') then
--     package        { 'gdb', 'host' }
--     rootfs_package { 'gdbserver' }
-- end

-- host

package { 'utils', 'host' }

package { 'karaoke-player', 'host',
    { 'configure',
        requires = {
            'chicken-eggs',
            'ffmpeg',
            'libuv',
        },
        { 'astindex', 'unpack' },
    }
}

package { 'astindex',
    { 'unpack', { 'karaoke-player', 'unpack' } }
}

-- kernel

local kernel_package_template = {
    config = 'target',
    { 'configure', { 'kernel', 'compile' } }
}

local function kernel_package(rule)
    package(rule, kernel_package_template)
end

package { 'kernel',
    source = { branch = 'sigma-2.6' },
    { 'configure',
        { 'linux',  'unpack'            },
        { 'rootfs', 'compile'           },
        { 'ezboot', 'compile', 'target' },
    },
    { 'install' },
    { 'image',  { 'rootfs', 'install' } }
}

kernel_package { 'loop-aes' }

kernel_package { 'ralink' }

-- rootfs

local rootfs_package_template = {
    config  = 'target',
    install = {
        path = '$jagen_sdk_staging_dir',
        prefix = ''
    },
    { 'configure', { 'rootfs', 'compile' } }
}

local function rootfs_package(rule)
    package(rule, rootfs_package_template)
end

package { 'rootfs',
    template = rootfs_package_template,
    { 'configure',
        { 'ast-files', 'unpack'           },
        { 'xsdk',      'unpack'           },
        { 'make',      'install', 'tools' },
    },
    { 'install',
        requires = {
            'busybox',
            'gnupg',
            'ntpclient',
            'util-linux',
            'utils',
        },
        { 'kernel',   'install'           },
        { 'mrua',     'modules',          },
        { 'loop-aes', 'install', 'target' },
        { 'ralink',   'install', 'target' },
    }
}

package { 'mrua',
    { 'configure',  { 'kernel', 'compile' } },
    { 'modules' },
    { 'install' },
}

rootfs_package { 'ezboot',
    { 'configure',
        { 'make', 'install', 'tools' }
    }
}

rootfs_package { 'busybox',
    { 'patch', { 'ast-files', 'unpack' } }
}

rootfs_package { 'utils',
    { 'configure',
        requires = { 'gpgme' },
        { 'dbus', 'install', 'target' }
    }
}<commit_msg>Change mrua rule configure to compile<commit_after>-- Sigma rules

-- base

package { 'ast-files' }

package { 'linux',
    source = { branch = 'ast50' }
}

package { 'xsdk' }

package { 'ucode',
    { 'install' }
}

-- tools

package { 'make', 'tools' }

-- FIXME: pkg scripts need review
-- if jagen.flag('debug') then
--     package        { 'gdb', 'host' }
--     rootfs_package { 'gdbserver' }
-- end

-- host

package { 'utils', 'host' }

package { 'karaoke-player', 'host',
    { 'configure',
        requires = {
            'chicken-eggs',
            'ffmpeg',
            'libuv',
        },
        { 'astindex', 'unpack' },
    }
}

package { 'astindex',
    { 'unpack', { 'karaoke-player', 'unpack' } }
}

-- kernel

local kernel_package_template = {
    config = 'target',
    { 'configure', { 'kernel', 'compile' } }
}

local function kernel_package(rule)
    package(rule, kernel_package_template)
end

package { 'kernel',
    source = { branch = 'sigma-2.6' },
    { 'configure',
        { 'linux',  'unpack'            },
        { 'rootfs', 'compile'           },
        { 'ezboot', 'compile', 'target' },
    },
    { 'install' },
    { 'image',  { 'rootfs', 'install' } }
}

kernel_package { 'loop-aes' }

kernel_package { 'ralink' }

-- rootfs

local rootfs_package_template = {
    config  = 'target',
    install = {
        path = '$jagen_sdk_staging_dir',
        prefix = ''
    },
    { 'configure', { 'rootfs', 'compile' } }
}

local function rootfs_package(rule)
    package(rule, rootfs_package_template)
end

package { 'rootfs',
    template = rootfs_package_template,
    { 'configure',
        { 'ast-files', 'unpack'           },
        { 'xsdk',      'unpack'           },
        { 'make',      'install', 'tools' },
    },
    { 'install',
        requires = {
            'busybox',
            'gnupg',
            'ntpclient',
            'util-linux',
            'utils',
        },
        { 'kernel',   'install'           },
        { 'mrua',     'modules',          },
        { 'loop-aes', 'install', 'target' },
        { 'ralink',   'install', 'target' },
    }
}

package { 'mrua',
    { 'compile',  { 'kernel', 'compile' } },
    { 'modules' },
    { 'install' },
}

rootfs_package { 'ezboot',
    { 'configure',
        { 'make', 'install', 'tools' }
    }
}

rootfs_package { 'busybox',
    { 'patch', { 'ast-files', 'unpack' } }
}

rootfs_package { 'utils',
    { 'configure',
        requires = { 'gpgme' },
        { 'dbus', 'install', 'target' }
    }
}
{'fraction_non_alphanumeric': 0.18777467039552537, 'fraction_numerical': 0.0015980823012385138, 'mean_word_length': 1.9522405660377358, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2634288', 'n_tokens_mistral': 1738, 'n_tokens_neox': 1728, 'n_words': 327}