130 lines
4.2 KiB
Makefile
130 lines
4.2 KiB
Makefile
# Build requires gn and ninja
|
|
# also clang, clang++, ar, nm
|
|
|
|
update-repos:
|
|
# launcher
|
|
cd ungoogled-chromium && git pull
|
|
# installer from AUR (for patch/build reference)
|
|
cd aur-ungoogled-chromium && git pull
|
|
# extra patches (used by aur-ungoogled-chromium)
|
|
cd chromium-patches && git pull
|
|
|
|
update-aur-patches:
|
|
rm -rf aur-patches
|
|
mkdir aur-patches
|
|
cp aur-ungoogled-chromium/*.patch aur-patches
|
|
|
|
# ungoogled-chromium way
|
|
retrieve:
|
|
mkdir -p chromium-downloads
|
|
./ungoogled-chromium/utils/downloads.py retrieve -c chromium-downloads -i ./ungoogled-chromium/downloads.ini
|
|
|
|
unpack:
|
|
./ungoogled-chromium/utils/downloads.py unpack -c chromium-downloads -i ./ungoogled-chromium/downloads.ini -- chromium-src
|
|
|
|
# google way
|
|
checkout:
|
|
mkdir -p repo
|
|
export PATH="$$PATH:$${HOME}/builds/chromium/depot_tools" && cd repo && fetch --nohooks chromium
|
|
|
|
|
|
# AUR Preparation Steps
|
|
apply-aur-mods:
|
|
cd chromium-src && ../aur-mods.sh
|
|
|
|
## MANUALLY ##
|
|
# Copy the "patch" lines from aur-ungoogled-chromium/PKGBUILD into the following target
|
|
# add cd chromium-src && before each line
|
|
# rename "../patches" to "../chromium-patches"
|
|
# rename "../" to "../aur-patches"
|
|
apply-aur-patches:
|
|
cd chromium-src && ../aur-patches.sh
|
|
|
|
# Ungoogled Chromium Steps
|
|
prune-binaries:
|
|
./ungoogled-chromium/utils/prune_binaries.py chromium-src ./ungoogled-chromium/pruning.list
|
|
|
|
apply-ungoogle-patches:
|
|
./ungoogled-chromium/utils/patches.py apply chromium-src ./ungoogled-chromium/patches
|
|
|
|
apply-michael-patches:
|
|
cd chromium-src && git init
|
|
cd chromium-src && git add chrome
|
|
cd chromium-src && git commit -m 'chrome'
|
|
cd chromium-src && patch -Np1 -i ../michael-patches/michael-customizations.patch
|
|
|
|
# only needed if patches need updates i.e. hunks failed
|
|
update-michael-patches:
|
|
cd chromium-src && git diff -p > ../michael-patches/michael-customizations.patch
|
|
|
|
# may warn/info about "path has no substitutions" a few (10-20) times
|
|
subst-domains:
|
|
mkdir -p chromium-src/cache
|
|
./ungoogled-chromium/utils/domain_substitution.py apply \
|
|
-r ./ungoogled-chromium/domain_regex.list \
|
|
-f ./ungoogled-chromium/domain_substitution.list \
|
|
-c chromium-src/cache/domsubcache.tar.gz \
|
|
chromium-src
|
|
|
|
# More AUR Preparation Steps
|
|
configure-libraries:
|
|
cd chromium-src && ../configure-libraries.sh
|
|
|
|
# Build the package (this can take 4-5 hours)
|
|
build-chromium:
|
|
cd chromium-src && ../build.sh
|
|
|
|
build-launcher:
|
|
cd chromium-launcher && make
|
|
|
|
clean-zips:
|
|
rm -f chromium-src-release.tar.gz
|
|
rm -f chromium-launcher.tar.gz
|
|
rm -f aur-confs.tar.gz
|
|
|
|
#chromium-src/out/Release/swiftshader/*.so \
|
|
|
|
create-zips:
|
|
apack chromium-src-release.tar.gz \
|
|
chromium-src/LICENSE \
|
|
chromium-src/out/Release/chrome \
|
|
chromium-src/out/Release/chromedriver \
|
|
chromium-src/out/Release/chrome_sandbox \
|
|
chromium-src/out/Release/chrome_100_percent.pak \
|
|
chromium-src/out/Release/chrome_200_percent.pak \
|
|
chromium-src/out/Release/chrome_crashpad_handler \
|
|
chromium-src/out/Release/resources.pak \
|
|
chromium-src/out/Release/v8_context_snapshot.bin \
|
|
chromium-src/out/Release/libEGL.so \
|
|
chromium-src/out/Release/libGLESv2.so \
|
|
chromium-src/out/Release/libvk_swiftshader.so \
|
|
chromium-src/out/Release/vk_swiftshader_icd.json\
|
|
chromium-src/out/Release/locales/*.pak \
|
|
chromium-src/chrome/app/theme/chromium/product_logo_*.png \
|
|
chromium-src/chrome/app/theme/default_100_percent/chromium/product_logo_*.png \
|
|
chromium-src/chrome/installer/linux/common/desktop.template \
|
|
chromium-src/chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \
|
|
chromium-src/chrome/app/resources/manpage.1.in
|
|
|
|
apack chromium-launcher.tar.gz \
|
|
chromium-launcher
|
|
|
|
apack aur-confs.tar.gz \
|
|
aur-confs/chromium-drirc-disable-10bpc-color-configs.conf
|
|
|
|
create-pkgbuild:
|
|
cp PKGBUILD.template PKGBUILD
|
|
sed -i "s/<chromium-src-release.tar.gz-sha256sum>/$$(sha256sum chromium-src-release.tar.gz | awk '{ print $$1 }')/" PKGBUILD
|
|
sed -i "s/<aur-confs.tar.gz-sha256sum>/$$(sha256sum aur-confs.tar.gz | awk '{ print $$1 }')/" PKGBUILD
|
|
sed -i "s/<chromium-launcher.tar.gz-sha256sum>/$$(sha256sum chromium-launcher.tar.gz | awk '{ print $$1 }')/" PKGBUILD
|
|
|
|
uninstall:
|
|
pacman -Rns ungoogled-chromium-michael ungoogled-chromium-michael-debug
|
|
|
|
# Oct 27, 2022 - Got a couple "cp cannot stat" but still installed
|
|
makepkg:
|
|
makepkg
|
|
|
|
install:
|
|
makepkg --install
|