summaryrefslogtreecommitdiff
path: root/strata
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2016-03-02 14:56:59 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2016-03-03 21:55:11 +0900
commit49780e89d11226c485a39ce5be75aea6fd4261eb (patch)
tree0d25ec8ecdbbff429b15c8203f8f33da3ede0e9f /strata
parent272a2183a35b0fce70ca94304598387fd5d71afb (diff)
downloaddefinitions-49780e89d11226c485a39ce5be75aea6fd4261eb.tar.gz
Adding linux-api-headers to build-essential
Diffstat (limited to 'strata')
-rw-r--r--strata/build-essential.morph7
-rw-r--r--strata/build-essential/linux-api-headers.morph24
2 files changed, 31 insertions, 0 deletions
diff --git a/strata/build-essential.morph b/strata/build-essential.morph
index f2d11c16..b9e16475 100644
--- a/strata/build-essential.morph
+++ b/strata/build-essential.morph
@@ -23,3 +23,10 @@ chunks:
ref: c949e6f8ed33f31bd46c1626dc6c5828a1750e56
unpetrify-ref: sed-4.2.2
build-mode: prelibc
+
+- name: linux-api-headers
+ morph: strata/build-essential/linux-api-headers.morph
+ repo: upstream:linux
+ ref: 39a8804455fb23f09157341d3ba7db6d7ae6ee76
+ unpetrify-ref: v4.0
+ build-mode: prelibc
diff --git a/strata/build-essential/linux-api-headers.morph b/strata/build-essential/linux-api-headers.morph
new file mode 100644
index 00000000..62aa22b8
--- /dev/null
+++ b/strata/build-essential/linux-api-headers.morph
@@ -0,0 +1,24 @@
+name: linux-api-headers
+kind: chunk
+install-commands:
+- |
+ case "$MORPH_ARCH" in
+ armv5l)
+ ARCH="arm" ;;
+ armv7b|armv7l|armv7lhf)
+ ARCH="arm" ;;
+ armv8l64|armv8b64)
+ ARCH="arm64" ;;
+ x86_32)
+ ARCH="i386" ;;
+ x86_64)
+ ARCH="x86_64" ;;
+ ppc64)
+ ARCH="powerpc" ;;
+ *)
+ echo "Error: unsupported Morph architecture: $MORPH_ARCH" >&2
+ exit 1
+ esac
+ ARCH=$ARCH make INSTALL_HDR_PATH=dest headers_install
+- install -d "$DESTDIR${PREFIX-/usr}/include"
+- cp -r dest/include/* "$DESTDIR/${PREFIX-/usr}/include"