Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
bee-files/chromium.be0
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
138 lines (115 sloc)
4.39 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env beesh | |
# BEE_VERSION chromium-60.0.3112.78-0 | |
SRCURL[0]="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${PKGVERSION}.tar.xz" | |
#PATCHURL[0]="http://www.linuxfromscratch.org/patches/blfs/svn/chromium-${PKGVERSION}-system_ffmpeg-1.patch" | |
#PATCHURL[1]="http://www.linuxfromscratch.org/patches/blfs/svn/chromium-${PKGVERSION}-kernel_dmabuf-1.patch" | |
# EXCLUDE+=() | |
# build_in_sourcedir | |
# sourcesubdir_append src | |
GN_CONFIG=( | |
'clang_use_chrome_plugins=false' | |
'enable_hangout_services_extension=true' | |
'enable_nacl=false' | |
'enable_nacl_nonsfi=false' | |
'enable_swiftshader=false' | |
'enable_widevine=false' | |
'fatal_linker_warnings=false' | |
'ffmpeg_branding="Chrome"' | |
'fieldtrial_testing_like_official_build=true' | |
'is_debug=false' | |
'is_clang=false' | |
'link_pulseaudio=true' | |
'linux_use_bundled_binutils=false' | |
'proprietary_codecs=true' | |
'remove_webcore_debug_symbols=true' | |
'symbol_level=0' | |
'treat_warnings_as_errors=false' | |
'use_allocator="none"' | |
'use_cups=true' | |
'use_gconf=false' | |
'use_gnome_keyring=false' | |
'use_gold=false' | |
'use_gtk3=true' | |
'use_kerberos=true' | |
'use_pulseaudio=true' | |
'use_sysroot=false') | |
filedir=${BEE_TMP_BUILDROOT}/${PKGNAME}/files | |
launcher="chromium-launcher-3" | |
#mee_extract() { | |
# bee_extract "${@}" | |
#} | |
#mee_patch() { | |
# bee_patch "${@}" | |
#} | |
mee_configure() { | |
cd ${S} | |
for LIB in ffmpeg flac harfbuzz-ng libpng \ | |
libjpeg libjpeg_turbo libwebp libxslt yasm; do | |
find -type f -path "*third_party/$LIB/*" \ | |
\! -path "*third_party/$LIB/chromium/*" \ | |
\! -path "*third_party/$LIB/google/*" \ | |
\! -path "*base/third_party/libevent/*" \ | |
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \ | |
-delete | |
done | |
start_cmd python ${S}/build/linux/unbundle/replace_gn_files.py \ | |
--system-libraries ffmpeg flac harfbuzz-ng libpng \ | |
libjpeg libwebp libxslt yasm | |
start_cmd python ${S}/third_party/libaddressinput/chromium/tools/update-strings.py | |
sed "/delayed_task_manager.cc/a\ 'base/task_scheduler/environment_config.cc'," \ | |
-i tools/gn/bootstrap/bootstrap.py | |
} | |
mee_build() { | |
cd ${S} | |
start_cmd python tools/gn/bootstrap/bootstrap.py --gn-gen-args "${GN_CONFIG[*]}" && | |
out/Release/gn gen out/Release --args="${GN_CONFIG[*]}" | |
start_cmd mkdir -p third_party/node/linux/node-linux-x64/bin | |
start_cmd ln -s /usr/local/package/bin/node third_party/node/linux/node-linux-x64/bin/ | |
start_cmd ninja ${BEE_MAKEFLAGS} -C out/Release chrome chrome_sandbox chromedriver | |
} | |
mee_install() { | |
cd ${S} | |
## install Chromium | |
start_cmd install -vDm755 out/Release/chrome \ | |
${D}${LIBDIR}/chromium/chromium | |
start_cmd install -vDm4755 out/Release/chrome_sandbox \ | |
${D}${LIBDIR}/chromium/chrome-sandbox | |
start_cmd install -vDm755 out/Release/chromedriver \ | |
${D}${LIBDIR}/chromium/chromedriver | |
start_cmd install -vDm644 out/Release/icudtl.dat ${D}${LIBDIR}/chromium | |
start_cmd install -vDm644 out/Release/gen/content/content_resources.pak \ | |
${D}${LIBDIR}/chromium/ | |
start_cmd install -vm644 out/Release/{*.pak,*.bin} ${D}${LIBDIR}/chromium/ | |
start_cmd cp -av out/Release/locales ${D}${LIBDIR}/chromium/ | |
start_cmd install -vDm644 out/Release/chrome.1 ${D}${DATAROOTDIR}/man/man1/chromium.1 | |
start_cmd mkdir -m755 ${D}${BINDIR} | |
start_cmd cd ${D} | |
start_cmd ln -sv ${LIBDIR}/chromium/chromedriver usr/bin/chromedriver | |
start_cmd ln -sv ${LIBDIR}/chromium/chromium usr/bin/chromium | |
cd ${S} | |
## Desktop file | |
for size in 16 32; do | |
install -vDm644 \ | |
"${S}/chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \ | |
"${D}${DATAROOTDIR}/icons/hicolor/${size}x${size}/apps/chromium.png" | |
done | |
for size in 22 24 48 64 128 256; do | |
install -vDm644 "${S}/chrome/app/theme/chromium/product_logo_$size.png" \ | |
"${D}${DATAROOTDIR}/icons/hicolor/${size}x${size}/apps/chromium.png" | |
done | |
start_cmd mkdir -m755 ${D}${DATAROOTDIR}/applications/ | |
cat > ${D}${DATAROOTDIR}/applications/chromium.desktop <<-EOF | |
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Chromium Web Browser | |
Comment=Access the Internet | |
GenericName=Web Browser | |
Exec=chromium %u | |
Terminal=false | |
Type=Application | |
Icon=chromium | |
Categories=GTK;Network;WebBrowser; | |
MimeType=application/xhtml+xml;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; | |
EOF | |
} | |
## by default this may be 'make install DESTDIR="${D}"' |