Updated with experimental builds for debian

This commit is contained in:
Bert van der Weerd 2021-03-25 23:06:58 +01:00
parent 6267780d2d
commit d628b68638
No known key found for this signature in database
GPG key ID: 4CFABB96ADE0F5B1
3 changed files with 73 additions and 60 deletions

View file

@ -1,38 +1,53 @@
#!/usr/bin/bash
exe=
objdir=obj-x86_64-pc-linux-gnu/dist/firefox
ospkg=deb
# sanity checks
if [ ! -d obj-x86_64-pc-linux-gnu/dist/firefox ]; then
echo "installer_deb.sh: directory obj-x86_64-pc-linux-gnu/dist/firefox not found."
if [ ! -d $objdir ]; then
echo "artifacts_win.sh: directory $objdir not found. did you run './build.sh build'?"
exit 1;
fi
rm -rf ../firefox ../librewolf
cp -r obj-x86_64-pc-linux-gnu/dist/firefox ..
cp -r $objdir ..
pushd ..
mv firefox librewolf
mv firefox librewolf
# apply the LibreWolf settings
cp -rv settings/* librewolf
# rename the executable manually
cd librewolf ; mv -v firefox librewolf ; cd ..
# recreate the zip file..
pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd
# clean garbage files
cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd ..
# copy the windows icon
cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico
# copy the files to register LibreWolf as local app.
cp -v branding_files/register-librewolf branding_files/start-librewolf* librewolf
# be sure to remove the previous zip file..
rm -f librewolf-$pkgver.en-US.deb.zip*
zip -r9 librewolf-$pkgver.en-US.deb.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
sha256sum librewolf-$pkgver.en-US.deb.zip > librewolf-$pkgver.en-US.deb.zip.sha256sum
# create the final zip artifact
rm -f librewolf-$pkgver.en-US.$ospkg.zip
zip -qr9 librewolf-$pkgver.en-US.$ospkg.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
# now to try to make the installer
# (create a .deb here)
# patch to experimental config
if [ ! -z $experimental ]; then
pushd librewolf
echo "Applying experimental patches..."
patch -p1 -i ../patches/librewolf-config.patch
if [ $? -ne 0 ]; then exit 1; fi
patch -p1 -i ../patches/librewolf-policies.patch
if [ $? -ne 0 ]; then exit 1; fi
popd
# create the final zip artifact
rm -f librewolf-$pkgver.en-US.$ospkg-experimental.zip
zip -qr9 librewolf-$pkgver.en-US.$ospkg-experimental.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
# now to try to make the installer
# (create a .deb here)
fi
popd

View file

@ -1,5 +1,6 @@
exe=.exe
objdir=obj-x86_64-pc-mingw32/dist/firefox
ospkg=win64
# sanity checks
if [ ! -d $objdir ]; then
@ -23,8 +24,8 @@ cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete
cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico
# create the final zip artifact
rm -f librewolf-$pkgver.en-US.win64.zip
zip -qr9 librewolf-$pkgver.en-US.win64.zip librewolf
rm -f librewolf-$pkgver.en-US.$ospkg.zip
zip -qr9 librewolf-$pkgver.en-US.$ospkg.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
# now to try to make the installer
@ -44,8 +45,8 @@ if [ ! -z $experimental ]; then
popd
# create the final zip artifact
rm -f librewolf-$pkgver.en-US.win64-experimental.zip
zip -qr9 librewolf-$pkgver.en-US.win64-experimental.zip librewolf
rm -f librewolf-$pkgver.en-US.$ospkg-experimental.zip
zip -qr9 librewolf-$pkgver.en-US.$ospkg-experimental.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
# now to try to make the installer

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# build.sh - build librewolf on windows
# derived from https://gitlab.com/librewolf-community/browser/linux/-/blob/master/PKGBUILD
#
@ -53,6 +53,7 @@ clean() {
# linux
rm -f librewolf-$pkgver.en-US.deb.zip
rm -f librewolf-$pkgver.en-US.deb-experimental.zip
rm -f librewolf-$pkgver.en-US.rpm.zip
echo "clean: done."
@ -281,27 +282,6 @@ artifacts_win() {
echo "artifacts_win: done."
}
artifacts_exp() {
echo "artifacts_exp: begin."
if [ ! -d firefox-$pkgver ]; then exit 1; fi
cd firefox-$pkgver
./mach package
if [ $? -ne 0 ]; then exit 1; fi
echo ""
echo "artifacts_exp: Creating final artifacts."
echo ""
# enable artifacts_win.sh to apply patches
experimental=experimental
. ../artifacts_win.sh
cd ..
echo "artifacts_exp: done."
}
artifacts_deb()
{
echo "artifacts_deb: begin."
@ -347,7 +327,7 @@ rustup() {
# rust needs special love: https://www.atechtown.com/install-rust-language-on-debian-10/
echo "rustup: begin."
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
. $HOME/.cargo/env
cargo install cbindgen
echo "rustup: done."
}
@ -404,7 +384,7 @@ if [ -f '/c/mozilla-build/start-shell.bat' ]; then
fi
if [ -f $HOME/.cargo/env ]; then
source $HOME/.cargo/env
. $HOME/.cargo/env
fi
@ -424,6 +404,9 @@ if [[ "$*" == *policies_diff* ]]; then
policies_diff
done_something=1
fi
#
if [[ "$*" == *clean* ]]; then
clean
done_something=1
@ -432,6 +415,13 @@ if [[ "$*" == *git_subs* ]]; then
git_subs
done_something=1
fi
if [[ "$*" == *rustup* ]]; then
rustup
done_something=1
fi
#
if [[ "$*" == *deps_deb* ]]; then
deps_deb
done_something=1
@ -444,10 +434,9 @@ if [[ "$*" == *deps_pkg* ]]; then
deps_pkg
done_something=1
fi
if [[ "$*" == *rustup* ]]; then
rustup
done_something=1
fi
#
if [[ "$*" == *fetch* ]]; then
fetch
done_something=1
@ -468,28 +457,35 @@ if [[ "$*" == *build* ]]; then
build
done_something=1
fi
if [[ "$*" == *artifacts_win* ]]; then
artifacts_win
done_something=1
fi
#
if [[ "$*" == *artifacts_exp* ]]; then
experimental=experimental
artifacts_exp
done_something=1
else
if [[ "$*" == *artifacts_win* ]]; then
artifacts_win
done_something=1
fi
fi
if [[ "$*" == *artifacts_deb* ]]; then
if [[ "$*" == *artifacts_deb_exp* ]]; then
experimental=experimental
artifacts_deb
done_something=1
else
if [[ "$*" == *artifacts_deb* ]]; then
artifacts_deb
done_something=1
fi
fi
if [[ "$*" == *artifacts_rpm* ]]; then
artifacts_rpm
done_something=1
fi
# by default, give help..
if (( done_something == 0 )); then
cat <<EOF
@ -508,6 +504,7 @@ Linux related functions:
deps_rpm - install dependencies with dnf.
deps_pkg - install dependencies with pkg.
artifacts_deb - apply .cfg, create a dist zip file (for debian10).
artifacts_deb_exp - include experimental build
artifacts_rpm - apply .cfg, create a dist zip file (for fedora33).
Generic utility functionality: