added init_mozilla_unfied, set_mozilla_unified for Nightly builds.
This commit is contained in:
parent
d0dd908ef5
commit
a6e86400a5
2 changed files with 58 additions and 34 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
firefox-*
|
/firefox-*
|
||||||
librewolf-*
|
librewolf-*
|
||||||
megabar.patch
|
megabar.patch
|
||||||
remove_addons.patch
|
remove_addons.patch
|
||||||
|
|
@ -8,4 +8,6 @@ mozilla-vpn-ad.patch
|
||||||
mozconfig
|
mozconfig
|
||||||
librewolf
|
librewolf
|
||||||
tmp.nsi
|
tmp.nsi
|
||||||
tmp-permissive.nsi
|
tmp-permissive.nsi
|
||||||
|
/mozilla-unified
|
||||||
|
bootstrap.py
|
||||||
|
|
|
||||||
86
build.sh
86
build.sh
|
|
@ -10,6 +10,8 @@ set -e
|
||||||
|
|
||||||
. ./version.sh
|
. ./version.sh
|
||||||
|
|
||||||
|
srcdir=firefox-$pkgver
|
||||||
|
|
||||||
#
|
#
|
||||||
# Basic functionality
|
# Basic functionality
|
||||||
#
|
#
|
||||||
|
|
@ -32,7 +34,7 @@ fetch() {
|
||||||
extract() {
|
extract() {
|
||||||
echo "extract: begin."
|
echo "extract: begin."
|
||||||
|
|
||||||
echo "Deleting previous firefox-${pkgver} ..."
|
echo "Deleting previous firefox-$pkgver ..."
|
||||||
rm -rf firefox-$pkgver
|
rm -rf firefox-$pkgver
|
||||||
|
|
||||||
echo "Extracting firefox-$pkgver.source.tar.xz ..."
|
echo "Extracting firefox-$pkgver.source.tar.xz ..."
|
||||||
|
|
@ -86,29 +88,28 @@ END
|
||||||
|
|
||||||
|
|
||||||
do_patches() {
|
do_patches() {
|
||||||
echo "do_patches: begin."
|
echo "do_patches: begin. (srcdir=$srcdir)"
|
||||||
|
|
||||||
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
cd firefox-$pkgver
|
cd $srcdir
|
||||||
|
|
||||||
echo 'Applying patches...'
|
|
||||||
|
|
||||||
patch -p1 -i ../linux/context-menu.patch
|
|
||||||
if [ $? -ne 0 ]; then exit 1; fi
|
|
||||||
patch -p1 -i ../linux/megabar.patch
|
|
||||||
if [ $? -ne 0 ]; then exit 1; fi
|
|
||||||
patch -p1 -i ../linux/mozilla-vpn-ad.patch
|
|
||||||
if [ $? -ne 0 ]; then exit 1; fi
|
|
||||||
patch -p1 -i ../linux/remove_addons.patch
|
|
||||||
if [ $? -ne 0 ]; then exit 1; fi
|
|
||||||
|
|
||||||
|
|
||||||
echo 'Creating mozconfig...'
|
echo 'Creating mozconfig...'
|
||||||
|
|
||||||
create_mozconfig
|
create_mozconfig
|
||||||
# just a straight copy for now..
|
# just a straight copy for now..
|
||||||
cp -v ../mozconfig .
|
cp -v ../mozconfig .
|
||||||
|
|
||||||
|
echo 'Applying patches...'
|
||||||
|
|
||||||
|
#! patch -p1 -i ../linux/context-menu.patch
|
||||||
|
#! if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
#! patch -p1 -i ../linux/megabar.patch
|
||||||
|
#! if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
patch -p1 -i ../linux/mozilla-vpn-ad.patch
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
#! patch -p1 -i ../linux/remove_addons.patch
|
||||||
|
#! if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
||||||
echo 'GNU sed patches...'
|
echo 'GNU sed patches...'
|
||||||
|
|
||||||
patch -p1 -i ../patches/sed-patches/allow-searchengines-non-esr.patch
|
patch -p1 -i ../patches/sed-patches/allow-searchengines-non-esr.patch
|
||||||
|
|
@ -141,8 +142,8 @@ do_patches() {
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
echo "build: begin."
|
echo "build: begin."
|
||||||
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
cd firefox-$pkgver
|
cd $srcdir
|
||||||
|
|
||||||
./mach build
|
./mach build
|
||||||
if [ $? -ne 0 ]; then exit 1; fi
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
@ -156,8 +157,8 @@ build() {
|
||||||
|
|
||||||
artifacts_win() {
|
artifacts_win() {
|
||||||
echo "artifacts_win: begin."
|
echo "artifacts_win: begin."
|
||||||
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
cd firefox-$pkgver
|
cd $srcdir
|
||||||
|
|
||||||
./mach package
|
./mach package
|
||||||
if [ $? -ne 0 ]; then exit 1; fi
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
@ -175,8 +176,8 @@ artifacts_win() {
|
||||||
artifacts_deb()
|
artifacts_deb()
|
||||||
{
|
{
|
||||||
echo "artifacts_deb: begin."
|
echo "artifacts_deb: begin."
|
||||||
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
cd firefox-$pkgver
|
cd $srcdir
|
||||||
|
|
||||||
./mach package
|
./mach package
|
||||||
if [ $? -ne 0 ]; then exit 1; fi
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
@ -195,8 +196,8 @@ artifacts_deb()
|
||||||
artifacts_rpm()
|
artifacts_rpm()
|
||||||
{
|
{
|
||||||
echo "artifacts_rpm: begin."
|
echo "artifacts_rpm: begin."
|
||||||
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
cd firefox-$pkgver
|
cd $srcdir
|
||||||
|
|
||||||
./mach package
|
./mach package
|
||||||
if [ $? -ne 0 ]; then exit 1; fi
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
|
@ -253,6 +254,7 @@ clean() {
|
||||||
rm -rf librewolf
|
rm -rf librewolf
|
||||||
rm -f firefox-$pkgver.source.tar.xz
|
rm -f firefox-$pkgver.source.tar.xz
|
||||||
rm -f mozconfig
|
rm -f mozconfig
|
||||||
|
rm -f bootstrap.py
|
||||||
|
|
||||||
# windows
|
# windows
|
||||||
rm -f librewolf-$pkgver.en-US.win64.zip
|
rm -f librewolf-$pkgver.en-US.win64.zip
|
||||||
|
|
@ -275,15 +277,15 @@ rustup() {
|
||||||
# rust needs special love: https://www.atechtown.com/install-rust-language-on-debian-10/
|
# rust needs special love: https://www.atechtown.com/install-rust-language-on-debian-10/
|
||||||
echo "rustup: begin."
|
echo "rustup: begin."
|
||||||
curl https://sh.rustup.rs -sSf | sh
|
curl https://sh.rustup.rs -sSf | sh
|
||||||
. $HOME/.cargo/env
|
. "$HOME/.cargo/env"
|
||||||
cargo install cbindgen
|
cargo install cbindgen
|
||||||
echo "rustup: done."
|
echo "rustup: done."
|
||||||
}
|
}
|
||||||
|
|
||||||
mach_env() {
|
mach_env() {
|
||||||
echo "mach_env: begin."
|
echo "mach_env: begin."
|
||||||
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
cd firefox-$pkgver
|
cd $srcdir
|
||||||
./mach create-mach-environment
|
./mach create-mach-environment
|
||||||
if [ $? -ne 0 ]; then exit 1; fi
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
cd ..
|
cd ..
|
||||||
|
|
@ -299,8 +301,8 @@ git_subs() {
|
||||||
|
|
||||||
git_init() {
|
git_init() {
|
||||||
echo "git_init: begin."
|
echo "git_init: begin."
|
||||||
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
if [ ! -d $srcdir ]; then exit 1; fi
|
||||||
cd firefox-$pkgver
|
cd $srcdir
|
||||||
|
|
||||||
echo "Removing old .git folder..."
|
echo "Removing old .git folder..."
|
||||||
rm -rf .git
|
rm -rf .git
|
||||||
|
|
@ -339,7 +341,13 @@ policies_diff() {
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
init_mozilla_unified() {
|
||||||
|
wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py
|
||||||
|
python3 bootstrap.py --vcs=git
|
||||||
|
}
|
||||||
|
set_mozilla_unified() {
|
||||||
|
srcdir=mozilla-unified
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# process commandline arguments and do something
|
# process commandline arguments and do something
|
||||||
|
|
@ -389,6 +397,15 @@ fi
|
||||||
|
|
||||||
# various administrative actions...
|
# various administrative actions...
|
||||||
|
|
||||||
|
if [[ "$*" == *init_mozilla_unified* ]]; then
|
||||||
|
init_mozilla_unified
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
if [[ "$*" == *set_mozilla_unified* ]]; then
|
||||||
|
set_mozilla_unified
|
||||||
|
done_something=1
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$*" == *clean* ]]; then
|
if [[ "$*" == *clean* ]]; then
|
||||||
clean
|
clean
|
||||||
done_something=1
|
done_something=1
|
||||||
|
|
@ -501,7 +518,7 @@ if [[ "$*" == *policies_diff* ]]; then
|
||||||
done_something=1
|
done_something=1
|
||||||
fi
|
fi
|
||||||
if [[ "$*" == *mach_run_config* ]]; then
|
if [[ "$*" == *mach_run_config* ]]; then
|
||||||
cp -r settings/* $(echo firefox-$pkgver/obj-*)/dist/bin
|
cp -r settings/* $(echo $srcdir/obj-*)/dist/bin
|
||||||
done_something=1
|
done_something=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -542,7 +559,7 @@ Use: ./build.sh clean | all | [other stuff...]
|
||||||
git_subs - update git submodules.
|
git_subs - update git submodules.
|
||||||
config_diff - diff between my .cfg and dist .cfg file. (win10)
|
config_diff - diff between my .cfg and dist .cfg file. (win10)
|
||||||
policies_diff - diff between my policies and the dist policies. (win10)
|
policies_diff - diff between my policies and the dist policies. (win10)
|
||||||
git_init - create .git folder in firefox-$pkgver for creating patches.
|
git_init - create .git folder in $srcdir for creating patches.
|
||||||
mach_run_config - copy librewolf config/policies to enable 'mach run'.
|
mach_run_config - copy librewolf config/policies to enable 'mach run'.
|
||||||
|
|
||||||
# Cross-compile from linux:
|
# Cross-compile from linux:
|
||||||
|
|
@ -553,6 +570,11 @@ Use: ./build.sh clean | all | [other stuff...]
|
||||||
setup_deb_user - setup compile environmnet (build user)
|
setup_deb_user - setup compile environmnet (build user)
|
||||||
setup_rpm_root - setup compile environment (root stuff)
|
setup_rpm_root - setup compile environment (root stuff)
|
||||||
setup_rpm_user - setup compile environmnet (build user)
|
setup_rpm_user - setup compile environmnet (build user)
|
||||||
|
|
||||||
|
# Nightly:
|
||||||
|
|
||||||
|
init_mozilla_central - use bootstrap.py to grab the latest mozilla-source
|
||||||
|
set_mozilla_central - use mozilla-source instead of $srcdir source
|
||||||
|
|
||||||
Documentation is in the build-howto.md. In a docker situation, we'd like
|
Documentation is in the build-howto.md. In a docker situation, we'd like
|
||||||
to run something like:
|
to run something like:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue