384b624c76ea040a9318290cc8159037b1f9eccd
[platform/framework/web/crosswalk.git] / src / ozone / packaging / rpm / chromium.spec
1 Name:           chromium
2 Version:        35.0.1906.0
3 Release:        0
4 Summary:        Chromium ozone-wayland
5 License:        BSD-3-Clause
6 Group:          Web Framework/chromium
7 Url:            https://01.org/ozone-wayland
8 Source:         %{name}.tar
9 Source1:        chromium-browser.sh
10 Source1001:     chromium.manifest
11
12 BuildRequires:  bison
13 BuildRequires:  bzip2-devel
14 BuildRequires:  expat-devel
15 BuildRequires:  flex
16 BuildRequires:  gperf
17 BuildRequires:  libcap-devel
18 BuildRequires:  ninja
19 BuildRequires:  python
20 BuildRequires:  python-xml
21 BuildRequires:  perl
22 BuildRequires:  which
23 BuildRequires:  pkgconfig(alsa)
24 BuildRequires:  pkgconfig(aul)
25 BuildRequires:  pkgconfig(audio-session-mgr)
26 BuildRequires:  pkgconfig(cairo)
27 BuildRequires:  pkgconfig(capi-appfw-application)
28 BuildRequires:  pkgconfig(capi-location-manager)
29 BuildRequires:  pkgconfig(dbus-1)
30 BuildRequires:  pkgconfig(fontconfig)
31 BuildRequires:  pkgconfig(freetype2)
32 BuildRequires:  pkgconfig(gles20)
33 BuildRequires:  pkgconfig(glib-2.0)
34 BuildRequires:  pkgconfig(haptic)
35 BuildRequires:  pkgconfig(icu-i18n)
36 BuildRequires:  pkgconfig(libdrm)
37 BuildRequires:  pkgconfig(libexif)
38 BuildRequires:  pkgconfig(libpci)
39 BuildRequires:  pkgconfig(libpulse)
40 BuildRequires:  pkgconfig(libudev)
41 BuildRequires:  pkgconfig(libxml-2.0)
42 BuildRequires:  pkgconfig(libxslt)
43 BuildRequires:  pkgconfig(nss)
44 BuildRequires:  pkgconfig(pango)
45 BuildRequires:  pkgconfig(pkgmgr-info)
46 BuildRequires:  pkgconfig(pkgmgr-parser)
47 BuildRequires:  pkgconfig(nspr)
48 BuildRequires:  pkgconfig(sensor)
49 BuildRequires:  pkgconfig(vconf)
50 BuildRequires:  pkgconfig(wayland-client)
51 BuildRequires:  pkgconfig(wayland-cursor)
52 BuildRequires:  pkgconfig(wayland-egl)
53 BuildRequires:  pkgconfig(xkbcommon)
54
55 %description
56 # Ozone is a set of classes in Chromium for abstracting different window systems on Linux. It provides abstraction for the construction of accelerated surfaces underlying Aura UI framework, input devices assignment, and event handling.
57
58 %prep
59 %setup -q -n chromium
60
61 cp %{SOURCE1001} .
62
63 cp -a src/AUTHORS AUTHORS.chromium
64 cp -a src/LICENSE LICENSE.chromium
65 cp -a src/ozone/AUTHORS AUTHORS.ozone-wayland
66 cp -a src/ozone/LICENSE LICENSE.ozone-wayland
67
68 %build
69
70 # For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in
71 # src/third_party/ffmpeg already pass -O2 -fomit-frame-pointer, but Tizen's
72 # CFLAGS end up appending -fno-omit-frame-pointer. See http://crbug.com/37246
73 export CFLAGS=`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g`
74
75 # Building the RPM in the GBS chroot fails with errors such as
76 #   /usr/lib/gcc/i586-tizen-linux/4.7/../../../../i586-tizen-linux/bin/ld:
77 #       failed to set dynamic section sizes: Memory exhausted
78 # For now, work around it by passing a GNU ld-specific flag that optimizes the
79 # linker for memory usage.
80 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
81
82 # Support building in a non-standard directory, possibly outside %{_builddir}.
83 # Since the build root is erased every time a new build is performed, one way
84 # to avoid losing the build directory is to specify a location outside the
85 # build root to the BUILDDIR_NAME definition, such as "/var/tmp/chromium-build"
86 # (remember all paths are still inside the chroot):
87 #    gbs build --define 'BUILDDIR_NAME /some/path'
88 #
89 # The --depth and --generator-output combo is used to put all the Makefiles
90 # inside the build directory, and (this is the important part) keep file lists
91 # (generatedwith <|() in gyp) in the build directory as well, otherwise they
92 # will be in the source directory, erased every time and trigger an almost full
93 # Blink rebuild (among other smaller targets).
94 # We cannot always pass those flags, though, because gyp's make generator does
95 # not work if the --generator-output is the top-level source directory.
96 BUILDDIR_NAME="%{?BUILDDIR_NAME}"
97 if [ -z "${BUILDDIR_NAME}" ]; then
98    BUILDDIR_NAME="."
99 else
100    GYP_EXTRA_FLAGS="--depth=. --generator-output=${BUILDDIR_NAME}"
101 fi
102
103 # Change src/ so that we can pass "." to --depth below, otherwise we would need
104 # to pass "src" to it, but this confuses the gyp make generator, that expects
105 # to be called from the root source directory.
106 cd src
107
108 # --no-parallel is added because chroot does not mount a /dev/shm, this will
109 # cause python multiprocessing.SemLock error.
110 #https://github.com/01org/ozone-wayland/issues/147
111
112 export GYP_GENERATORS=ninja
113 ./build/gyp_chromium \
114 --no-parallel \
115 -Duse_ash=1 \
116 -Duse_ozone=1 \
117 -Dchromeos=0 \
118 -Ddisable_nacl=1 \
119 -Dpython_ver=2.7 \
120 -Duse_aura=1 \
121 -Duse_x11=0 \
122 -Duse_cups=0 \
123 -Duse_gconf=0 \
124 -Duse_kerberos=0 \
125 -Duse_system_bzip2=1 \
126 -Duse_system_icu=0 \
127 -Duse_system_libexif=1 \
128 -Duse_system_libxml=1 \
129 -Duse_system_nspr=1 \
130 -Denable_xi21_mt=1 \
131 -Duse_xi2_mt=0 \
132 -Dtarget_arch=ia32 \
133 -Duse_alsa=0 \
134 -Duse_gnome_keyring=0 \
135 -Dlogging_like_official_build=1 \
136 -Dtracing_like_official_build=1 \
137 -Drelease_unwind_tables=0 \
138 -Dlinux_dump_symbols=0 \
139 -Denable_ozone_wayland_vkb=1
140
141 ninja %{?_smp_mflags} -C out/Release chrome
142
143 %install
144 # Support building in a non-standard directory, possibly outside %{_builddir}.
145 # Since the build root is erased every time a new build is performed, one way
146 # to avoid losing the build directory is to specify a location outside the
147 # build root to the BUILDDIR_NAME definition, such as "/var/tmp/chromium-build"
148 # (remember all paths are still inside the chroot):
149 #    gbs build --define 'BUILDDIR_NAME /some/path'
150 BUILDDIR_NAME="%{?BUILDDIR_NAME}"
151 if [ -z "${BUILDDIR_NAME}" ]; then
152    BUILDDIR_NAME="."
153 fi
154
155 # Since BUILDDIR_NAME can be either a relative path or an absolute one, we need
156 # to cd into src/ so that it means the same thing in the build and install
157 # stages: during the former, a relative location refers to a place inside src/,
158 # whereas during the latter a relative location by default would refer to a
159 # place one directory above src/. If BUILDDIR_NAME is an absolute path, this is
160 # irrelevant anyway.
161 cd src
162
163 # Binaries.
164 install -p -D %{SOURCE1} %{buildroot}%{_bindir}/chromium-browser
165 install -p -D ${BUILDDIR_NAME}/out/Release/chrome %{buildroot}%{_libdir}/chromium/chrome
166 cp -R ${BUILDDIR_NAME}/out/Release/locales %{buildroot}%{_libdir}/chromium/
167
168 # Workaround to avoid eu-strip error.
169 strip %{buildroot}%{_libdir}/chromium/chrome
170
171 # Supporting libraries and resources.
172 install -p -D ${BUILDDIR_NAME}/out/Release/libffmpegsumo.so %{buildroot}%{_libdir}/chromium/libffmpegsumo.so
173 strip %{buildroot}%{_libdir}/chromium/libffmpegsumo.so
174 install -p -D ${BUILDDIR_NAME}/out/Release/resources.pak %{buildroot}%{_libdir}/chromium/resources.pak
175 install -p -D ${BUILDDIR_NAME}/out/Release/chrome_100_percent.pak %{buildroot}%{_libdir}/chromium/chrome_100_percent.pak
176 install -p -D ${BUILDDIR_NAME}/out/Release/icudtl.dat %{buildroot}%{_libdir}/chromium/icudtl.dat
177
178 %files
179 %manifest %{name}.manifest
180 %license AUTHORS.chromium LICENSE.chromium AUTHORS.ozone-wayland LICENSE.ozone-wayland
181 %{_bindir}/chromium-browser
182 %{_libdir}/chromium/libffmpegsumo.so
183 %{_libdir}/chromium/chrome
184 %{_libdir}/chromium/resources.pak
185 %{_libdir}/chromium/chrome_100_percent.pak
186 %{_libdir}/chromium/icudtl.dat
187 %{_libdir}/chromium/locales/*