Makefile 4.82 KB
Newer Older
Alexander Larsson's avatar
Alexander Larsson committed
1
2
3
srcdir = $(CURDIR)
builddir = $(CURDIR)

4
VERSION=3.16
5
6
7
8
9
ARCH=x86_64
IMAGES=yocto-build/$(ARCH)/images
SPECS=packages/SPECS
NOARCH=packages/RPMS/noarch

10
all: gnome-platform.tar.gz gnome-sdk.tar.gz
11
12

$(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz images:
Alexander Larsson's avatar
Alexander Larsson committed
13
14
15
16
17
	if test ! -d gnome-continuous-yocto; then \
		git clone https://github.com/alexlarsson/gnome-continuous-yocto.git --branch gnomeostree-3.14-dizzy-platform;\
	fi
	(cd  gnome-continuous-yocto; git pull;)
	(cd  gnome-continuous-yocto; git submodule update --init;)
18
19
	mkdir -p yocto-build/$(ARCH)
	./gnome-sdk-build-yocto ${srcdir}/gnome-continuous-yocto ${builddir}/yocto-build/ $(ARCH)
Alexander Larsson's avatar
Alexander Larsson committed
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

NULL=

PACKAGES = \
	gnome-sdk-base \
	gtk-doc-stub \
	glib2 \
	gnome-common \
	gobject-introspection \
	shared-mime-info \
	pixman \
	freetype \
	fontconfig \
	xorg-x11-util-macros \
	xorg-x11-proto-devel \
	libXau xcb-proto libxcb libXdmcp xorg-x11-xtrans-devel libX11 libXrender \
	libXfixes libXext libXft libXi libXinerama libICE libSM libXpm libXrandr libXtst \
	libXv libXvMC libXxf86vm libXdamage libXcursor libXcomposite libxkbfile libxshmfence \
	dbus cairo dbus-glib \
Alexander Larsson's avatar
Alexander Larsson committed
39
	libpciaccess libdrm mesa libepoxy \
Alexander Larsson's avatar
Alexander Larsson committed
40
	pulseaudio \
Alexander Larsson's avatar
Alexander Larsson committed
41
42
	graphite2 harfbuzz libdatrie libthai pango atk at-spi2-core at-spi2-atk gdk-pixbuf2 gtk3 \
	itstool yelp-xsl yelp-tools \
Alexander Larsson's avatar
Alexander Larsson committed
43
	hicolor-icon-theme libcroco vala librsvg2 adwaita-icon-theme \
Alexander Larsson's avatar
Alexander Larsson committed
44
	gnome-sdk gnome-platform dejavu-fonts abattis-cantarell-fonts \
Alexander Larsson's avatar
Alexander Larsson committed
45
	gtk2 gnome-themes-standard libproxy gsettings-desktop-schemas glib-networking libsoup \
Alexander Larsson's avatar
Add gjs    
Alexander Larsson committed
46
	dconf gvfs desktop-file-utils json-glib libnotify vte mozjs24 gjs \
Alexander Larsson's avatar
Alexander Larsson committed
47
	cogl clutter clutter-gtk \
Alexander Larsson's avatar
Alexander Larsson committed
48
	zenity \
Alexander Larsson's avatar
Alexander Larsson committed
49
50
	$(NULL)

51
ALL_SPECS =$(PACKAGES:%=$(SPECS)/%.spec)
Alexander Larsson's avatar
Alexander Larsson committed
52
53
54

deps: rpm-dependencies.P

55
56
57
rpm-dependencies.P: $(ALL_SPECS) makedeps.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
	./setup.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
	./build.sh ./makedeps.sh $(ALL_SPECS) > rpm-dependencies.P
Alexander Larsson's avatar
Alexander Larsson committed
58

59
gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz: $(NOARCH)/gnome-sdk-0.1-1.noarch.rpm
60
61
	./setup.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
	./build.sh smart install -y  $(NOARCH)/gnome-sdk-0.1-1.noarch.rpm
62
63
	rm -rf gnome-sdk.tar.gz
	tar --transform 's,^root/usr,files,S' -czf gnome-sdk.tar.gz root/usr --owner=root
Alexander Larsson's avatar
Alexander Larsson committed
64
	tar --transform 's,^var,files,S' -czf gnome-sdk-rpmdb.tar.gz var/lib/rpm --owner=root
Alexander Larsson's avatar
Alexander Larsson committed
65

66
gnome-platform-base: $(NOARCH)/gnome-platform-base-0.1-1.noarch.rpm
67

68
69
$(NOARCH)/gnome-platform-base-0.1-1.noarch.rpm: $(SPECS)/gnome-platform-base.spec setup.sh build.sh $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
	-echo building gnome-platform-base.spec
70
71
	rm -rf packages/gnome-platform
	mkdir -p packages/gnome-platform
72
73
74
	tar -C packages/gnome-platform -xzf $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz
	./setup.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
	./build.sh rpmbuild -ba $(SPECS)/gnome-platform-base.spec
75

76
gnome-sdk-base: $(NOARCH)/gnome-sdk-base-0.1-1.noarch.rpm
77

Alexander Larsson's avatar
Alexander Larsson committed
78
gnome-platform-packages: $(NOARCH)/gnome-platform-0.1-1.noarch.rpm $(NOARCH)/gnome-platform-base-0.1-1.noarch.rpm setup.sh build.sh
79
	./setup.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
80
	rm -f gnome-platform-packages
81
	./build.sh ./list_packages.sh gnome-platform > gnome-platform-packages
82

83
gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz: gnome-platform-packages $(NOARCH)/gnome-platform-0.1-1.noarch.rpm setup.sh build.sh $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz
84
85
86
	-echo building gnome-platform
	./setup_root.sh $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz
	./build.sh rpm -Uvh `cat gnome-platform-packages`
87
	tar --transform 's,^root/usr,files,S' -czf gnome-platform.tar.gz root/usr --owner=root
Alexander Larsson's avatar
Alexander Larsson committed
88
	tar --transform 's,^var,files,S' -czf gnome-platform-rpmdb.tar.gz var/lib/rpm --owner=root
89
90
91
92
93

repository:
	ostree  init --mode=archive-z2 --repo=repository

#TODO: Add --owner-uid=0 --owner-gid=0
Alexander Larsson's avatar
Alexander Larsson committed
94
commit-platform: repository gnome-platform.tar.gz  gnome-platform-rpmdb.tar.gz
95
96
	rm -rf commit
	mkdir -p commit
Alexander Larsson's avatar
Alexander Larsson committed
97
	tar xf gnome-platform.tar.gz -C commit
98
	ostree commit --repo=repository --branch=runtime/org.gnome.Platform/$(ARCH)/$(VERSION) --disable-fsync --no-xattrs -s "commit" commit
Alexander Larsson's avatar
Alexander Larsson committed
99
100
101
	rm -rf commit
	mkdir -p commit
	tar xf gnome-platform-rpmdb.tar.gz -C commit
102
	ostree commit --repo=repository --branch=runtime/org.gnome.Platform.Var/$(ARCH)/$(VERSION) --disable-fsync --no-xattrs -s "commit" commit
103

Alexander Larsson's avatar
Alexander Larsson committed
104
commit-sdk: repository gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz
105
106
	rm -rf commit
	mkdir -p commit
Alexander Larsson's avatar
Alexander Larsson committed
107
	tar xf gnome-sdk.tar.gz -C commit
108
	ostree commit --repo=repository --branch=runtime/org.gnome.Sdk/$(ARCH)/$(VERSION) --disable-fsync --no-xattrs -s "commit" commit
Alexander Larsson's avatar
Alexander Larsson committed
109
110
111
	rm -rf commit
	mkdir -p commit
	tar xf gnome-sdk-rpmdb.tar.gz -C commit
112
	ostree commit --repo=repository --branch=runtime/org.gnome.Sdk.Var/$(ARCH)/$(VERSION) --disable-fsync --no-xattrs -s "commit" commit
113
114
115
116

commit: commit-sdk commit-platform


117

Alexander Larsson's avatar
Alexander Larsson committed
118
-include rpm-dependencies.P