Skip to content
On this page

Manifests

linglong.yaml is the description file of a Linglong project, which stores the relevant information required for building. Such as the name, version, source address, build dependencies, etc., of the build product.

Project directory structure

bash
{project-root}
├── linglong.yaml
└── .linglong-target

{user-home}
└── .cache
    └── linglong-builder
        ├── repo
        └── layers

Field definitions

App meta info

yaml
package:
  id: org.deepin.calculator
  name: deepin-calculator
  version: 5.7.21
  kind: app
  description: |
    calculator for deepin os.
namedescription
descriptionDetailed description of the build product
idUnique name of the build product
kindThe type of build product: app, runtime, lib, representing application, library in turn
versionversion of the build product

Runtime

Describes the build and run dependencies of the application.

yaml
runtime:
  id: org.deepin.Runtime
  version: 23.0.0
  # NOT IMPLEMENTATION NOW
  digest: 4d85525f09211381c77d2085c9c1057

The id can also be written to include the version as:

text
runtime:
  id: org.deepin.Runtime/20.5.0
namedescription
idUnique name of the runtime
versionRuntime version
digest(not used yet, this field can be used to bind a unique version of the runtime)

Dependencies

Describes the build dependencies and runtime dependencies of the application.

yaml
depends:
  - id: dde-qt-dbus-factory
    version: 5.5.12
  - id: googletest
    version: 1.8.1
  - id: icu
    version: 63.1.0
    type: runtime
  - id: xcb-util
    version: 0.3.8.1
    type: runtime
namedescription
idUnique name of the dependency
typeThe type of dependency, the type of runtime dependency, will be submitted with the build content
versionDependency version
digest(not used yet, this field can be used to bind a unique version of the dependency)

ll-builder will pull dependencies from the remote repository to the local when the project is built. If the dependency does not exist in the remote repository or cannot meet the requirements, you can add source and build content, and ll-builder will build and apply this type of dependency first to the project build.

yaml
depends: 
  - id: icu
    version: 63.1.0
    source:
      kind: git
      url: https://github.com/deepin-community/icu.git
      version: master
      commit: 3c651bcc40748fc5d02d9134fcaee14fda44ab62
    build:
      kind: autotools

Source

Describes the source information.

yaml
source:
  kind: git
  url: https://github.com/linuxdeepin/deepin-calculator.git
  version: master
  commit: d7e207b4a71bbd97f7d818de5044228c1a6e2c92
  patch:
    -patches/fix-install-prefix-path.patch
    - patches/fix-lib-install-path.patch
namedescription
kindSource code type, optional types local, archive, git
urlSource address, fill in when the type is archive or git
versionSource branch version, fill in when the type is git
digestThe Hash value of archive file encrypted using sha256 algorithm, fill in when the type is git
commitThe hash value of a source code commit, fill in when the type is git
patchSource patch path

Build rules

Describes the build rules.

yaml
build:
  kind: manual
  manual:
    configure: |
      mkdir build
      cd build
      qmake -r PREFIX=${PREFIX} ..
    build: |
      make -j
      make test
    install: |
      make -j install
yaml
build:
  kind: autotools
  manual:
    configure: |
      ./bootstrap.sh
namedescription
buildbuild rules at build time
configurebuild-time configure rules
installbuild-time install rules
kindBuild type, optional manual, autotools, cmake, qmake
manualBuild rules, when manual is declared, it means custom rules, that is, rewriting build, install, configure

Variables

Describes the variables that can be used by the build.

yaml
variables:
  build_dir: |
  dest_dir: |
  conf_args: |
    --prefix=${PREFIX}
    --libdir=lib/${TRIPLET}
  extra_args: |
    --doc=enable
  jobs: |
    -j64

build:
  kind: manual
  manual:
    configure: |
      ./configure ${conf_args} ${extra_args}
    build: |
      make ${jobs}
    install: |
      make DESTDIR=${dest_dir} install
namedescription
build_dirBuilt-in variables, assigned in the variable field, used in the build field
dest_dirSame as build_dir
conf_argsSame as build_dir
extra_argsSame as build_dir
jobsSame as build_dir
PREFIXOne of the environment variables, which can be used under the variable and build fields; provide the installation path when building
TRIPLETOne of the environment variables, which can be used under the variable and build fields; provide a triple containing architecture information, such as x86_64-linux-gnu

Complete example

Build app

yaml
package:
  id: org.deepin.calculator
  name: deepin-calculator
  version: 5.7.21
  kind: app
  description: |
    calculator for deepin os.

