[Lunar-commits] <moonbase> firefox4: new firefox module: 4.0b8

Zbigniew Luszpinski zbiggy at lunar-linux.org
Sun Jan 2 13:07:59 CET 2011


commit 7d2716600e4fd5432720efcf766f59233598d127
Author: Zbigniew Luszpinski <zbiggy at lunar-linux.org>
Date:   Sun Jan 2 13:07:59 2011 +0100

    firefox4: new firefox module: 4.0b8
---
 web/firefox/CONFLICTS        |    1 +
 web/firefox4/BUILD           |   96 ++++++++++++++++++++++++++++++++++++++++++
 web/firefox4/BUILD.x86_64    |   96 ++++++++++++++++++++++++++++++++++++++++++
 web/firefox4/CONFIGURE       |    2 +
 web/firefox4/CONFLICTS       |    1 +
 web/firefox4/DEPENDS         |   25 +++++++++++
 web/firefox4/DETAILS         |   42 ++++++++++++++++++
 web/firefox4/POST_INSTALL    |   17 +++++++
 web/firefox4/POST_REMOVE     |    4 ++
 web/firefox4/PRE_BUILD       |    5 ++
 web/firefox4/firefox.desktop |   11 +++++
 web/firefox4/mozconfig       |   38 ++++++++++++++++
 12 files changed, 338 insertions(+), 0 deletions(-)

