-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathchromium-Makefile
87 lines (74 loc) · 2.88 KB
/
chromium-Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
SRC_DIR=/run/build/chromium
BUILD_DIR=$(SRC_DIR)/out/Release
LIB_DIR=/app/lib/chromium-browser
BIN_DIR=/app/bin
DATA_DIR=/app/share
ICONS_DIR=$(DATA_DIR)/icons
all:
LDFLAGS="${LDFLAGS} -lssp" \
./build/gyp_chromium \
-Dclang=0 \
-Dclang_use_chrome_plugins=0 \
-Dcomponent=shared_library \
-Ddisable_nacl=1 \
-Ddisable_sse2=1 \
-Denable_hidpi=1 \
-Denable_pepper_cdms=1 \
-Denable_touch_ui=1 \
-Denable_webrtc=1 \
-Denable_widevine=1 \
-Dlinux_dump_symbols=1 \
-Dlinux_link_gsettings=1 \
-Dlinux_use_bundled_binutils=0 \
-Dlinux_use_gold_binary=0 \
-Dlinux_use_gold_flags=0 \
-Dlogging_like_official_build=1 \
-Dremove_webcore_debug_symbols=1 \
-Duse_allocator=none \
-Duse_aura=1 \
-Duse_gconf=0 \
-Duse_gio=1 \
-Duse_gnome_keyring=0 \
-Duse_third_party_translations=0 \
-Duse_udev=0 \
-Dwerror= \
--depth=`pwd`
ninja -v -j12 -C out/Release chrome chrome_sandbox
install: TRASH := .deps gen obj.host obj.target \*.lock obj build.\* .landmines mksnapshot.ia32 protoc pyproto re2c resources xdg-mime yasm \*.TOC \*.stamp product_logo_\*png gen\* lib/\* lib libvpx_obj_int_extract .ninja\* chrome-wrapper \*.breakpad.\* java_mojo dump_syms
install:
@set -eux
mkdir -p $(LIB_DIR)
# Install most of the useful files now
(cd $(BUILD_DIR); tar cf - . $(foreach excl,$(TRASH),--exclude=$(excl) );) | (cd $(LIB_DIR); tar xvf -;)
# For non-static build only
if [ -d $(BUILD_DIR)/lib ]; then \
mkdir -p "$(LIB_DIR)/libs"; \
cp -aR $(BUILD_DIR)/lib/*.so "$(LIB_DIR)/libs"; \
fi
# Icons
mkdir -p $(DATA_DIR)/pixmaps
cp -a $(SRC_DIR)/chrome/app/theme/chromium/product_logo_48.png $(DATA_DIR)/pixmaps/chromium-browser.png
for size in 22 24 32 48 64 128 256 ; do \
if test -f "$(SRC_DIR)/chrome/app/theme/chromium/product_logo_$$size.png"; then \
mkdir -p $(DATA_DIR)/icons/hicolor/$${size}x$${size}/apps ; \
cp -a $(SRC_DIR)/chrome/app/theme/chromium/product_logo_$$size.png \
$(DATA_DIR)/icons/hicolor/$${size}x$${size}/apps/chromium-browser.png ; \
else \
echo "There is no size $${size} icon. We expected one."; \
fi; \
done
mkdir -p $(DATA_DIR)/icons/hicolor/scalable/apps
cp -a $(SRC_DIR)/chromium-browser.svg $(DATA_DIR)/icons/hicolor/scalable/apps
# Rename the binary from chrome to chromium-browser, this is required as
# chromium dereferences all symlinks before starting its children making
# the Gnome System Monitor confused with icons
mv $(LIB_DIR)/chrome $(LIB_DIR)/chromium-browser
# "you have to change the underscore from the build target into a hyphen".
# https://code.google.com/p/chromium/wiki/LinuxSUIDSandbox
mv $(LIB_DIR)/chrome_sandbox $(LIB_DIR)/chrome-sandbox
chmod 4755 $(LIB_DIR)/chrome-sandbox
# Desktop file
mkdir -p $(DATA_DIR)/applications
cp -a $(SRC_DIR)/chromium-browser.desktop $(DATA_DIR)/applications
# Launcher script
install -m 755 $(SRC_DIR)/chromium-browser.sh $(BIN_DIR)/chromium-browser