diff --git a/network/web/firefox/actions.py b/network/web/firefox/actions.py
old mode 100755
new mode 100644
index e8fe9ee7fa..d4fe208965
--- a/network/web/firefox/actions.py
+++ b/network/web/firefox/actions.py
@@ -4,41 +4,33 @@
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
-import subprocess
-
from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
#WorkDir = "mozilla-release-6b51784853e47e091d213d421a19cb623af718f0"
-ObjDir = "objdir"
+ObjDir = "build"
locales = "az bs ca da de el en-US en-GB es-AR es-CL es-ES fi fr hr hu it lt nl pl pt-BR pt-PT ro ru sr sv-SE tr uk".split()
xpidir = "%s/xpi" % get.workDIR()
arch = get.ARCH()
ver = ".".join(get.srcVERSION().split(".")[:3])
-jobs = jobs = "-j"+ subprocess.check_output("nproc 2>/dev/null", shell=True).rstrip("\n")
-
shelltools.export("SHELL", "/bin/sh")
shelltools.export("MACH_USE_SYSTEM_PYTHON", "1")
def setup():
-
- shelltools.system("echo 'Instrumenting Firefox for PGO'")
- shelltools.system("cp mozconfig-inst .mozconfig")
-
# Google API key
shelltools.echo("google_api_key", "AIzaSyBINKL31ZYd8W5byPuwTXYK6cEyoceGh6Y")
pisitools.dosed(".mozconfig", "%%PWD%%", get.curDIR())
pisitools.dosed(".mozconfig", "%%FILE%%", "google_api_key")
- pisitools.dosed(".mozconfig", "##JOBCOUNT##", jobs)
+ pisitools.dosed(".mozconfig", "##JOBCOUNT##", get.makeJOBS())
# LOCALE
shelltools.system("rm -rf langpack-ff/*/browser/defaults")
if not shelltools.isDirectory(xpidir): shelltools.makedirs(xpidir)
for locale in locales:
- shelltools.system("wget -c -P %s https://download-origin.cdn.mozilla.net/pub/firefox/releases/%s/linux-%s/xpi/%s.xpi" % (xpidir, ver, arch, locale))
+ shelltools.system("wget -c -P %s http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%s/linux-%s/xpi/%s.xpi" % (xpidir, ver, arch, locale))
#shelltools.makedirs("langpack-ff/langpack-%s@firefox.mozilla.org" % locale)
shelltools.makedirs("langpack-ff")
#shelltools.system("unzip -uo %s/%s.xpi -d langpack-ff/langpack-%s@firefox.mozilla.org" % (xpidir, locale, locale))
@@ -47,42 +39,21 @@ def setup():
#shelltools.copy("browserconfig.properties", "langpack-ff/langpack-%s@firefox.mozilla.org/browser/chrome/%s/locale/branding/" % (locale, locale))
shelltools.copy("browserconfig.properties", "browser/branding/official/locales/")
- #shelltools.makedirs(ObjDir)
- #shelltools.cd(ObjDir)
+ shelltools.makedirs(ObjDir)
+ shelltools.cd(ObjDir)
- #shelltools.system("../configure --prefix=/usr --libdir=/usr/lib --disable-strip --disable-install-strip")
+ shelltools.system("../configure --prefix=/usr --libdir=/usr/lib --disable-strip --disable-install-strip")
def build():
- shelltools.system("echo 'Building instrumented browser'")
- #shelltools.cd(ObjDir)
- shelltools.system("./mach build")
-
- shelltools.system("echo 'Profiling instrumented browser...'")
- shelltools.system("./mach package")
- shelltools.system("LLVM_PROFDATA=llvm-profdata \
- JARLOG_FILE='%s/jarlog' \
- xvfb-run -s '-screen 0 1920x1080x24 -nolisten local' \
- ./mach python build/pgo/profileserver.py" %get.curDIR())
-
- shelltools.system("echo 'Removing instrumented browser...'")
- shelltools.system("./mach clobber")
-
- shelltools.system("echo 'Building optimized browser...'")
- shelltools.system("rm .mozconfig")
- shelltools.system("cp mozconfig-opt .mozconfig")
- #shelltools.echo("google_api_key", "AIzaSyBINKL31ZYd8W5byPuwTXYK6cEyoceGh6Y")
- pisitools.dosed(".mozconfig", "%%PWD%%", get.curDIR())
- pisitools.dosed(".mozconfig", "%%FILE%%", "google_api_key")
- pisitools.dosed(".mozconfig", "##JOBCOUNT##", jobs)
- #shelltools.system("../configure --prefix=/usr --libdir=/usr/lib --disable-strip --disable-install-strip")
- shelltools.system("./mach build")
+ shelltools.cd(ObjDir)
+ shelltools.system("../mach build -j5")
def install():
- #shelltools.cd(ObjDir)
- shelltools.system("DESTDIR=%s ./mach install " % get.installDIR())
+ shelltools.cd(ObjDir)
+ shelltools.system("DESTDIR=%s ../mach install " % get.installDIR())
- #shelltools.cd("..")
+ shelltools.cd("..")
# Install language packs
pisitools.insinto("/usr/lib/firefox/browser/extensions", "./langpack-ff/*")
diff --git a/network/web/firefox/files/actions.py b/network/web/firefox/files/actions.py
new file mode 100755
index 0000000000..e8fe9ee7fa
--- /dev/null
+++ b/network/web/firefox/files/actions.py
@@ -0,0 +1,97 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Licensed under the GNU General Public License, version 3.
+# See the file http://www.gnu.org/licenses/gpl.txt
+
+import subprocess
+
+from pisi.actionsapi import get
+from pisi.actionsapi import autotools
+from pisi.actionsapi import pisitools
+from pisi.actionsapi import shelltools
+
+#WorkDir = "mozilla-release-6b51784853e47e091d213d421a19cb623af718f0"
+ObjDir = "objdir"
+locales = "az bs ca da de el en-US en-GB es-AR es-CL es-ES fi fr hr hu it lt nl pl pt-BR pt-PT ro ru sr sv-SE tr uk".split()
+xpidir = "%s/xpi" % get.workDIR()
+arch = get.ARCH()
+ver = ".".join(get.srcVERSION().split(".")[:3])
+
+jobs = jobs = "-j"+ subprocess.check_output("nproc 2>/dev/null", shell=True).rstrip("\n")
+
+shelltools.export("SHELL", "/bin/sh")
+shelltools.export("MACH_USE_SYSTEM_PYTHON", "1")
+
+def setup():
+
+ shelltools.system("echo 'Instrumenting Firefox for PGO'")
+ shelltools.system("cp mozconfig-inst .mozconfig")
+
+ # Google API key
+ shelltools.echo("google_api_key", "AIzaSyBINKL31ZYd8W5byPuwTXYK6cEyoceGh6Y")
+ pisitools.dosed(".mozconfig", "%%PWD%%", get.curDIR())
+ pisitools.dosed(".mozconfig", "%%FILE%%", "google_api_key")
+ pisitools.dosed(".mozconfig", "##JOBCOUNT##", jobs)
+
+ # LOCALE
+ shelltools.system("rm -rf langpack-ff/*/browser/defaults")
+ if not shelltools.isDirectory(xpidir): shelltools.makedirs(xpidir)
+ for locale in locales:
+ shelltools.system("wget -c -P %s https://download-origin.cdn.mozilla.net/pub/firefox/releases/%s/linux-%s/xpi/%s.xpi" % (xpidir, ver, arch, locale))
+ #shelltools.makedirs("langpack-ff/langpack-%s@firefox.mozilla.org" % locale)
+ shelltools.makedirs("langpack-ff")
+ #shelltools.system("unzip -uo %s/%s.xpi -d langpack-ff/langpack-%s@firefox.mozilla.org" % (xpidir, locale, locale))
+ shelltools.system("cp %s/%s.xpi langpack-ff/langpack-%s@firefox.mozilla.org.xpi" % (xpidir, locale, locale))
+ print "Replacing browser.properties for %s locale" % locale
+ #shelltools.copy("browserconfig.properties", "langpack-ff/langpack-%s@firefox.mozilla.org/browser/chrome/%s/locale/branding/" % (locale, locale))
+ shelltools.copy("browserconfig.properties", "browser/branding/official/locales/")
+
+ #shelltools.makedirs(ObjDir)
+ #shelltools.cd(ObjDir)
+
+ #shelltools.system("../configure --prefix=/usr --libdir=/usr/lib --disable-strip --disable-install-strip")
+
+
+def build():
+ shelltools.system("echo 'Building instrumented browser'")
+ #shelltools.cd(ObjDir)
+ shelltools.system("./mach build")
+
+ shelltools.system("echo 'Profiling instrumented browser...'")
+ shelltools.system("./mach package")
+ shelltools.system("LLVM_PROFDATA=llvm-profdata \
+ JARLOG_FILE='%s/jarlog' \
+ xvfb-run -s '-screen 0 1920x1080x24 -nolisten local' \
+ ./mach python build/pgo/profileserver.py" %get.curDIR())
+
+ shelltools.system("echo 'Removing instrumented browser...'")
+ shelltools.system("./mach clobber")
+
+ shelltools.system("echo 'Building optimized browser...'")
+ shelltools.system("rm .mozconfig")
+ shelltools.system("cp mozconfig-opt .mozconfig")
+ #shelltools.echo("google_api_key", "AIzaSyBINKL31ZYd8W5byPuwTXYK6cEyoceGh6Y")
+ pisitools.dosed(".mozconfig", "%%PWD%%", get.curDIR())
+ pisitools.dosed(".mozconfig", "%%FILE%%", "google_api_key")
+ pisitools.dosed(".mozconfig", "##JOBCOUNT##", jobs)
+ #shelltools.system("../configure --prefix=/usr --libdir=/usr/lib --disable-strip --disable-install-strip")
+ shelltools.system("./mach build")
+
+def install():
+ #shelltools.cd(ObjDir)
+ shelltools.system("DESTDIR=%s ./mach install " % get.installDIR())
+
+ #shelltools.cd("..")
+
+ # Install language packs
+ pisitools.insinto("/usr/lib/firefox/browser/extensions", "./langpack-ff/*")
+
+ # Create profile dir, we'll copy bookmarks.html in post-install script
+ pisitools.dodir("/usr/lib/firefox/browser/defaults/profile")
+
+ # Install branding icon
+ pisitools.insinto("/usr/share/pixmaps", "browser/branding/official/default256.png", "firefox.png")
+
+ # Install docs
+ pisitools.dodoc("README*", "LICENSE")
diff --git a/network/web/firefox/pspec.xml b/network/web/firefox/pspec.xml
index 493c8ccae6..40dc4f1c34 100644
--- a/network/web/firefox/pspec.xml
+++ b/network/web/firefox/pspec.xml
@@ -18,9 +18,9 @@
https://ftp.mozilla.org/pub/firefox/releases/89.0.1/source/firefox-89.0.1.source.tar.xz
-
- mozconfig-inst
- mozconfig-opt
+ mozconfig
+
+
configure
pisilinux/browserconfig.properties