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

4
5
FREEDESKTOP_VERSION=0.1
GNOME_VERSION=3.16
6
ARCH=x86_64
7
IMAGES=freedesktop-sdk-base/build/$(ARCH)/images
8
9
10
SPECS=packages/SPECS
NOARCH=packages/RPMS/noarch

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

13
14
15
$(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;\
Alexander Larsson's avatar
Alexander Larsson committed
16
	fi
17
18
	(cd  freedesktop-sdk-base; git pull;)
	(cd  freedesktop-sdk-base; make;)
Alexander Larsson's avatar
Alexander Larsson committed
19
20
21
22

NULL=

PACKAGES = \
23
	freedesktop-platform-base freedesktop-sdk-base \
Alexander Larsson's avatar
Alexander Larsson committed
24
25
26
27
28
29
30
31
32
33
34
	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 \
35
	libXfixes libXext libXft libXi libXinerama libICE libSM libXpm libXrandr libXtst libXt libXScrnSaver \
Alexander Larsson's avatar
Alexander Larsson committed
36
	libXv libXvMC libXxf86vm libXdamage libXcursor libXcomposite libxkbfile libxshmfence \
Alexander Larsson's avatar
Alexander Larsson committed
37
	xkeyboard-config libxkbcommon \
38
	SDL2 SDL2_image SDL2_net SDL2_ttf SDL2_mixer \
Alexander Larsson's avatar
Alexander Larsson committed
39
	dbus cairo dbus-glib \
40
	libpciaccess libdrm llvm mesa libepoxy wayland \
Alexander Larsson's avatar
Alexander Larsson committed
41
	pulseaudio \
42
	freedesktop-platform freedesktop-sdk \
Alexander Larsson's avatar
Alexander Larsson committed
43
	graphite2 harfbuzz libdatrie libthai pango atk at-spi2-core at-spi2-atk gdk-pixbuf2 gtk3 \
44
	libsecret \
Alexander Larsson's avatar
Alexander Larsson committed
45
	itstool yelp-xsl yelp-tools \
Alexander Larsson's avatar
Alexander Larsson committed
46
	hicolor-icon-theme libcroco vala librsvg2 adwaita-icon-theme \
47
	gnome-sdk gnome-platform dejavu-fonts abattis-cantarell-fonts liberation-fonts gnu-free-fonts google-crosextra-caladea-fonts google-crosextra-carlito-fonts \
Alexander Larsson's avatar
Alexander Larsson committed
48
	gtk2 gnome-themes-standard libproxy gsettings-desktop-schemas glib-networking libsoup \
Alexander Larsson's avatar
Add gjs    
Alexander Larsson committed
49
	dconf gvfs desktop-file-utils json-glib libnotify vte mozjs24 gjs \
50
	gstreamer1 python3-cairo pygobject3 \
Alexander Larsson's avatar
Alexander Larsson committed
51
	cogl clutter clutter-gtk webkitgtk4 \
52
	aspell hunspell-en hunspell enchant \
53
	zenity libappstream-glib \
Alexander Larsson's avatar
Alexander Larsson committed
54
55
	$(NULL)

56
ALL_SPECS =$(PACKAGES:%=$(SPECS)/%.spec)
Alexander Larsson's avatar
Alexander Larsson committed
57
58
59

deps: rpm-dependencies.P

60
61
rpm-dependencies.P: $(ALL_SPECS) makedeps.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
	./setup.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
62
	./build.sh ./makedeps.sh $(ALL_SPECS) > rpm-dependencies.P
63
	./clear_root.sh
Alexander Larsson's avatar
Alexander Larsson committed
64

Alexander Larsson's avatar
Alexander Larsson committed
65
gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz: $(NOARCH)/gnome-sdk-0.1-1.sdk.noarch.rpm
66
	./setup.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
Alexander Larsson's avatar
Alexander Larsson committed
67
	./build.sh smart install -y  $(NOARCH)/gnome-sdk-0.1-1.sdk.noarch.rpm
68
	rm -rf gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz
69
70
	tar --transform 's,^build/root/usr,files,S' -czf gnome-sdk.tar.gz build/root/usr --owner=root
	tar --transform 's,^build/var,files,S' -czf gnome-sdk-rpmdb.tar.gz build/var/lib/rpm --owner=root
71
	./clear_root.sh
Alexander Larsson's avatar
Alexander Larsson committed
72

73
freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz: $(NOARCH)/freedesktop-sdk-0.1-1.sdk.noarch.rpm
74
	./setup.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
75
76
	./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
77
78
	tar --transform 's,^build/root/usr,files,S' -czf freedesktop-sdk.tar.gz build/root/usr --owner=root
	tar --transform 's,^build/var,files,S' -czf freedesktop-sdk-rpmdb.tar.gz build/var/lib/rpm --owner=root
79
	./clear_root.sh
80

81
freedesktop-platform-base: $(NOARCH)/freedesktop-platform-base-0.1-1.sdk.noarch.rpm
82

83
$(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
84
85
86
	-echo building freedesktop-platform-base.spec
	rm -rf packages/freedesktop-platform
	mkdir -p packages/freedesktop-platform
87
88
	tar -C packages/freedesktop-platform -xzf $(IMAGES)/freedesktop-contents-platform-$(ARCH).tar.gz
	./setup.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
89
	./build.sh rpmbuild -ba $(SPECS)/freedesktop-platform-base.spec
90
	./clear_root.sh
91

92
freedesktop-sdk-base: $(NOARCH)/freedesktop-sdk-base-0.1-1.sdk.noarch.rpm
93

94
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
95
	./setup.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
96
97
	rm -f freedesktop-platform-packages
	./build.sh ./list_packages.sh freedesktop-platform > freedesktop-platform-packages
98
	./clear_root.sh
99

100
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
101
	-echo building freedesktop-platform
102
	./setup_root.sh $(IMAGES)/freedesktop-contents-platform-$(ARCH).tar.gz
103
	./build.sh rpm -Uvh `cat freedesktop-platform-packages`
104
105
	tar --transform 's,^build/root/usr,files,S' -czf freedesktop-platform.tar.gz build/root/usr --owner=root
	tar --transform 's,^build/var,files,S' -czf freedesktop-platform-rpmdb.tar.gz build/var/lib/rpm --owner=root
106
	./clear_root.sh
107

108
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
109
	./setup.sh $(IMAGES)/freedesktop-contents-sdk-$(ARCH).tar.gz
110
	rm -f gnome-platform-packages
111
	./build.sh ./list_packages.sh gnome-platform > gnome-platform-packages
112
	./clear_root.sh
113

114
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
115
	-echo building gnome-platform
116
	./setup_root.sh $(IMAGES)/freedesktop-contents-platform-$(ARCH).tar.gz
117
	./build.sh rpm -Uvh `cat gnome-platform-packages`
118
119
	tar --transform 's,^build/root/usr,files,S' -czf gnome-platform.tar.gz build/root/usr --owner=root
	tar --transform 's,^build/var,files,S' -czf gnome-platform-rpmdb.tar.gz build/var/lib/rpm --owner=root
120
	./clear_root.sh
121
122
123
124

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

125
126
127
128
129
130
commit-freedesktop-platform: repository freedesktop-platform.tar.gz  freedesktop-platform-rpmdb.tar.gz
	./commit.sh repository freedesktop-platform.tar.gz freedesktop-platform-rpmdb.tar.gz metadata.freedesktop-platform org.freedesktop.Platform $(ARCH) $(FREEDESKTOP_VERSION)

commit-freedesktop-sdk: repository freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz
	./commit.sh repository freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz metadata.freedesktop-sdk org.freedesktop.Sdk $(ARCH) $(FREEDESKTOP_VERSION)

Alexander Larsson's avatar
Alexander Larsson committed
131
commit-platform: repository gnome-platform.tar.gz  gnome-platform-rpmdb.tar.gz
132
	./commit.sh repository gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz metadata.platform org.gnome.Platform $(ARCH) $(GNOME_VERSION)
133

Alexander Larsson's avatar
Alexander Larsson committed
134
commit-sdk: repository gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz
135
	./commit.sh repository gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz metadata.sdk org.gnome.Sdk $(ARCH) $(GNOME_VERSION)
136

137
commit-gnome: commit-sdk commit-platform
Alexander Larsson's avatar
Alexander Larsson committed
138
	echo done
139

140
141
142
143
144
145
commit-freedesktop: commit-freedesktop-sdk commit-freedesktop-platform
	echo done

commit: commit-gnome commit-freedesktop
	echo done

146
147
148
149
release/repo:
	ostree  init --mode=archive-z2 --repo=release/repo

release-commit-freedesktop-platform: release/repo freedesktop-platform.tar.gz  freedesktop-platform-rpmdb.tar.gz
150
151
	./commit.sh release/repo freedesktop-platform.tar.gz freedesktop-platform-rpmdb.tar.gz metadata.freedesktop-platform org.freedesktop.Platform $(ARCH) $(FREEDESKTOP_VERSION)

152
release-commit-freedesktop-sdk: release/repo freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz
153
154
	./commit.sh release/repo freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz metadata.freedesktop-sdk org.freedesktop.Sdk $(ARCH) $(FREEDESKTOP_VERSION)

Alexander Larsson's avatar
Alexander Larsson committed
155
release-commit-platform: release/repo gnome-platform.tar.gz  gnome-platform-rpmdb.tar.gz
156
	./commit.sh release/repo gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz metadata.platform org.gnome.Platform $(ARCH) $(GNOME_VERSION)
Alexander Larsson's avatar
Alexander Larsson committed
157
158

release-commit-sdk: release/repo gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz
159
160
161
162
	./commit.sh release/repo gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz metadata.sdk org.gnome.Sdk $(ARCH) $(GNOME_VERSION)

release-commit-gnome: release-commit-sdk release-commit-platform
	echo done
163

164
165
release-commit-freedesktop: release-commit-freedesktop-sdk release-commit-freedesktop-platform
	echo done
Alexander Larsson's avatar
Alexander Larsson committed
166

167
release-commit: release-commit-gnome release-commit-freedesktop
168
	echo done
169

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