Makefile 9.3 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
10
BASE_HASH=7c8b7a164472f67b5ed69802e3119bc1804127aa
Alexander Larsson's avatar
Alexander Larsson committed
11

12
13
14
15
EXTRA_NAME=
DELTAS=
GPG_KEY=
GPG_HOME=
16

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

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

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

NULL=

PACKAGES = \
Alexander Larsson's avatar
Alexander Larsson committed
34
35
36
37
	freedesktop-platform-base \
	freedesktop-sdk-base \
	freedesktop-platform \
	freedesktop-sdk \
Alexander Larsson's avatar
Alexander Larsson committed
38
	freedesktop-debug \
Alexander Larsson's avatar
Alexander Larsson committed
39
40
	gnome-platform \
	gnome-sdk \
Alexander Larsson's avatar
Alexander Larsson committed
41
	gnome-debug \
Alexander Larsson's avatar
Alexander Larsson committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
	\
	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
69
70
	glib2 \
	gnome-common \
Alexander Larsson's avatar
Alexander Larsson committed
71
72
	gnome-themes-standard \
	gnu-free-fonts \
Alexander Larsson's avatar
Alexander Larsson committed
73
	gobject-introspection \
Alexander Larsson's avatar
Alexander Larsson committed
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
130
131
132
	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
133
	pixman \
Alexander Larsson's avatar
Alexander Larsson committed
134
	pulseaudio \
Alexander Larsson's avatar
Alexander Larsson committed
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
	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
150
151
	$(NULL)

152
ALL_SPECS =$(PACKAGES:%=$(SPECS)/%.spec)
Alexander Larsson's avatar
Alexander Larsson committed
153
154
155

deps: rpm-dependencies.P

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

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

Alexander Larsson's avatar
Alexander Larsson committed
170
171
172
173
174
175
176
177
gnome-debug.tar.gz gnome-debug-src.tar.gz: $(NOARCH)/gnome-debug-0.1-1.sdk.noarch.rpm
	./setup.sh $(SDK_BASE_IMAGE)
	./build.sh smart install -y  $(NOARCH)/gnome-debug-0.1-1.sdk.noarch.rpm
	rm -rf gnome-debug.tar.gz gnome-debug-src.tar.gz
	tar --transform 's,^build/root/usr/lib/debug,files,S' -czf gnome-debug.tar.gz build/root/usr/lib/debug --owner=root
	tar --transform 's,^build/root/usr/src/debug,files,S' -czf gnome-debug-src.tar.gz build/root/usr/src/debug --owner=root
	./clear_root.sh

178
freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz: $(NOARCH)/freedesktop-sdk-0.1-1.sdk.noarch.rpm
179
	./setup.sh $(SDK_BASE_IMAGE)
180
	./build.sh smart install -y  $(NOARCH)/freedesktop-sdk-0.1-1.sdk.noarch.rpm
Alexander Larsson's avatar
Alexander Larsson committed
181
	./build.sh ./post.sh
182
	rm -rf freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz
183
184
	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
185
	./clear_root.sh
186

Alexander Larsson's avatar
Alexander Larsson committed
187
188
189
190
191
192
193
194
freedesktop-debug.tar.gz freedesktop-debug-src.tar.gz: $(NOARCH)/freedesktop-debug-0.1-1.sdk.noarch.rpm
	./setup.sh $(SDK_BASE_IMAGE)
	./build.sh smart install -y  $(NOARCH)/freedesktop-debug-0.1-1.sdk.noarch.rpm
	rm -rf freedesktop-debug.tar.gz freedesktop-debug-src.tar.gz
	tar --transform 's,^build/root/usr/lib/debug,files,S' -czf freedesktop-debug.tar.gz build/root/usr/lib/debug --owner=root
	tar --transform 's,^build/root/usr/src/debug,files,S' -czf freedesktop-debug-src.tar.gz build/root/usr/src/debug --owner=root
	./clear_root.sh

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

197
$(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)
198
199
200
	-echo building freedesktop-platform-base.spec
	rm -rf packages/freedesktop-platform
	mkdir -p packages/freedesktop-platform
201
202
	tar -C packages/freedesktop-platform -xzf $(PLATFORM_BASE_IMAGE)
	./setup.sh $(SDK_BASE_IMAGE)
203
	./build.sh rpmbuild -ba $(SPECS)/freedesktop-platform-base.spec
