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

4
FREEDESKTOP_VERSION=1.0
5
GNOME_VERSION=3.16
6
ARCH=x86_64
7
IMAGEDIR=freedesktop-sdk-base/images/$(ARCH)
8
9
SPECS=packages/SPECS
NOARCH=packages/RPMS/noarch
Alexander Larsson's avatar
Alexander Larsson committed
10
BASE_HASH=8e44c998adbf1546c45cf733c688fed74e8ddc89
11
12
13
14
EXTRA_NAME=
DELTAS=
GPG_KEY=
GPG_HOME=
15

16
all: gnome-platform.tar.gz gnome-sdk.tar.gz
17

18
19
SDK_BASE_IMAGE=$(IMAGEDIR)/freedesktop-contents-sdk-$(ARCH)-$(BASE_HASH).tar.gz
PLATFORM_BASE_IMAGE=$(IMAGEDIR)/freedesktop-contents-platform-$(ARCH)-$(BASE_HASH).tar.gz
20

21
$(SDK_BASE_IMAGE) $(PLATFORM_BASE_IMAGE) images:
22
	if test ! -d freedesktop-sdk-base; then \
23
		git clone git://git.gnome.org/freedesktop-sdk-base;\
Alexander Larsson's avatar
Alexander Larsson committed
24
	fi
25
26
27
28
	(cd  freedesktop-sdk-base && \
	 git fetch origin && \
	 git checkout $(BASE_HASH) && \
	 make)
Alexander Larsson's avatar
Alexander Larsson committed
29
30
31
32

NULL=

PACKAGES = \
Alexander Larsson's avatar
Alexander Larsson committed
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
	freedesktop-platform-base \
	freedesktop-sdk-base \
	freedesktop-platform \
	freedesktop-sdk \
	gnome-platform \
	gnome-sdk \
	\
	SDL2 \
	SDL2_image \
	SDL2_mixer \
	SDL2_net \
	SDL2_ttf \
	abattis-cantarell-fonts \
	adwaita-icon-theme \
	aspell \
	at-spi2-atk \
	at-spi2-core \
	atk \
	cairo \
	clutter \
	clutter-gtk \
	cogl \
	dbus \
	dbus-glib \
	dconf \
	dejavu-fonts \
	desktop-file-utils \
	enchant \
	fontconfig \
	freetype \
	gdk-pixbuf2 \
	gjs \
	glib-networking \
Alexander Larsson's avatar
Alexander Larsson committed
66
67
	glib2 \
	gnome-common \
Alexander Larsson's avatar
Alexander Larsson committed
68
69
	gnome-themes-standard \
	gnu-free-fonts \
Alexander Larsson's avatar
Alexander Larsson committed
70
	gobject-introspection \
Alexander Larsson's avatar
Alexander Larsson committed
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
	google-crosextra-caladea-fonts \
	google-crosextra-carlito-fonts \
	graphite2 \
	gsettings-desktop-schemas \
	gstreamer1 \
	gstreamer1-plugins-base \
	gtk-doc-stub \
	gtk2 \
	gtk3 \
	gvfs \
	harfbuzz \
	hicolor-icon-theme \
	hunspell-en hunspell \
	itstool \
	json-glib \
	libICE \
	libSM \
	libX11 \
	libXScrnSaver \
	libXau \
	libXcomposite \
	libXcursor \
	libXdamage \
	libXdmcp \
	libXext \
	libXfixes \
	libXft \
	libXi \
	libXinerama \
	libXpm \
	libXrandr \
	libXrender \
	libXt \
	libXtst \
	libXv \
	libXvMC \
	libXxf86vm \
	libappstream-glib \
	libcroco \
	libdatrie \
	libdrm \
	libepoxy \
	liberation-fonts \
	libnotify \
	libpciaccess \
	libproxy \
	librsvg2 \
	libsecret \
	libsoup \
	libthai \
	libxcb \
	libxkbcommon \
	libxkbfile \
	libxshmfence \
	llvm \
	mesa \
	mozjs24 \
	orc \
	pango \
Alexander Larsson's avatar
Alexander Larsson committed
130
	pixman \
Alexander Larsson's avatar
Alexander Larsson committed
131
	pulseaudio \
Alexander Larsson's avatar
Alexander Larsson committed
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
	pygobject3 \
	python3-cairo \
	shared-mime-info \
	vala \
	vte \
	wayland \
	webkitgtk4 \
	xcb-proto \
	xkeyboard-config \
	xorg-x11-proto-devel \
	xorg-x11-util-macros \
	xorg-x11-xtrans-devel \
	yelp-tools \
	yelp-xsl \
	zenity \
Alexander Larsson's avatar
Alexander Larsson committed
147
148
	$(NULL)

149
ALL_SPECS =$(PACKAGES:%=$(SPECS)/%.spec)
Alexander Larsson's avatar
Alexander Larsson committed
150
151
152

deps: rpm-dependencies.P

153
154
rpm-dependencies.P: $(ALL_SPECS) makedeps.sh $(SDK_BASE_IMAGE)
	./setup.sh $(SDK_BASE_IMAGE)