runtime:
  id: org.deepin.Runtime
  version: 23.0.0

depends:
  - id: dde-qt-dbus-factory
    version: 5.5.12
  - id: googletest
    version: 1.8.1
  - id: icu
    version: 63.1.0
    type: runtime
  - id: xcb-util
    version: 0.3.8.1
    type: runtime

source:
  kind: git
  url: https://github.com/linuxdeepin/deepin-calculator.git
  version: master
  commit: d7e207b4a71bbd97f7d818de5044228c1a6e2c92

variables:
  extra_args: |
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_SAFETYTEST_ARG="CMAKE_SAFETYTEST_ARG_OFF" \
    -DAPP_VERSION=5.7.21 \
    -DVERSION=5.7.21

build:
  kind: cmake

Build dependencies

yaml
package:
   id: libopenjp2
   kind: lib
   version: 2.4.0

base:
   id: org.deepin.base
   version: 23.0.0

source:
   kind: git
   url: https://github.com/uclouvain/openjpeg
   version: 2.4.0
   commit: 37ac30ceff6640bbab502388c5e0fa0bff23f505

build:
   kind: cmake

Build runtime

yaml
package:
   id: org.deepin.Runtime
   kind: runtime
   version: 23.0.0
   description: |
     runtime of deepin.

base:
   id: org.deepin.base/23.0.0

depends:
  - id: qtbase/5.15.7
  - id: qttranslations/5.15.7
  - id: qt3d/5.15.7
  - id: qtcharts/5.15.7
  - id: qtconnectivity/5.15.7
  - id: qtgamepad/5.15.7
  - id: qtsensors/5.15.7
  - id: qtspeech/5.15.7
  - id: qtvirtualkeyboard/5.15.7
  - id: qtserialport/5.15.7
  - id: qtnetworkauth/5.15.7
  - id: qttools/5.15.7
  - id: qtx11extras/5.15.7
  - id: qtdeclarative/5.15.7
  - id: qtsvg/5.15.7
  - id: qtscript/5.15.7
  - id: qtgraphicaleffects/5.15.7
  - id: qtquickcontrols/5.15.7
  - id: qtquickcontrols2/5.15.7
  - id: qtxmlpatterns/5.15.7
  - id: qtwayland/5.15.7
  - id: qtmultimedia/5.15.7
  - id: qtwebchannel/5.15.7
  - id: qtwebsockets/5.15.7
  - id: qtimageformats/5.15.7
  - id: qtlocation/5.15.7
  - id: spdlog/1.10.0
  - id: fmtlib/10.1.2
  - id: dtkcommon/5.6.0.3
  - id: dtkcore/5.6.0.9
  - id: dtkgui/5.6.0.13
  - id: dtkwidget/5.6.0.6
  - id: dtkdeclarative/5.6.0.7
  - id: qt5integration/5.6.0.5
  - id: qt5platform-plugins/5.6.0.5
  - id: libqtxdg/3.6.0.1
  - id: double-conversion/3.1.0.3
  - id: deepin-shortcut-viewer/5.0.6.1
  - id: fcitx-qt5/1.2.6.6
  - id: gsettings-qt/0.3.1.1
  - id: linglong-config/0.0.1.2

build:
   kind: manual
   manual:
     configure: |
       echo skip configure

When the package type is runtime, all dependencies will be submitted.

Build tools template

Automake type build template

autotools.yaml provides a generic automake type build template, the template file is as follows:

yaml
variables:
   build_dir: build_dir
   conf_args: |
     --prefix=${PREFIX} \
     --libdir=${PREFIX}/lib/${TRIPLET}
   extra_args: |
   dest_dir: |
   jobs: -j${JOBS}

build:
   kind: autotools
   manual:
     configure: |
       #autogon.sh, bootstrap.sh
       autoreconf -ivf
       ./configure ${conf_args} ${extra_args}
     build: |
       make ${jobs}
     install: |
       make ${jobs} DESTDIR=${dest_dir} install

Build tool:

yaml
build:
   kind: autotools

qmake build template

qmake.yaml provides a generic qmake build template, the template file is as follows:

yaml
variables:
   build_dir: build_dir
   conf_args: |
     PREFIX=${PREFIX} \
     LIB_INSTALL_DIR=${PREFIX}/lib/${TRIPLET}
   extra_args: |
   dest_dir: |
   jobs: -j${JOBS}

build:
   kind: qmake
   manual :
     configure: |
       qmake -makefile ${conf_args} ${extra_args}
     build: |
       make ${jobs}
     install: |
       make ${jobs} DESTDIR=${dest_dir} install