diff --git a/web/firefox/CONFLICTS b/web/firefox/CONFLICTS
new file mode 100644
index 0000000..662fd5c
--- /dev/null
+++ b/web/firefox/CONFLICTS
@@ -0,0 +1 @@
+conflicts firefox4
diff --git a/web/firefox4/BUILD b/web/firefox4/BUILD
new file mode 100644
index 0000000..45aafdb
--- /dev/null
+++ b/web/firefox4/BUILD
@@ -0,0 +1,96 @@
+(
+
+  MOZILLA_DIR=mozilla-central
+
+  if module_is_expired $MODULE && [ "$VERSION" != "`installed_version $MODULE`" ]; then
+        set_module_config OLD_VER "`installed_version $MODULE`"
+  fi  &&
+
+  export MOZILLA_HOME=/usr/lib/firefox-$VERSION
+  export MOZ_CO_PROJECT=browser
+  export MOZILLA_OFFICIAL=1
+  export BUILD_OFFICIAL=1
+
+  # This should always be just a link
+  rm -rf $MOZILLA_HOME/plugins  &&
+
+  cp $SCRIPT_DIRECTORY/mozconfig $MOZILLA_DIR/  &&
+
+  export MOZ_OBJDIR="${SOURCE_DIRECTORY}/build-mozilla"
+  mkdir -p ${MOZ_OBJDIR}  &&
+
+  cd $MOZILLA_DIR  &&
+
+  echo "ac_add_options --disable-necko-wifi" >> mozconfig
+  echo "ac_add_options --disable-system-sqlite" >> mozconfig
+
+  #Add DEPENDS options
+
+  if in_depends $MODULE "xulrunner" ; then
+    XUL=`module_version xulrunner`
+    echo "ac_add_options --with-libxul-sdk=/usr/lib/xulrunner-devel-$XUL" >> mozconfig
+  fi  &&
+
+  if in_depends $MODULE gnome-vfs ; then
+    echo "ac_add_options --enable-gnomevfs" >> mozconfig
+  else
+    echo "ac_add_options --disable-gnomevfs" >> mozconfig
+  fi  &&
+
+  if in_depends $MODULE sun-jdk ; then
+    echo "ac_add_options --with-java-include-path=/usr/java/default/include" >> mozconfig
+    echo "ac_add_options --with-java-bin-path=/usr/java/default/bin" >> mozconfig
+    echo "ac_add_options --enable-javaxpcom" >> mozconfig
+  fi  &&
+
+  #Add CONFIGURE options
+
+  if [ "$SAFE" == "y" ] ; then
+    echo "ac_add_options --enable-safe-browsing" >> mozconfig
+  fi  &&
+
+  setterm -bfreq -blength &&
+
+  #Finally, the build!
+  if [ "$PGO" == "y" ] ; then
+    #CCache breaks the pgo build
+    export CCACHE_DISABLE=1
+    echo "ac_add_options --enable-profile-guided-optimization" >> mozconfig  &&
+    echo "mk_add_options PROFILE_GEN_SCRIPT='python $MOZ_OBJDIR/_profile/pgo/profileserver.py'" >> mozconfig  &&
+    make -f client.mk build &&
+    make -f client.mk profiledbuild
+  else
+    make -f client.mk build
+  fi  &&
+
+  cd ${MOZ_OBJDIR}  &&
+  prepare_install   &&
+  make install      &&
+
+  # Put some important headers in place
+  mkdir -p /usr/include/firefox-$VERSION/nss  &&
+  cp -Lf dist/private/nss/*.h dist/public/nss/*.h /usr/include/firefox-$VERSION/nss  &&
+
+  # Install the plugins in the right directories
+  mkdir -p /opt/lunar/plugins  &&
+# There is no plugins in beta8 version of the Firefox
+#  for plugin in `ls $MOZILLA_HOME/plugins`; do
+#       `install -m755 $MOZILLA_HOME/plugins/$plugin /opt/lunar/plugins`; done  &&
+
+  rm -rf $MOZILLA_HOME/plugins  &&
+  ln -snf /opt/lunar/plugins $MOZILLA_HOME/plugins  &&
+
+  # Now the .desktop file and the icon
+  mkdir -p /usr/share/applications /usr/share/pixmaps  &&
+  install -m644 $SCRIPT_DIRECTORY/firefox.desktop /usr/share/applications  &&
+  # please, dont just let the lin fail because /usr/share/pixmaps/firefox48.png is an existing symlink...
+  rm -f /usr/share/pixmaps/firefox48.png  &&
+  install -m644 $MOZILLA_HOME/chrome/icons/default/default48.png /usr/share/pixmaps/firefox48.png  &&
+
+  # Make firefox use its own icon
+  for icon in `ls $MOZILLA_HOME/icons`; do
+    ln -sf $MOZILLA_HOME/icons/$icon \
+           $MOZILLA_HOME/chrome/icons/default/$icon
+  done
+
+) > $C_FIFO 2>&1
diff --git a/web/firefox4/BUILD.x86_64 b/web/firefox4/BUILD.x86_64
new file mode 100644
index 0000000..45aafdb
--- /dev/null
+++ b/web/firefox4/BUILD.x86_64
@@ -0,0 +1,96 @@
+(
+
+  MOZILLA_DIR=mozilla-central
+
+  if module_is_expired $MODULE && [ "$VERSION" != "`installed_version $MODULE`" ]; then
+        set_module_config OLD_VER "`installed_version $MODULE`"
+  fi  &&
+
+  export MOZILLA_HOME=/usr/lib/firefox-$VERSION
+  export MOZ_CO_PROJECT=browser
+  export MOZILLA_OFFICIAL=1
+  export BUILD_OFFICIAL=1
+
+  # This should always be just a link
+  rm -rf $MOZILLA_HOME/plugins  &&
+
+  cp $SCRIPT_DIRECTORY/mozconfig $MOZILLA_DIR/  &&
+
+  export MOZ_OBJDIR="${SOURCE_DIRECTORY}/build-mozilla"
+  mkdir -p ${MOZ_OBJDIR}  &&
+
+  cd $MOZILLA_DIR  &&
+
+  echo "ac_add_options --disable-necko-wifi" >> mozconfig
+  echo "ac_add_options --disable-system-sqlite" >> mozconfig
+
+  #Add DEPENDS options
+
+  if in_depends $MODULE "xulrunner" ; then
+    XUL=`module_version xulrunner`
+    echo "ac_add_options --with-libxul-sdk=/usr/lib/xulrunner-devel-$XUL" >> mozconfig
+  fi  &&
+
+  if in_depends $MODULE gnome-vfs ; then
+    echo "ac_add_options --enable-gnomevfs" >> mozconfig
+  else
+    echo "ac_add_options --disable-gnomevfs" >> mozconfig
+  fi  &&
+
+  if in_depends $MODULE sun-jdk ; then
+    echo "ac_add_options --with-java-include-path=/usr/java/default/include" >> mozconfig
+    echo "ac_add_options --with-java-bin-path=/usr/java/default/bin" >> mozconfig
+    echo "ac_add_options --enable-javaxpcom" >> mozconfig
+  fi  &&
+
+  #Add CONFIGURE options
+
+  if [ "$SAFE" == "y" ] ; then
+    echo "ac_add_options --enable-safe-browsing" >> mozconfig
+  fi  &&
+
+  setterm -bfreq -blength &&
+
+  #Finally, the build!
+  if [ "$PGO" == "y" ] ; then
+    #CCache breaks the pgo build
+    export CCACHE_DISABLE=1
+    echo "ac_add_options --enable-profile-guided-optimization" >> mozconfig  &&
+    echo "mk_add_options PROFILE_GEN_SCRIPT='python $MOZ_OBJDIR/_profile/pgo/profileserver.py'" >> mozconfig  &&
+    make -f client.mk build &&
+    make -f client.mk profiledbuild
+  else
+    make -f client.mk build
+  fi  &&
+
+  cd ${MOZ_OBJDIR}  &&
+  prepare_install   &&
+  make install      &&
+
+  # Put some important headers in place
+  mkdir -p /usr/include/firefox-$VERSION/nss  &&
+  cp -Lf dist/private/nss/*.h dist/public/nss/*.h /usr/include/firefox-$VERSION/nss  &&
+
+  # Install the plugins in the right directories
+  mkdir -p /opt/lunar/plugins  &&
+# There is no plugins in beta8 version of the Firefox
+#  for plugin in `ls $MOZILLA_HOME/plugins`; do
+#       `install -m755 $MOZILLA_HOME/plugins/$plugin /opt/lunar/plugins`; done  &&
+
+  rm -rf $MOZILLA_HOME/plugins  &&
+  ln -snf /opt/lunar/plugins $MOZILLA_HOME/plugins  &&
+
+  # Now the .desktop file and the icon
+  mkdir -p /usr/share/applications /usr/share/pixmaps  &&
+  install -m644 $SCRIPT_DIRECTORY/firefox.desktop /usr/share/applications  &&
+  # please, dont just let the lin fail because /usr/share/pixmaps/firefox48.png is an existing symlink...
+  rm -f /usr/share/pixmaps/firefox48.png  &&
+  install -m644 $MOZILLA_HOME/chrome/icons/default/default48.png /usr/share/pixmaps/firefox48.png  &&
+
+  # Make firefox use its own icon
+  for icon in `ls $MOZILLA_HOME/icons`; do
+    ln -sf $MOZILLA_HOME/icons/$icon \
+           $MOZILLA_HOME/chrome/icons/default/$icon
+  done
+
+) > $C_FIFO 2>&1
diff --git a/web/firefox4/CONFIGURE b/web/firefox4/CONFIGURE
new file mode 100644
index 0000000..c8311d9
--- /dev/null
+++ b/web/firefox4/CONFIGURE
@@ -0,0 +1,2 @@
+mquery PGO "Build with Profile Guided Optimization?"  y  "--enable-profile-guided-optimization"  ""
+mquery SAFE "Enable safe browsing (anti-phishing)?"  y  "--enable-safe-browsing"  ""
diff --git a/web/firefox4/CONFLICTS b/web/firefox4/CONFLICTS
new file mode 100644
index 0000000..db109b6
--- /dev/null
+++ b/web/firefox4/CONFLICTS
@@ -0,0 +1 @@
+conflicts firefox
diff --git a/web/firefox4/DEPENDS b/web/firefox4/DEPENDS
new file mode 100644
index 0000000..65e2c11
--- /dev/null
+++ b/web/firefox4/DEPENDS
@@ -0,0 +1,25 @@
+depends ORBit2
+depends zip
+depends unzip
+depends gtk+-2
+depends nss
+depends curl
+depends libnotify
+depends alsa-lib
+
+# Firefox crashes with sqlite 3.6.18 when adding new bookmarks:
+# https://bugzilla.mozilla.org/show_bug.cgi?id=512940
+# Comment 9:  "System SQLite isn't supported by Mozilla (in fact we discourage its use)"
+# So, disable the option to use system sqlite - instead, use Mozilla's version
+#optional_depends "sqlite"  ""  ""  \
+#                 "Use system sqlite"
+
+optional_depends "Python"           ""  ""  "Needed to do a Profile Guided Optimization build"
+optional_depends "flash-plugin-10"  ""  ""  "To enable Flash plugin"
+optional_depends "gnome-vfs"        ""  ""  "For Gnome VFS support"
+optional_depends "hunspell"         ""  ""  "For spelling support"
+
+optional_depends "dbus-glib"       \
+                 "--enable-dbus"   \
+                 "--disable-dbus"  \
+                 "for dbus support"
diff --git a/web/firefox4/DETAILS b/web/firefox4/DETAILS
new file mode 100644
index 0000000..752e05b
--- /dev/null
+++ b/web/firefox4/DETAILS
@@ -0,0 +1,42 @@
+          MODULE=firefox4
+         VERSION=4.0b8
+          SOURCE=firefox-$VERSION.source.tar.bz2
+   SOURCE_URL[0]=ftp://ftp.pwr.wroc.pl/pub/mozilla/firefox/releases/$VERSION/source
+   SOURCE_URL[1]=ftp://ftp.uni-erlangen.de/pub/mozilla.org/firefox/releases/$VERSION/source
+   SOURCE_URL[2]=ftp://mozilla.isc.org/pub/mozilla.org/firefox/releases/$VERSION/source
+   SOURCE_URL[3]=ftp://ftp.mozilla.org/pub/firefox/releases/$VERSION/source
+      SOURCE_VFY=sha1:40ba6915d736d69e3bcc64365002eedf4a02c8d3
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/mozilla-central
+        WEB_SITE=http://www.mozilla.org/projects/firefox
+         ENTERED=20030810
+         UPDATED=20101227
+      MAINTAINER="tchan at lunar-linux.org"
+           PSAFE=no
+           SHORT="A speedy, full-featured web browser"
+KEEP_SOURCE=on
+cat << EOF
+Mozilla Firefox is the successor of Mozilla Firebird.
+
+Firefox includes:
+  * comprehensive popup controls to keep unwanted advertising off
+    your desktop
+  * a tab browsing mode that lets you open several pages in a single
+    window, allowing you to load links in the background without
+    leaving the page you're on
+  * integrated Google search
+  * industry leading accessibility with Find As You Type - find links
+    and page text by simply typing
+  * simplified privacy controls that let you cover your tracks more
+    effectively
+  * a streamlined browser window that lets you see more of the page
+    than any other browser while at the same time being more
+    configurable
+  * a large variety of free downloadable extensions and themes that
+    add specific functionality and visual changes to the browser
+
+------- NOTE -------
+The Lunar version of Firefox has crypto enabled and uses only gtk+-2.
+NOTHING ELSE IS CONFIGURED IN! No mail, irc, composer, gpg, calendar,
+MathML, Javascript debugger, html code inspector, LDAP, help support.
+If you want any of that use the regular seamonkey module.
+EOF
diff --git a/web/firefox4/POST_INSTALL b/web/firefox4/POST_INSTALL
new file mode 100644
index 0000000..c80ccb2
--- /dev/null
+++ b/web/firefox4/POST_INSTALL
@@ -0,0 +1,17 @@
+OLD_VER="`get_module_config OLD_VER`"
+FIREFOX_HOME=/usr
+FFOX_LIBDIR=firefox-$VERSION
+
+if [ ! -z "$OLD_VER" ]; then
+  for old_version in $OLD_VER
+  do
+    rm -rf /usr/lib/firefox-$old_version
+    rm -rf /usr/lib/firefox-devel-$old_version
+  done
+fi
+
+unset_module_config OLD_VER
+
+export LD_LIBRARY_PATH="$FIREFOX_HOME/lib/$FFOX_LIBDIR:$FIREFOX_HOME/lib/$FFOX_LIBDIR/plugins:$FIREFOX_HOME/lib/$FFOX_LIBDIR/components"
+export MOZILLA_FIVE_HOME="$FIREFOX_HOME/lib/$FFOX_LIBDIR"
+ldconfig
diff --git a/web/firefox4/POST_REMOVE b/web/firefox4/POST_REMOVE
new file mode 100644
index 0000000..a46a092
--- /dev/null
+++ b/web/firefox4/POST_REMOVE
@@ -0,0 +1,4 @@
+rm -f  /usr/share/pixmaps/firefox48.png
+rm -rf /usr/include/firefox-$VERSION
+rm -rf /usr/lib/firefox-$VERSION
+rm -rf /usr/lib/firefox-devel-$VERSION
diff --git a/web/firefox4/PRE_BUILD b/web/firefox4/PRE_BUILD
new file mode 100644
index 0000000..cc901d0
--- /dev/null
+++ b/web/firefox4/PRE_BUILD
@@ -0,0 +1,5 @@
+validate_source_dir &&
+mk_source_dir &&
+
+cd $SOURCE_DIRECTORY &&
+unpack $SOURCE
diff --git a/web/firefox4/firefox.desktop b/web/firefox4/firefox.desktop
new file mode 100644
index 0000000..d750023
--- /dev/null
+++ b/web/firefox4/firefox.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Firefox
+Comment=Firefox Web Browser
+Exec=firefox
+Icon=/usr/share/pixmaps/firefox48.png
+Terminal=false
+Type=Application
+Categories=Application;Network;
+Comment[pl]=Firefox - przeglÄ…darka WWW
+X-KDE-StartupNotify=true
diff --git a/web/firefox4/mozconfig b/web/firefox4/mozconfig
new file mode 100644
index 0000000..91b3757
--- /dev/null
+++ b/web/firefox4/mozconfig
@@ -0,0 +1,38 @@
+ac_add_options --prefix=/usr
+ac_add_options --with-x
+ac_add_options --with-pthreads
+ac_add_options --with-default-mozilla-five-home=$MOZILLA_HOME
+ac_add_options --with-user-appdir=".firefox"
+ac_add_options --with-system-zlib
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-bz2
+ac_add_options --enable-storage
+ac_add_options --enable-places
+ac_add_options --enable-application=browser
+ac_add_options --enable-default-toolkit=cairo-gtk2
+ac_add_options --enable-optimize="$CFLAGS"
+ac_add_options --enable-crypto
+ac_add_options --enable-strip
+ac_add_options --enable-canvas
+ac_add_options --enable-svg
+ac_add_options --enable-system-cairo
+ac_add_options --enable-xterm-updates
+ac_add_options --enable-libxul
+ac_add_options --enable-official-branding
+ac_add_options --enable-jemalloc
+ac_add_options --disable-debug
+ac_add_options --disable-tests
+ac_add_options --disable-installer
+ac_add_options --disable-pedantic
+ac_add_options --disable-logging
+ac_add_options --disable-accessibility
+ac_add_options --enable-mathml
+ac_add_options --disable-os2-high-mem
+ac_add_options --with-system-libevent
+ac_add_options --enable-gio
+ac_add_options --enable-raw
+ac_add_options --with-system-libvpx
+ac_add_options --enable-splashscreen
+ac_add_options --enable-url-classifier
+ac_add_options --enable-shared-js
+ac_add_options --enable-system-pixman


More information about the Lunar-commits mailing list