155
	./build.sh ./makedeps.sh $(ALL_SPECS) > rpm-dependencies.P
156
	./clear_root.sh
Alexander Larsson's avatar
Alexander Larsson committed
157

Alexander Larsson's avatar
Alexander Larsson committed
158
gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz: $(NOARCH)/gnome-sdk-0.1-1.sdk.noarch.rpm
159
	./setup.sh $(SDK_BASE_IMAGE)
Alexander Larsson's avatar
Alexander Larsson committed
160
	./build.sh smart install -y  $(NOARCH)/gnome-sdk-0.1-1.sdk.noarch.rpm
161
	rm -rf gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz
162
163
	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
164
	./clear_root.sh
Alexander Larsson's avatar
Alexander Larsson committed
165

166
freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz: $(NOARCH)/freedesktop-sdk-0.1-1.sdk.noarch.rpm
167
	./setup.sh $(SDK_BASE_IMAGE)
168
169
	./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
170
171
	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
172
	./clear_root.sh
173

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

176
$(NOARCH)/freedesktop-platform-base-0.1-1.sdk.noarch.rpm: $(SPECS)/freedesktop-platform-base.spec setup.sh build.sh $(PLATFORM_BASE_IMAGE) $(SDK_BASE_IMAGE)
177
178
179
	-echo building freedesktop-platform-base.spec
	rm -rf packages/freedesktop-platform
	mkdir -p packages/freedesktop-platform
180
181
	tar -C packages/freedesktop-platform -xzf $(PLATFORM_BASE_IMAGE)
	./setup.sh $(SDK_BASE_IMAGE)
182
	./build.sh rpmbuild -ba $(SPECS)/freedesktop-platform-base.spec
183
	./clear_root.sh
184

185
freedesktop-sdk-base: $(NOARCH)/freedesktop-sdk-base-0.1-1.sdk.noarch.rpm
186

187
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
188
	./setup.sh $(SDK_BASE_IMAGE)
189
190
	rm -f freedesktop-platform-packages
	./build.sh ./list_packages.sh freedesktop-platform > freedesktop-platform-packages
191
	./clear_root.sh
192

193
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 $(PLATFORM_BASE_IMAGE)
194
	-echo building freedesktop-platform
195
	./setup_root.sh $(PLATFORM_BASE_IMAGE)
196
	./build.sh rpm -Uvh `cat freedesktop-platform-packages`
197
198
	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
199
	./clear_root.sh
200

201
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
202
	./setup.sh $(SDK_BASE_IMAGE)
203
	rm -f gnome-platform-packages
204
	./build.sh ./list_packages.sh gnome-platform > gnome-platform-packages
205
	./clear_root.sh
206

207
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 $(PLATFORM_BASE_IMAGE)
208
	-echo building gnome-platform
209
	./setup_root.sh $(PLATFORM_BASE_IMAGE)
210
	./build.sh rpm -Uvh `cat gnome-platform-packages`
211
212
	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
213
	./clear_root.sh
214

Alexander Larsson's avatar
Alexander Larsson committed
215
repo:
216
	ostree  init --mode=archive-z2 --repo=repo
217

218
219
commit-freedesktop-platform: repo freedesktop-platform.tar.gz  freedesktop-platform-rpmdb.tar.gz
	./commit.sh repo freedesktop-platform.tar.gz freedesktop-platform-rpmdb.tar.gz metadata.freedesktop-platform org.freedesktop.Platform$(EXTRA_NAME) $(ARCH) $(FREEDESKTOP_VERSION)
220

221
222
commit-freedesktop-sdk: repo freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz
	./commit.sh repo freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz metadata.freedesktop-sdk org.freedesktop.Sdk$(EXTRA_NAME) $(ARCH) $(FREEDESKTOP_VERSION)
223

224
225
commit-platform: repo gnome-platform.tar.gz  gnome-platform-rpmdb.tar.gz
	./commit.sh repo gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz metadata.platform org.gnome.Platform$(EXTRA_NAME) $(ARCH) $(GNOME_VERSION)
226

227
228
commit-sdk: repo gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz
	./commit.sh repo gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz metadata.sdk org.gnome.Sdk$(EXTRA_NAME) $(ARCH) $(GNOME_VERSION)
229

230
commit-gnome: commit-sdk commit-platform
Alexander Larsson's avatar
Alexander Larsson committed
231
	echo done
232

233
234
235
236
237
238
commit-freedesktop: commit-freedesktop-sdk commit-freedesktop-platform
	echo done

commit: commit-gnome commit-freedesktop
	echo done

239
240
241
242
243
untag:
	./untag.sh repo org.freedesktop.Platform $(ARCH) $(FREEDESKTOP_VERSION) $(EXTRA_NAME)
	./untag.sh repo org.freedesktop.Sdk $(ARCH) $(FREEDESKTOP_VERSION) $(EXTRA_NAME)
	./untag.sh repo org.gnome.Platform $(ARCH) $(GNOME_VERSION) $(EXTRA_NAME)
	./untag.sh repo org.gnome.Sdk $(ARCH) $(GNOME_VERSION) $(EXTRA_NAME)
244

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