Build tool:

yaml
build:
   kind: qmake

cmake build templates

cmake.yaml provides a generic cmake build template, the template file is as follows:

yaml
variables:
   build_dir: build_dir
   conf_args: |
     -DCMAKE_INSTALL_PREFIX=${PREFIX} \
     -DCMAKE_INSTALL_LIBDIR=${PREFIX}/lib/${TRIPLET}
   extra_args: |
   dest_dir: |
   jobs: -j${JOBS}

build:
   kind: cmake
   manual :
     configure: |
       cmake -B ${build_dir} ${conf_args} ${extra_args}
     build: |
       cmake --build ${build_dir} -- ${jobs}
     install: |
       env DESTDIR=${dest_dir} cmake --build ${build_dir} --target install

Build tool:

yaml
build:
   kind: cmake

Runtime 23.0.0 includes these dependencies:

idversion
qtbase5.15.7
qt3d5.15.7
qtcharts5.15.7
qtconnectivity5.15.7
qtgamepad5.15.7
qtsensors5.15.7
qtspeech5.15.7
qtvirtualkeyboard5.15.7
qtserialport5.15.7
qtnetworkauth5.15.7
qttools5.15.7
qtx11extras5.15.7
qtdeclarative5.15.7
qtsvg5.15.7
qtscript5.15.7
qtgraphicaleffects5.15.7
qtquickcontrols5.15.7
qtquickcontrols25.15.7
qtxmlpatterns5.15.7
qtwayland5.15.7
qtmultimedia5.15.7
qtwebchannel5.15.7
qtwebsockets5.15.7
qtimageformats5.15.7
qtlocation5.15.7
dtkcommon5.6.0.3
dtkcore5.6.0.9
dtkgui5.6.0.13
dtkwidget5.6.0.6
dtkdeclarative5.6.0.7
libqtxdg3.6.0.3
qt5integration5.6.0.5
double-conversion3.1.0.2
deepin-shortcut-viewer5.0.6.1
fcitx-qt51.2.6.6
gsettings-qt0.3.1.1
qt5platform-plugins5.6.0.5
spdlog1.10.0
fmtlib10.1.2

Other available dependencies:

idversion
aria21.34.0
bzip21.0.6
cdparanoia3.10.2
dde-control-center5.5.23
dde-dock5.5.15
disomaster5.0.7
djvulibre3.5.27.1
ffmpeg4.1.8
ffmpegthumbnailer2.1.1
freeimage3.18.0
gio-qt0.0.11
gst-plugins-good1.01.14.5
gstreamer1.01.14.6
ilmbase2.2.1
image-editor1.0.9
jxrlib1.1.1
karchive5.54.0
kcodecs5.54.0
kconfig5.54.0
kcoreaddons5.54.0
kcrash5.54.0
kdbusaddons5.54.0
kglobalaccel5.54.0
ki18n5.54.0
kservice5.54.0
ksyntax-highlighting5.54.0
kwayland5.57.0
kwindowsystem5.54.0
leveldb1.20
libarchive3.3.3
libchardet1.0.4
libdbusmenu-qt0.9.3
libdmr5.9.13
libdv1.0.0
libepoxy1.5.3
libevent2.1.8
libraw0.19.2
libvisual0.4.0
libxrandr1.5.1
libxtst5.5.15
libzip1.5.1.8
minizip1.1.1
mpv0.29.1.37
opencv3.2.0
openexr2.2.1.4
procps3.3.15
qtdbusextended0.0.3
qtmpris0.1.0.1
sqlite33.27.2.3
taglib1.11.1
uchardet0.0.6
udisks2-qt55.0.3
vlc3.0.11
xcb-util0.3.8.1
icu63.1
dde-qt-dbus-factory5.5.12
gst-plugins-base1.01.14.4.2
libdvdnav6.0.0
libdvdread6.0.0
libical33.0.4
libva2.4.0
libxcursor1.1.15
orc0.4.28
poppler0.71.0.2
kmod26.1
pciutils3.5.2.4
xz-utils5.2.4.1
libxslt1.1.32.3
v4l-utils1.20.0
portaudio1919.6.0
gst-plugins-bad1.01.14.4.2
gst-plugins-ugly1.01.14.4.2
nettle3.4.1.2
aom1.0.0.1
codec20.8.1
libdc13942.2.5
libmysofa0.6
x2640.155.2917
x2652.9
xavs21.4.1
cunit2.1
lapack3.8.0.1
openblas0.3.5
crystalhd0.0.1
davs21.7.1
elfutils0.176.2