← 返回命令列表

Linux command

flatpak-builder 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Build

flatpak-builder [path/to/build_directory] [path/to/manifest.json]

Example

flatpak-builder --repo [repository_name] [path/to/build_directory] [path/to/manifest.json]

Example

flatpak-builder --install [path/to/build_directory] [path/to/manifest.json]

Example

flatpak-builder --gpg-sign [key_id] --repo [repository_name] [path/to/build_directory] [path/to/manifest.json]

Run a shell

flatpak-builder --run [path/to/build_directory] [path/to/manifest.json] sh

Example

flatpak-builder --show-deps [path/to/manifest.json]

Example

flatpak-builder --ccache [path/to/build_directory] [path/to/manifest.json]

说明

Flatpak-builder is a build automation tool that constructs Flatpak applications from manifest files. It wraps the core flatpak build command, providing a streamlined workflow for compiling applications and their dependencies within the Flatpak sandbox. The tool processes JSON or YAML manifests that define application metadata, runtime requirements, and module build instructions. It follows the standard ./configure && make && make install pattern automatically and caches intermediate results for efficient incremental builds. Build stages include: downloading sources, initializing the application directory, building and installing each module, cleanup, and finalization. Results are cached per-module, allowing quick rebuilds when only specific components change.

参数

--repo _name_
Export the build to the specified repository
--install
Install the built application locally for the current user
--gpg-sign _key_id_
Sign the commit with the specified GPG key
--arch _arch_
Specify target architecture
--ccache
Enable compiler caching for faster rebuilds
--disable-cache
Disable build cache, forcing full rebuild
--force-clean
Erase previous build directory contents
--run _command_
Run a command inside the build sandbox
--build-shell _module_
Open interactive shell at specified module for debugging
--stop-at _module_
Stop build after completing specified module
--show-deps
Display dependencies required by the manifest
--show-manifest
Display the processed manifest

FAQ

What is the flatpak-builder command used for?

Flatpak-builder is a build automation tool that constructs Flatpak applications from manifest files. It wraps the core flatpak build command, providing a streamlined workflow for compiling applications and their dependencies within the Flatpak sandbox. The tool processes JSON or YAML manifests that define application metadata, runtime requirements, and module build instructions. It follows the standard ./configure && make && make install pattern automatically and caches intermediate results for efficient incremental builds. Build stages include: downloading sources, initializing the application directory, building and installing each module, cleanup, and finalization. Results are cached per-module, allowing quick rebuilds when only specific components change.

How do I run a basic flatpak-builder example?

Run `flatpak-builder [path/to/build_directory] [path/to/manifest.json]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --repo _name_ do in flatpak-builder?

Export the build to the specified repository