Commit 7f68329a authored by Alexander Larsson's avatar Alexander Larsson
Browse files

Switch to the new yocto base

This is basically the same as the above, except some old leftovers
from gnome-continuous are removed and it is a pure layer.
It also bumps the yocto dependency to the latest 1.7 version, and
makes it very easy to bump it in the future.
parent 843ae789
......@@ -4,8 +4,7 @@ packages/SOURCES/*.tgz
packages/SOURCES/*.tar.gz
packages/SOURCES/*.tar.xz
packages/SOURCES/*.tar.bz2
gnome-continuous-yocto
yocto-build
freedesktop-sdk-base
root
var
packages/BUILD/
......@@ -25,4 +24,4 @@ gnome-sdk-rpmdb.tar.gz
gnome-platform.tar.gz
gnome-platform-rpmdb.tar.gz
gnome-platform-packages
*~
\ No newline at end of file
*~
......@@ -4,20 +4,18 @@ builddir = $(CURDIR)
FREEDESKTOP_VERSION=0.1
GNOME_VERSION=3.16
ARCH=x86_64
IMAGES=yocto-build/$(ARCH)/images
IMAGES=freedesktop-sdk-base/build/$(ARCH)/images
SPECS=packages/SPECS
NOARCH=packages/RPMS/noarch
all: gnome-platform.tar.gz gnome-sdk.tar.gz
$(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz images:
if test ! -d gnome-continuous-yocto; then \
git clone https://github.com/alexlarsson/gnome-continuous-yocto.git --branch gnomeostree-3.14-dizzy-platform;\
$(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz $(IMAGES)/freedesktop-contents-platform-$(ARCH).tar.gz images:
if test ! -d freedesktop-sdk-base; then \
git clone https://github.com/alexlarsson/freedesktop-sdk-base.git;\
fi
(cd gnome-continuous-yocto; git pull;)
(cd gnome-continuous-yocto; git submodule update --init;)
mkdir -p yocto-build/$(ARCH)
./gnome-sdk-build-yocto ${srcdir}/gnome-continuous-yocto ${builddir}/yocto-build/ $(ARCH)
(cd freedesktop-sdk-base; git pull;)
(cd freedesktop-sdk-base; make;)
NULL=
......@@ -59,19 +57,19 @@ ALL_SPECS =$(PACKAGES:%=$(SPECS)/%.spec)
deps: rpm-dependencies.P
rpm-dependencies.P: $(ALL_SPECS) makedeps.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
./setup.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
rpm-dependencies.P: $(ALL_SPECS) makedeps.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
./setup.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
./build.sh ./makedeps.sh $(ALL_SPECS) > rpm-dependencies.P
gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz: $(NOARCH)/gnome-sdk-0.1-1.sdk.noarch.rpm
./setup.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
./setup.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
./build.sh smart install -y $(NOARCH)/gnome-sdk-0.1-1.sdk.noarch.rpm
rm -rf gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz
tar --transform 's,^root/usr,files,S' -czf gnome-sdk.tar.gz root/usr --owner=root
tar --transform 's,^var,files,S' -czf gnome-sdk-rpmdb.tar.gz var/lib/rpm --owner=root
freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz: $(NOARCH)/freedesktop-sdk-0.1-1.sdk.noarch.rpm
./setup.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
./setup.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
./build.sh smart install -y $(NOARCH)/freedesktop-sdk-0.1-1.sdk.noarch.rpm
rm -rf freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz
tar --transform 's,^root/usr,files,S' -czf freedesktop-sdk.tar.gz root/usr --owner=root
......@@ -79,36 +77,36 @@ freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz: $(NOARCH)/freedesktop-sdk-0
freedesktop-platform-base: $(NOARCH)/freedesktop-platform-base-0.1-1.sdk.noarch.rpm
$(NOARCH)/freedesktop-platform-base-0.1-1.sdk.noarch.rpm: $(SPECS)/freedesktop-platform-base.spec setup.sh build.sh $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
$(NOARCH)/freedesktop-platform-base-0.1-1.sdk.noarch.rpm: $(SPECS)/freedesktop-platform-base.spec setup.sh build.sh $(IMAGES)/freedesktop-contents-platform-$(ARCH).tar.gz $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
-echo building freedesktop-platform-base.spec
rm -rf packages/freedesktop-platform
mkdir -p packages/freedesktop-platform
tar -C packages/freedesktop-platform -xzf $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz
./setup.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
tar -C packages/freedesktop-platform -xzf $(IMAGES)/freedesktop-contents-platform-$(ARCH).tar.gz
./setup.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
./build.sh rpmbuild -ba $(SPECS)/freedesktop-platform-base.spec
freedesktop-sdk-base: $(NOARCH)/freedesktop-sdk-base-0.1-1.sdk.noarch.rpm
freedesktop-platform-packages: $(NOARCH)/freedesktop-platform-0.1-1.sdk.noarch.rpm $(NOARCH)/freedesktop-platform-base-0.1-1.sdk.noarch.rpm setup.sh build.sh
./setup.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
./setup.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
rm -f freedesktop-platform-packages
./build.sh ./list_packages.sh freedesktop-platform > freedesktop-platform-packages
freedesktop-platform.tar.gz freedesktop-platform-rpmdb.tar.gz: freedesktop-platform-packages $(NOARCH)/freedesktop-platform-0.1-1.sdk.noarch.rpm setup.sh build.sh $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz
freedesktop-platform.tar.gz freedesktop-platform-rpmdb.tar.gz: freedesktop-platform-packages $(NOARCH)/freedesktop-platform-0.1-1.sdk.noarch.rpm setup.sh build.sh $(IMAGES)/freedesktop-contents-platform-$(ARCH).tar.gz
-echo building freedesktop-platform
./setup_root.sh $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz
./setup_root.sh $(IMAGES)/freedesktop-contents-platform-$(ARCH).tar.gz
./build.sh rpm -Uvh `cat freedesktop-platform-packages`
tar --transform 's,^root/usr,files,S' -czf freedesktop-platform.tar.gz root/usr --owner=root
tar --transform 's,^var,files,S' -czf freedesktop-platform-rpmdb.tar.gz var/lib/rpm --owner=root
gnome-platform-packages: $(NOARCH)/gnome-platform-0.1-1.sdk.noarch.rpm $(NOARCH)/freedesktop-platform-base-0.1-1.sdk.noarch.rpm setup.sh build.sh
./setup.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
./setup.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
rm -f gnome-platform-packages
./build.sh ./list_packages.sh gnome-platform > gnome-platform-packages
gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz: gnome-platform-packages $(NOARCH)/gnome-platform-0.1-1.sdk.noarch.rpm setup.sh build.sh $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz
gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz: gnome-platform-packages $(NOARCH)/gnome-platform-0.1-1.sdk.noarch.rpm setup.sh build.sh $(IMAGES)/freedesktop-contents-platform-$(ARCH).tar.gz
-echo building gnome-platform
./setup_root.sh $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz
./setup_root.sh $(IMAGES)/freedesktop-contents-platform-$(ARCH).tar.gz
./build.sh rpm -Uvh `cat gnome-platform-packages`
tar --transform 's,^root/usr,files,S' -czf gnome-platform.tar.gz root/usr --owner=root
tar --transform 's,^var,files,S' -czf gnome-platform-rpmdb.tar.gz var/lib/rpm --owner=root
......
#!/bin/bash
# Copyright (C) 2012 Colin Walters <walters@verbum.org>
# Copyright (C) 2012 Adrian Perez <aperez@igalia.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
set -e
umask 022
die () {
echo "$*" 1>&2
exit 1
}
usage () {
echo "$0: SRCDIR WORKDIR ARCHITECTURE"
}
srcdir=$1
test -n "${srcdir}" || (usage; exit 1)
workdir=$2
test -n "${workdir}" || (usage; exit 1)
architecture=$3
test -n "${architecture}" || (usage; exit 1)
. "${srcdir}/oe-init-build-env" "${workdir}/${architecture}"
LAYERNAMES=$(cat ${srcdir}/LAYERS)
LAYERS=""
for layername in ${LAYERNAMES}; do
LAYERS="${LAYERS} \${OSTREE_SRCDIR}/${layername}"
done
SSTATE_DIR="${workdir}/sstate-cache"
DL_DIR="${workdir}/downloads"
cat > ${workdir}/${architecture}/conf/bblayers.conf <<EOF
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "6"
BBPATH = "\${TOPDIR}"
BBFILES ?= ""
OSTREE_SRCDIR = "${srcdir}"
BBLAYERS ?= "${LAYERS}"
EOF
case "$architecture" in
i686) MACHINE="atom-pc";;
x86_64) MACHINE="qemux86-64";;
*) echo "Error: Unhandled architecture '$architecture'"; exit 1;;
esac
mkdir -p ${workdir}/${architecture}/conf
localconf=${workdir}/${architecture}/conf/local.conf
if ! grep -q "DISTRO.*gnomeostree" ${localconf}; then
numcpus=$(( $(getconf _NPROCESSORS_ONLN) / 2 + 1 ))
cat > ${localconf}.tmp <<EOF
PARALLEL_MAKE = "-j ${numcpus}"
BB_NUMBER_THREADS = "${numcpus}"
LAYER_CONF_VERSION = "6"
CONF_VERSION = "1"
MACHINE = "${MACHINE}"
DISTRO = "gnomeostreedistro"
USER_CLASSES = ""
PACKAGE_CLASSES = "package_rpm"
PATCHRESOLVE = "noop"
SSTATE_DIR = "${SSTATE_DIR}"
DL_DIR = "${DL_DIR}"
INHERIT += "rm_work"
PREFERRED_VERSION_rpm = "4.11.2"
PREFERRED_VERSION_rpm-native = "4.11.2"
RPMROOTFSDEPENDS_remove = "rpmresolve-native:do_populate_sysroot"
RDEPENDS_python3-modules_remove = "python3-2to3"
EOF
mv ${localconf}.tmp ${localconf}
fi
IMAGEDIR=${workdir}/${architecture}/images
mkdir -p "${IMAGEDIR}"
bitbake gnomeos-contents-{sdk,platform}
for basetype in sdk platform; do
ln -sf ${workdir}/${architecture}/tmp-glibc/deploy/images/${MACHINE}/gnomeos-contents-${basetype}-${MACHINE}.tar.gz images/gnomeos-contents-${basetype}-${architecture}.tar.gz
done
......@@ -27,9 +27,9 @@ for spec in $SPECS; do
for br in $BUILDREQS; do
BRS="$BRS `cat /tmp/dep/${br}.pkg`"
done
echo "$PACKAGES: $spec $BRS setup.sh build.sh yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz $SPEC_SOURCES"
echo "$PACKAGES: $spec $BRS setup.sh build.sh freedesktop-sdk-base/build/x86_64/images/freedesktop-contents-sdk-x86_64.tar.gz $SPEC_SOURCES"
echo " -echo Building $spec"
echo " ./setup.sh yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz"
echo " ./setup.sh freedesktop-sdk-base/build/x86_64/images/freedesktop-contents-sdk-x86_64.tar.gz"
if [ "x${BRS}" != "x" ]; then
echo " ./build.sh smart install -y $BRS"
fi
......@@ -39,7 +39,7 @@ for spec in $SPECS; do
echo
echo "only-`basename ${spec} .spec`: "
echo " -echo Building only $spec"
echo " ./setup.sh yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz"
echo " ./setup.sh freedesktop-sdk-base/build/x86_64/images/freedesktop-contents-sdk-x86_64.tar.gz"
if [ "x${BRS}" != "x" ]; then
echo " ./build.sh smart install -y $BRS"
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment