root/pbibuild/modules/firefox/build.sh

Revision 1138, 1.6 kB (checked in by kris, 8 months ago)

Fixed bug in FF build script

  • Property svn:executable set to *
Line 
1#!/bin/sh
2# PBI building script
3# This will run after your port build is complete
4# Build your PBI here, and exit 0 on success, or exit 1 on failure.
5##############################################################################
6# Available Variables
7#    PBIDIR = The location of where you can populate your PBI directory
8# MODULEDIR = The location of the module directory for this PBI
9#   PORTVER = Version number of the port we used to build
10##############################################################################
11
12# We need to modify the bin/firefox script to point to the PBI directory
13# properly
14
15rm /tmp/ff-fixed
16while read line
17do
18
19  echo $line | grep '^moz_libdir=' >/dev/null 2>/dev/null
20  if [ "$?" = "0" ]
21  then
22    echo "moz_libdir=\"/Programs/Firefox${PORTVER}/autolibs/firefox\"" >>/tmp/ff-fixed
23  else
24    echo "${line}" >> /tmp/ff-fixed
25  fi
26
27done < ${PBIDIR}/bin/firefox
28
29cp /tmp/ff-fixed ${PBIDIR}/bin/firefox
30chmod 755 ${PBIDIR}/bin/firefox
31
32
33# Save the right version number in the removepbi.sh script
34sed -e "s,CHANGEME,Firefox${PORTVER},g" ${PBIDIR}/scripts/removepbi.sh > /tmp/removepbi.sh
35mv /tmp/removepbi.sh ${PBIDIR}/scripts/removepbi.sh
36chmod 755 ${PBIDIR}/scripts/removepbi.sh
37
38rm -rf /${PBIDIR}/autolibs/firefox/extensions/lang*
39
40# Copy over the lang-packs
41tar cvf - -C /usr/local/lib/xpi/ . | tar xvf - -C ${PBIDIR}/autolibs/firefox/extensions/
42
43# Now append our prefs file with the default email script
44echo "pref(\"network.protocol-handler.app.mailto\", \"/Programs/Firefox${PORTVER}/bin/defaultemail\");" >> ${PBIDIR}/autolibs/firefox/greprefs/all.js
Note: See TracBrowser for help on using the browser.