204
	./clear_root.sh
205

206
freedesktop-sdk-base: $(NOARCH)/freedesktop-sdk-base-0.1-1.sdk.noarch.rpm
207

208
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
209
	./setup.sh $(SDK_BASE_IMAGE)
210
211
	rm -f freedesktop-platform-packages
	./build.sh ./list_packages.sh freedesktop-platform > freedesktop-platform-packages
212
	./clear_root.sh
213

214
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)
215
	-echo building freedesktop-platform
216
	./setup_root.sh $(PLATFORM_BASE_IMAGE)
217
	./build.sh rpm -Uvh `cat freedesktop-platform-packages`
Alexander Larsson's avatar
Alexander Larsson committed
218
	./build.sh ./post.sh
219
220
	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
221
	./clear_root.sh
222

223
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
224
	./setup.sh $(SDK_BASE_IMAGE)
225
	rm -f gnome-platform-packages
226
	./build.sh ./list_packages.sh gnome-platform > gnome-platform-packages
227
	./clear_root.sh
228

229
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)
230
	-echo building gnome-platform
231
	./setup_root.sh $(PLATFORM_BASE_IMAGE)
232
	./build.sh rpm -Uvh `cat gnome-platform-packages`
Alexander Larsson's avatar
Alexander Larsson committed
233
	./build.sh ./post.sh
234
235
	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
236
	./clear_root.sh
237

Alexander Larsson's avatar
Alexander Larsson committed
238
repo:
239
	ostree  init --mode=archive-z2 --repo=repo
240

241
242
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)
243

244
245
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)
246

Alexander Larsson's avatar
Alexander Larsson committed
247
248
249
250
commit-freedesktop-debug: repo freedesktop-debug.tar.gz freedesktop-debug-src.tar.gz
	./simple-commit.sh repo freedesktop-debug.tar.gz org.freedesktop.Debug$(EXTRA_NAME) $(ARCH) $(FREEDESKTOP_VERSION)
	./simple-commit.sh repo freedesktop-debug-src.tar.gz org.freedesktop.DebugSrc$(EXTRA_NAME) $(ARCH) $(FREEDESKTOP_VERSION)

251
252
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)
253

254
255
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)
256

Alexander Larsson's avatar
Alexander Larsson committed
257
258
259
260
261
commit-debug: repo gnome-debug.tar.gz gnome-debug-src.tar.gz
	./simple-commit.sh repo gnome-debug.tar.gz org.gnome.Debug$(EXTRA_NAME) $(ARCH) $(GNOME_VERSION)
	./simple-commit.sh repo gnome-debug-src.tar.gz org.gnome.DebugSrc$(EXTRA_NAME) $(ARCH) $(GNOME_VERSION)

commit-gnome: commit-sdk commit-platform commit-debug
Alexander Larsson's avatar
Alexander Larsson committed
262
	echo done
263

Alexander Larsson's avatar
Alexander Larsson committed
264
commit-freedesktop: commit-freedesktop-sdk commit-freedesktop-platform commit-freedesktop-debug
265
266
267
268
269
	echo done

commit: commit-gnome commit-freedesktop
	echo done

270
271
272
untag:
	./untag.sh repo org.freedesktop.Platform $(ARCH) $(FREEDESKTOP_VERSION) $(EXTRA_NAME)
	./untag.sh repo org.freedesktop.Sdk $(ARCH) $(FREEDESKTOP_VERSION) $(EXTRA_NAME)
Alexander Larsson's avatar
Alexander Larsson committed
273
274
	./untag.sh repo org.freedesktop.Debug $(ARCH) $(FREEDESKTOP_VERSION) $(EXTRA_NAME)
	./untag.sh repo org.freedesktop.DebugSrc $(ARCH) $(FREEDESKTOP_VERSION) $(EXTRA_NAME)
275
276
	./untag.sh repo org.gnome.Platform $(ARCH) $(GNOME_VERSION) $(EXTRA_NAME)
	./untag.sh repo org.gnome.Sdk $(ARCH) $(GNOME_VERSION) $(EXTRA_NAME)
Alexander Larsson's avatar
Alexander Larsson committed
277
278
	./untag.sh repo org.gnome.Debug $(ARCH) $(GNOME_VERSION) $(EXTRA_NAME)
	./untag.sh repo org.gnome.DebugSrc $(ARCH) $(GNOME_VERSION) $(EXTRA_NAME)
279

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