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 # sanity checks
if [ ! -d obj-x86_64-pc-linux-gnu/dist/firefox ]; then if [ ! -d $objdir ]; then
echo "installer_deb.sh: directory obj-x86_64-pc-linux-gnu/dist/firefox not found." echo "artifacts_win.sh: directory $objdir not found. did you run './build.sh build'?"
exit 1; exit 1;
fi fi
rm -rf ../firefox ../librewolf rm -rf ../firefox ../librewolf
cp -r obj-x86_64-pc-linux-gnu/dist/firefox .. cp -r $objdir ..
pushd .. pushd ..
mv firefox librewolf
mv firefox librewolf
# apply the LibreWolf settings # apply the LibreWolf settings
cp -rv settings/* librewolf cp -rv settings/* librewolf
# rename the executable manually # rename the executable manually
cd librewolf ; mv -v firefox librewolf ; cd .. pushd librewolf ; mv -v firefox$exe librewolf$exe ; popd
# recreate the zip file..
# clean garbage files # clean garbage files
cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd .. 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. # create the final zip artifact
cp -v branding_files/register-librewolf branding_files/start-librewolf* librewolf rm -f librewolf-$pkgver.en-US.$ospkg.zip
zip -qr9 librewolf-$pkgver.en-US.$ospkg.zip 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
if [ $? -ne 0 ]; then exit 1; fi 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 popd

View file

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

View file

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