diff --git a/artifacts_rpm.sh b/artifacts_rpm.sh index bfa72b0..fd30bf2 100644 --- a/artifacts_rpm.sh +++ b/artifacts_rpm.sh @@ -1,38 +1,53 @@ -#!/usr/bin/bash +exe= +objdir=obj-x86_64-pc-linux-gnu/dist/firefox +ospkg=rpm # sanity checks -if [ ! -d obj-x86_64-pc-linux-gnu/dist/firefox ]; then - echo "installer_rpm.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.rpm.zip* - -zip -r9 librewolf-$pkgver.en-US.rpm.zip librewolf -if [ $? -ne 0 ]; then exit 1; fi -sha256sum librewolf-$pkgver.en-US.rpm.zip > librewolf-$pkgver.en-US.rpm.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 diff --git a/build.sh b/build.sh index 4f64e39..934f8d6 100755 --- a/build.sh +++ b/build.sh @@ -480,9 +480,15 @@ else done_something=1 fi fi -if [[ "$*" == *artifacts_rpm* ]]; then +if [[ "$*" == *artifacts_rpm_exp* ]]; then + experimental=experimental artifacts_rpm done_something=1 +else + if [[ "$*" == *artifacts_rpm* ]]; then + artifacts_rpm + done_something=1 + fi fi @@ -500,12 +506,13 @@ Use: ./build.sh fetch extract do_patches build package artifacts_win Linux related functions: - deps_deb - install dependencies with apt. - deps_rpm - install dependencies with dnf. - deps_pkg - install dependencies with pkg. - artifacts_deb - apply .cfg, create a dist zip file (for debian10). + deps_deb - install dependencies with apt. + 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). + artifacts_rpm - apply .cfg, create a dist zip file (for fedora33). + artifacts_rpm_exp - include experimental build Generic utility functionality: