blob: 0450faf9aeb48ff609e8f7ccd1701565623d0368 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# Override the arch with `make ARCH=i386`
ARCH ?= $(shell xdg-app --default-arch)
# SDK Versions setup here
#
# SDK_BRANCH: The version (branch) of runtime and sdk to produce
# SDK_RUNTIME_VERSION: The org.freedesktop.BaseSdk and platform version to build against
#
SDK_BRANCH=1.5
SDK_RUNTIME_VERSION=1.4
# Canned recipe for generating metadata
SUBST_FILES=org.freedesktop.Sdk.json metadata.sdk metadata.platform
define subst-metadata
@echo -n "Generating files: ${SUBST_FILES}... ";
@for file in ${SUBST_FILES}; do \
file_source=$${file}.in; \
sed -e 's/@@SDK_ARCH@@/${ARCH}/g' \
-e 's/@@SDK_BRANCH@@/${SDK_BRANCH}/g' \
-e 's/@@SDK_RUNTIME_VERSION@@/${SDK_RUNTIME_VERSION}/g' \
$$file_source > $$file.tmp && mv $$file.tmp $$file || exit 1; \
done
@echo "Done.";
endef
all: repo $(patsubst %,%.in,$(SUBST_FILES))
$(call subst-metadata)
flatpak-builder --force-clean --ccache --require-changes --repo=repo --arch=${ARCH} \
--subject="build of org.freedesktop.Sdk, `date`" \
${EXPORT_ARGS} sdk org.freedesktop.Sdk.json
rm -rf sdk
repo:
ostree init --mode=archive-z2 --repo=repo
|