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

4
VERSION=3.14
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
41
	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
42
	hicolor-icon-theme libcroco vala librsvg2 adwaita-icon-theme \
Alexander Larsson's avatar
Alexander Larsson committed
43
	gnome-sdk gnome-platform dejavu-fonts abattis-cantarell-fonts \
Alexander Larsson's avatar
Alexander Larsson committed
44
	gtk2 gnome-themes-standard libproxy gsettings-desktop-schemas glib-networking libsoup \
Alexander Larsson's avatar
Add gjs    
Alexander Larsson committed
45
	dconf gvfs desktop-file-utils json-glib libnotify vte mozjs24 gjs \
Alexander Larsson's avatar
Alexander Larsson committed
46
	cogl clutter clutter-gtk \
Alexander Larsson's avatar
Alexander Larsson committed
47
	zenity \
Alexander Larsson's avatar
Alexander Larsson committed
48
49
	$(NULL)

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

deps: rpm-dependencies.P

54
55
56
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
57

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

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

67
68
$(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
69
70
	rm -rf packages/gnome-platform
	mkdir -p packages/gnome-platform
71
72
73
	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
74

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

77
78
gnome-platform-packages: $(NOARCH)/gnome-platform-0.1-1.noarch.rpm setup.sh build.sh
	./setup.sh $(IMAGES)/gnomeos-contents-sdk-$(ARCH).tar.gz
79
	rm -f gnome-platform-packages
80
	./build.sh ./list_packages.sh gnome-platform > gnome-platform-packages
81

82
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
83
84
85
	-echo building gnome-platform
	./setup_root.sh $(IMAGES)/gnomeos-contents-platform-$(ARCH).tar.gz
	./build.sh rpm -Uvh `cat gnome-platform-packages`
86
	tar --transform 's,^root/usr,files,S' -czf gnome-platform.tar.gz root/usr --owner=root
Alexander Larsson's avatar
Alexander Larsson committed
87
	tar --transform 's,^var,files,S' -czf gnome-platform-rpmdb.tar.gz var/lib/rpm --owner=root
88
89
90
91
92

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

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

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

commit: commit-sdk commit-platform


116

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