summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile15
1 files changed, 8 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 1bc6c6b..0ecb251 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
# Override the arch with `make ARCH=i386`
VERSION = 1.5
ARCH ?= $(shell flatpak --default-arch)
+REPO ?= repo
# Canned recipe for generating metadata
# $1 = the input file to substitute
@@ -23,12 +24,12 @@ PLATFORM_IMAGE=${IMAGEDIR}/freedesktop-contents-platform-${ARCH}-${HASH}.tar.gz
IMAGES= ${SDK_IMAGE} ${PLATFORM_IMAGE}
REF_PLATFORM=runtime/org.freedesktop.BasePlatform/${ARCH}/${VERSION}
REF_SDK=runtime/org.freedesktop.BaseSdk/${ARCH}/${VERSION}
-FILE_REF_PLATFORM=repo/refs/heads/${REF_PLATFORM}
-FILE_REF_SDK=repo/refs/heads/${REF_SDK}
+FILE_REF_PLATFORM=${REPO}/refs/heads/${REF_PLATFORM}
+FILE_REF_SDK=${REPO}/refs/heads/${REF_SDK}
all: ${FILE_REF_PLATFORM} ${FILE_REF_SDK}
-COMMIT_ARGS=--repo=repo --owner-uid=0 --owner-gid=0 --no-xattrs
+COMMIT_ARGS=--repo=${REPO} --owner-uid=0 --owner-gid=0 --no-xattrs
${IMAGES} allimages:
rm -f ${IMAGEDIR}/freedesktop-contents-*.tar.gz # Remove all old images to make space
@@ -42,23 +43,23 @@ ${IMAGES} allimages:
sdk: ${FILE_REF_SDK}
${FILE_REF_SDK}: metadata.sdk.in ${SDK_IMAGE}
- if [ ! -d repo ]; then ostree init --mode=archive-z2 --repo=repo; fi
+ if [ ! -d ${REPO} ]; then ostree init --mode=archive-z2 --repo=${REPO}; fi
rm -rf sdk
mkdir sdk
(cd sdk; tar --transform 's,^./usr,files,S' --transform 's,^./etc,files/etc,S' --exclude="./[!eu]*" -xvf ../${SDK_IMAGE} > /dev/null)
$(call subst-metadata,metadata.sdk.in,sdk/metadata)
ostree commit ${COMMIT_ARGS} ${GPG_ARGS} --branch=${REF_SDK} -s "build of ${HASH}" sdk
- ostree summary -u --repo=repo ${GPG_ARGS}
+ ostree summary -u --repo=${REPO} ${GPG_ARGS}
rm -rf sdk
platform: ${FILE_REF_PLATFORM}
${FILE_REF_PLATFORM}: metadata.platform.in ${PLATFORM_IMAGE}
- if [ ! -d repo ]; then ostree init --mode=archive-z2 --repo=repo; fi
+ if [ ! -d ${REPO} ]; then ostree init --mode=archive-z2 --repo=${REPO}; fi
rm -rf platform
mkdir platform
(cd platform; tar --transform 's,^./usr,files,S' --transform 's,^./etc,files/etc,S' --exclude="./[!eu]*" -xvf ../${PLATFORM_IMAGE} > /dev/null)
$(call subst-metadata,metadata.platform.in,platform/metadata)
ostree commit ${COMMIT_ARGS} ${GPG_ARGS} --branch=${REF_PLATFORM} -s "build of ${HASH}" platform
- ostree summary -u --repo=repo ${GPG_ARGS}
+ ostree summary -u --repo=${REPO} ${GPG_ARGS}
rm -rf platform