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
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://git.gnome.org/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
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
66
	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
67
68
	glib2 \
	gnome-common \
Alexander Larsson's avatar
Alexander Larsson committed
69
70
	gnome-themes-standard \
	gnu-free-fonts \
Alexander Larsson's avatar
Alexander Larsson committed
71
	gobject-introspection \
Alexander Larsson's avatar
Alexander Larsson committed
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
130
	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
131
	pixman \
Alexander Larsson's avatar
Alexander Larsson committed
132
	pulseaudio \
Alexander Larsson's avatar
Alexander Larsson committed
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
	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
148
149
	$(NULL)

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

deps: rpm-dependencies.P

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

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

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

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

177
$(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)
178
179
180
	-echo building freedesktop-platform-base.spec
	rm -rf packages/freedesktop-platform
	mkdir -p packages/freedesktop-platform
181
182
	tar -C packages/freedesktop-platform -xzf $(PLATFORM_BASE_IMAGE)
	./setup.sh $(SDK_BASE_IMAGE)
183
	./build.sh rpmbuild -ba $(SPECS)/freedesktop-platform-base.spec
184
	./clear_root.sh
185

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

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

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

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

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

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

219
220
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)
221

222
223
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)
224

225
226
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)
227

228
229
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)
230

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

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

commit: commit-gnome commit-freedesktop
	echo done

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

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