summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2015-10-14 13:42:53 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2015-10-14 13:42:53 +0000
commit02a67b0e1a7f91eecf86249ee4a9b54637a9ce34 (patch)
tree47e4d769cb4de6010b8eb273ed0306ec5b59b7db
parentd6448b6b74ad835f657f3feb42645b0611ea856e (diff)
downloaddefinitions-02a67b0e1a7f91eecf86249ee4a9b54637a9ce34.tar.gz
Apply migrations
-rw-r--r--DEFAULTS199
-rw-r--r--strata/build-essential.morph6
-rw-r--r--strata/docutils.morph2
-rw-r--r--strata/genivi-demo-platform-libs.morph1
-rw-r--r--strata/genivi-demo-platform.morph1
-rw-r--r--strata/gnome.morph26
-rw-r--r--strata/input-common.morph2
-rw-r--r--strata/input-genivi.morph3
-rw-r--r--strata/qt5-tools.morph1
9 files changed, 224 insertions, 17 deletions
diff --git a/DEFAULTS b/DEFAULTS
new file mode 100644
index 00000000..f08ed3ea
--- /dev/null
+++ b/DEFAULTS
@@ -0,0 +1,199 @@
+# Baserock definitions defaults
+# =============================
+#
+# The DEFAULTS file is treated specially by Baserock build tools.
+#
+# For more information, see: <http://wiki.baserock.org/definitions/current>.
+
+
+# Predefined build commands
+# -------------------------
+#
+# Common patterns in build instructions can be defined here, which can save
+# users from having to write lots of similar-looking chunk .morph files.
+#
+# There are pre- and post- variants for each set of commands. These exist so
+# you can add more commands without having to copy the defaults. For example,
+# to create an extra symlink after running `make install`, you can use
+# post-install-commands. Since these exist as a way of extending the defaults,
+# you cannot set default values for the pre- and post- commands.
+#
+# The set of environment variables available when these commands are executed
+# is not formally specified right now, but you can assume PREFIX, DESTDIR and
+# MORPH_ARCH are all set.
+#
+build-systems:
+ manual:
+ # The special, default 'no-op' build system.
+ configure-commands: []
+ build-commands: []
+ install-commands: []
+ strip-commands: []
+
+ autotools:
+ # GNU Autoconf and GNU Automake, or anything which follow the same pattern.
+ #
+ # See also: https://github.com/cgwalters/build-api/blob/master/build-api.md
+ configure-commands:
+ - >-
+ export NOCONFIGURE=1;
+ if [ -e autogen ]; then ./autogen;
+ elif [ -e autogen.sh ]; then ./autogen.sh;
+ elif [ -e bootstrap ]; then ./bootstrap;
+ elif [ -e bootstrap.sh ]; then ./bootstrap.sh;
+ elif [ ! -e ./configure ]; then autoreconf -ivf;
+ fi
+ - ./configure --prefix="$PREFIX"
+ build-commands:
+ - make
+ install-commands:
+ - make DESTDIR="$DESTDIR" install
+ strip-commands:
+ # TODO: Make idempotent when files are hardlinks
+ # Strip all ELF binary files that are executable or named like a library.
+ # .so files for C, .cmxs for OCaml and .node for Node.
+ #
+ # The file name and permissions checks are done with the `find` command before
+ # the ELF header is checked with the shell command, because it is a lot cheaper
+ # to check the mode and file name first, because it is a metadata check, rather
+ # than a subprocess and a file read.
+ #
+ # `file` is not used, to keep the dependency requirements down.
+ - &generic-strip-command |
+ find "$DESTDIR" -type f \
+ '(' -perm -111 -o -name '*.so*' -o -name '*.cmxs' -o -name '*.node' ')' \
+ -exec sh -ec \
+ 'read -n4 hdr <"$1" # check for elf header
+ if [ "$hdr" != "$(printf \\x7fELF)" ]; then
+ exit 0
+ fi
+ debugfile="$DESTDIR$PREFIX/lib/debug/$(basename "$1")"
+ mkdir -p "$(dirname "$debugfile")"
+ objcopy --only-keep-debug "$1" "$debugfile"
+ chmod 644 "$debugfile"
+ strip --remove-section=.comment --remove-section=.note --strip-unneeded "$1"
+ objcopy --add-gnu-debuglink "$debugfile" "$1"' - {} ';'
+
+ python-distutils:
+ # The Python distutils build systems.
+ configure-commands: []
+ build-commands:
+ - python setup.py build
+ install-commands:
+ - python setup.py install --prefix "$PREFIX" --root "$DESTDIR"
+ strip-commands:
+ - *generic-strip-command
+
+ cpan:
+ # The Perl ExtUtil::MakeMaker build system. This is called the 'cpan' build
+ # system for historical reasons.
+ #
+ # To install perl distributions into the correct location in our chroot
+ # we need to set PREFIX to <destdir>/<prefix> in the configure-commands.
+ #
+ # The mapping between PREFIX and the final installation
+ # directories is complex and depends upon the configuration of perl
+ # see,
+ # https://metacpan.org/pod/distribution/perl/INSTALL#Installation-Directories
+ # and ExtUtil::MakeMaker's documentation for more details.
+ configure-commands:
+ - perl Makefile.PL PREFIX=$DESTDIR$PREFIX
+ build-commands:
+ - make
+ install-commands:
+ - make install
+ strip-commands:
+ - *generic-strip-command
+
+ module-build:
+ # The Module::Build build system
+ #
+ # See the comment in ExtUtilsMakeMakerBuildSystem to see why --prefix is
+ # set to $DESTDIR$PREFIX here (--prefix in Module::Build has the same
+ # meaning as PREFIX in ExtUtils::MakeMaker).
+ configure-commands:
+ - perl Build.PL --prefix "$DESTDIR$PREFIX"
+ build-commands:
+ - ./Build
+ install-commands:
+ - ./Build install
+ strip-commands:
+ - *generic-strip-command
+
+ cmake:
+ # The CMake build system.
+ configure-commands:
+ - cmake -DCMAKE_INSTALL_PREFIX="$PREFIX"'
+ build-commands:
+ - make
+ install-commands:
+ - make DESTDIR="$DESTDIR" install
+ strip-commands:
+ - *generic-strip-command
+
+ qmake:
+ # The Qt build system.
+ configure-commands:
+ - qmake -makefile
+ build-commands:
+ - make
+ install-commands:
+ - make INSTALL_ROOT="$DESTDIR" install
+ strip-commands:
+ - *generic-strip-command
+
+
+# Predefined artifact splitting rules
+# -----------------------------------
+#
+# Once a build has completed, you have some files that have been installed into
+# $DESTDIR. The splitting rules control how many 'artifact' tarballs are
+# generated as a result of the build, and which files from $DESTDIR end up in
+# which 'artifact'.
+#
+# The default split rules are defined here. These can be overriden in
+# individual chunk .morph files and stratum .morph files using the 'products'
+# field.
+#
+split-rules:
+ chunk:
+ - artifact: -bins
+ include:
+ - (usr/)?s?bin/.*
+ - artifact: -libs
+ include:
+ - (usr/)?lib(32|64)?/lib[^/]*\.so(\.\d+)*
+ - (usr/)libexec/.*
+ - artifact: -devel
+ include:
+ - (usr/)?include/.*
+ - (usr/)?lib(32|64)?/lib.*\.a
+ - (usr/)?lib(32|64)?/lib.*\.la
+ - (usr/)?(lib(32|64)?|share)/pkgconfig/.*\.pc
+ - artifact: -doc
+ include:
+ - (usr/)?share/doc/.*
+ - (usr/)?share/man/.*
+ - (usr/)?share/info/.*
+ - artifact: -locale
+ include:
+ - (usr/)?share/locale/.*
+ - (usr/)?share/i18n/.*
+ - (usr/)?share/zoneinfo/.*
+ - artifact: -misc
+ include:
+ - .*
+
+ stratum:
+ - artifact: -devel
+ include:
+ - .*-devel
+ - .*-debug
+ - .*-doc
+ - artifact: -runtime
+ include:
+ - .*-bins
+ - .*-libs
+ - .*-locale
+ - .*-misc
+ - .*
diff --git a/strata/build-essential.morph b/strata/build-essential.morph
index 78063ce4..11cdf59b 100644
--- a/strata/build-essential.morph
+++ b/strata/build-essential.morph
@@ -270,6 +270,9 @@ chunks:
ref: 50893291621658f355bc5b4d450a8d06a563053d
unpetrify-ref: v1.2.8
build-system: autotools
+ artifacts:
+ zlib-libs: build-essential-minimal
+
build-depends:
- stage2-binutils
- stage2-busybox
@@ -281,9 +284,6 @@ chunks:
- stage2-make
- stage2-reset-specs
- glibc
- artifacts:
- zlib-libs: build-essential-minimal
-
- name: binutils
morph: strata/build-essential/binutils.morph
repo: upstream:binutils-tarball
diff --git a/strata/docutils.morph b/strata/docutils.morph
index 4329bb42..c36ae8ee 100644
--- a/strata/docutils.morph
+++ b/strata/docutils.morph
@@ -15,6 +15,7 @@ chunks:
ref: c8f0ce32a8075e9ab21e5cf734fb96195455264d
unpetrify-ref: docbook-xml-4.5
build-depends:
+
# This is a little awkward, we don't really build-depend on xml-catalog,
# but if we don't include it as a build dependency
# then we won't have the existing xml catalog in our staging area
@@ -31,6 +32,7 @@ chunks:
ref: 802da9dd5d4bc18f46a916eedc0c5c1980a15e59
unpetrify-ref: docbook-xsl-1.78.1
build-depends:
+
# Same issue as above, except this time we don't want to overwrite
# the catalog that now contains the XML DTDs.
- docbook-xml
diff --git a/strata/genivi-demo-platform-libs.morph b/strata/genivi-demo-platform-libs.morph
index 07af27f4..e0df3d29 100644
--- a/strata/genivi-demo-platform-libs.morph
+++ b/strata/genivi-demo-platform-libs.morph
@@ -21,3 +21,4 @@ chunks:
repo: upstream:dbus-python
ref: d0d5b5be685dc4c16b21c54335becc87ca4d6f58
unpetrify-ref: dbus-python-1.2.0
+ build-system: autotools
diff --git a/strata/genivi-demo-platform.morph b/strata/genivi-demo-platform.morph
index 2abea75e..ab92a00f 100644
--- a/strata/genivi-demo-platform.morph
+++ b/strata/genivi-demo-platform.morph
@@ -37,6 +37,7 @@ chunks:
- name: audiomanagerdemo
repo: upstream:genivi/audiomanagerdemo
ref: master
+ build-system: qmake
- name: genivi-demo-platform-hmi
morph: strata/genivi-demo-platform/genivi-demo-platform-hmi.morph
repo: upstream:genivi/genivi-demo-platform-hmi
diff --git a/strata/gnome.morph b/strata/gnome.morph
index 792a0953..fd5267b5 100644
--- a/strata/gnome.morph
+++ b/strata/gnome.morph
@@ -52,17 +52,17 @@ chunks:
repo: upstream:yelp-xsl
ref: 2dcf168dde754d18152b008473269a803d6e650b
unpetrify-ref: master
+ build-system: autotools
build-depends:
- itstool
- build-system: autotools
- name: yelp-tools
repo: upstream:yelp-tools
ref: 6df6bf24e385bbc1ac0b800be8a6e878f18a775c
unpetrify-ref: master
+ build-system: autotools
build-depends:
- itstool
- yelp-xsl
- build-system: autotools
- name: iso-codes
repo: upstream:iso-codes
ref: 18ac112b4b84c8f03743565fde3512a637820761
@@ -72,11 +72,11 @@ chunks:
repo: upstream:gnome/gnome-desktop
ref: 1dbe40fac0e9924552ce2692ec141e86ce3d5633
unpetrify-ref: master
+ build-system: autotools
build-depends:
- gsettings-desktop-schemas
- iso-codes
- yelp-tools
- build-system: autotools
- name: libnotify
repo: upstream:gnome/libnotify
ref: 2f2c5649ef210b1dffeb46cddf062d20e1518ccf
@@ -133,18 +133,18 @@ chunks:
repo: upstream:colord
ref: e68f251b753297fcd1fc2bb7356588945bd3e69b
unpetrify-ref: baserock/gnome
+ build-system: autotools
build-depends:
- gusb
- lcms2
- polkit
- build-system: autotools
- name: geocode-glib
repo: upstream:gnome/geocode-glib
ref: a3e183e40053b4bd0fd0b25a070f60597270397a
unpetrify-ref: master
+ build-system: autotools
build-depends:
- json-glib
- build-system: autotools
- name: libmbim
repo: upstream:libmbim
ref: 6cf74ebfae1dccf807bb34d88f2cd024d4b14da7
@@ -159,11 +159,11 @@ chunks:
repo: upstream:ModemManager
ref: 0ca68657fbcd5bace3d303a0babe2da292784385
unpetrify-ref: master
+ build-system: autotools
build-depends:
- libmbim
- libqmi
- polkit
- build-system: autotools
- name: geoclue
morph: strata/gnome/geoclue.morph
repo: upstream:geoclue
@@ -176,9 +176,9 @@ chunks:
repo: upstream:gnome/libgweather
ref: 5b8aed611f24d03434eed35e438cea213b894b7c
unpetrify-ref: master
+ build-system: autotools
build-depends:
- geocode-glib
- build-system: autotools
- name: gnome-settings-daemon
morph: strata/gnome/gnome-settings-daemon.morph
repo: upstream:gnome-settings-daemon
@@ -200,9 +200,9 @@ chunks:
repo: upstream:zenity
ref: d7135db2bdfdca812c0165f90e4611af9c7c6a50
unpetrify-ref: master
+ build-system: autotools
build-depends:
- yelp-tools
- build-system: autotools
- name: mozjs24
morph: strata/gnome/mozjs24.morph
repo: upstream:mozilla/mozjs24
@@ -212,9 +212,9 @@ chunks:
repo: upstream:gjs
ref: 5d480f519e2b7e95cf1fad2f9f1a8e798fd5fe49
unpetrify-ref: master
+ build-system: autotools
build-depends:
- mozjs24
- build-system: autotools
- name: telepathy-glib
morph: strata/gnome/telepathy-glib.morph
repo: upstream:telepathy-glib
@@ -241,9 +241,9 @@ chunks:
repo: upstream:gnome/gcr
ref: 1cce27499bcac6072e4ee516eaa1546eac56d687
unpetrify-ref: master
+ build-system: autotools
build-depends:
- p11-kit
- build-system: autotools
- name: libxkbcommon-x11
repo: upstream:xorg-lib-libxkbcommon
ref: c43c3c866eb9d52cd8f61e75cbef1c30d07f3a28
@@ -253,6 +253,7 @@ chunks:
repo: upstream:mutter
ref: 35729e8659cc99f45d3564c33d44a475f20d0060
unpetrify-ref: 3.18.0
+ build-system: autotools
build-depends:
- clutter
- cogl
@@ -263,14 +264,13 @@ chunks:
- startup-notification
- upower
- zenity
- build-system: autotools
- name: libxklavier
repo: upstream:libxklavier
ref: 65c132a65e90a42e898f07243ef544109ada53c9
unpetrify-ref: master
+ build-system: autotools
build-depends:
- iso-codes
- build-system: autotools
- name: m4-common
repo: upstream:m4-common
ref: 4b704704f5e826b73b79ccfddaf215a510c104c4
@@ -280,9 +280,9 @@ chunks:
repo: upstream:gnome/libgee
ref: 4301ab58efc217409c588a5527f68990b4e3d220
unpetrify-ref: master
+ build-system: autotools
build-depends:
- m4-common
- build-system: autotools
- name: caribou
morph: strata/gnome/caribou.morph
repo: upstream:caribou
diff --git a/strata/input-common.morph b/strata/input-common.morph
index c2ac35d7..9e484c63 100644
--- a/strata/input-common.morph
+++ b/strata/input-common.morph
@@ -34,4 +34,4 @@ chunks:
morph: strata/input-common/libxkbcommon-no-x11.morph
unpetrify-ref: xkbcommon-0.5.0
build-depends:
- - xkeyboard-config
+ - xkeyboard-config
diff --git a/strata/input-genivi.morph b/strata/input-genivi.morph
index 7aa6f942..41caf7cb 100644
--- a/strata/input-genivi.morph
+++ b/strata/input-genivi.morph
@@ -8,6 +8,7 @@ chunks:
repo: upstream:mtdev-git
ref: 4381b78fea54de0e775bf54952b2f95e5a06c57d
unpetrify-ref: v1.1.5
+ build-system: autotools
- name: xkeyboard-config
morph: strata/input-common/xkeyboard-config.morph
repo: upstream:xkeyboard-config
@@ -17,10 +18,12 @@ chunks:
repo: upstream:libevdev
ref: 7ac00d7e920c56bb8617403699030a5300bfae1c
unpetrify-ref: libevdev-1.3.2
+ build-system: autotools
- name: libinput@genivi
repo: upstream:libinput
ref: 06e2f522a4ab5ea0a1de68cce1b5f9fff568ed4f
unpetrify-ref: 0.7.0
+ build-system: autotools
build-depends:
- mtdev
- libevdev
diff --git a/strata/qt5-tools.morph b/strata/qt5-tools.morph
index cb9c7c70..b0ac0ba3 100644
--- a/strata/qt5-tools.morph
+++ b/strata/qt5-tools.morph
@@ -138,5 +138,6 @@ chunks:
- name: qtwayland
repo: upstream:qt5/qtwayland
ref: baserock/genivi-5.4.0-wip
+ build-system: qmake
build-depends:
- qtbase