wok view firefox/receipt @ rev 20250

firefox: force 32 bits arch
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 12 16:48:27 2018 +0100 (2018-03-12)
parents 5d53e8ccbc8d
children c636d36601ac
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox"
4 VERSION="17.0.11esr"
5 CATEGORY="network"
6 SHORT_DESC="User friendly, secure and fast web browser."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="MPL2"
9 TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
10 WEB_SITE="http://www.mozilla.org/firefox"
11 WGET_URL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
12 TAGS="web-browser"
14 DEPENDS="gtk+ sqlite dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage \
15 alsa-lib xorg-libXt libevent libvpx pango nss sqlite libfirefox"
16 BUILD_DEPENDS="zip libIDL coreutils findutils wireless_tools-dev \
17 perl python yasm alsa-lib-dev mesa-dev libevent-dev libvpx-dev dbus-dev \
18 dbus-glib-dev gtk+-dev glib-dev pango-dev nss-dev sqlite-dev tar gzip"
20 # Rules to configure and make the package.
21 #
22 # A long compile time... dont forget to build libidl before and check the
23 # .mozconfig file from the stuff and the stuff/README document.
24 #
25 # WARNING: 1GB RAM minimum. Additional RAM will significantly decrease
26 # build time.
27 # At least 2.5 GB free disk space
29 compile_rules()
30 {
31 grep -rsl 'uname -m' $src | xargs sed -i 's|uname -m|echo i686|'
33 # load mozconfig
34 cp -a $stuff/mozconfig $src
36 # build firefox and create a firefox tarball
37 # reducing log size: hide c++, nsinstall, python msgs
38 # Exception... Component returned failure code: known bug #696763
39 make -f client.mk | egrep -v "c++|nsinstall|python" &&
40 make -C obj-firefox/browser/installer
42 # install
43 # locate tarball
44 local tarball tarpath fn1 fn2
45 tarpath=$src/obj-firefox/dist
46 fn1="$tarpath/firefox-${VERSION%esr}.en-US.linux-$ARCH.tar.bz2"
47 fn2="$tarpath/firefox-${VERSION%esr}.en-US.linux-$(uname -m).tar.bz2"
48 [ -e "$fn1" ] && tarball="$fn1" && echo "$ARCH tarball found"
49 [ -e "$fn2" ] && tarball="$fn2" && echo "$(uname -m) tarball found"
50 [ -z "$tarball" ] && echo "ERROR: tarball not found" && exit 1
51 # extract tarball
52 mkdir -p $install/usr/lib/firefox-$VERSION &&
53 tar -xvf $tarball -C $install/usr/lib/firefox-$VERSION \
54 --strip-components=1 &&
55 chown -R -v root:root $install/usr/lib/firefox-$VERSION &&
56 chmod -v 755 $install/usr/lib/firefox-$VERSION/libxpcom.so &&
57 # install symlink in /usr/bin
58 mkdir -p $install/usr/bin &&
59 ln -sf ../lib/firefox-$VERSION/firefox $install/usr/bin &&
60 # install symlink for plugins
61 mkdir -p $install/usr/lib/mozilla/plugins &&
62 ln -sf ../mozilla/plugins $install/usr/lib/firefox-$VERSION
63 }
65 # Rules to gen a SliTaz package suitable for Tazpkg.
66 genpkg_rules()
67 {
68 # program
69 printf "Installing program.."
70 mkdir -p $fs/usr/lib &&
71 cp -a $install/usr/lib/$PACKAGE-$VERSION $fs/usr/lib &&
72 cp -a $install/usr/lib/mozilla $fs/usr/lib &&
73 cp -a $install/usr/bin $fs/usr
74 status
76 # search Plugin (by: oddball)
77 printf "Installing SliTaz search plugins.."
78 cp -a $stuff/searchplugins $fs/usr/lib/$PACKAGE-$VERSION
79 status
81 # prefs
82 printf "Installing SliTaz preferences.."
83 mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/distribution &&
84 cp -a $stuff/distribution.ini $fs/usr/lib/$PACKAGE-$VERSION/distribution
85 status
87 # mozilla-common files
88 # dictionaries
89 printf "Installing common dictionnaries.."
90 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries &&
91 ln -sf ../mozilla-common-$VERSION/dictionaries \
92 $fs/usr/lib/$PACKAGE-$VERSION/dictionaries
93 status
94 # plugin-container
95 printf "Installing common plugin-container"
96 rm -f $fs/usr/lib/$PACKAGE-$VERSION/plugin-container &&
97 ln -sf ../mozilla-common-$VERSION/plugin-container \
98 $fs/usr/lib/$PACKAGE-$VERSION/plugin-container
99 status
100 # mozilla-xremote-client
101 printf "Installing common mozilla-xremote-client"
102 rm -f $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client &&
103 ln -sf ../mozilla-common-$VERSION/mozilla-xremote-client \
104 $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client
105 status
106 # components/libdbusservice.so
107 # components/libmozgnome.so
108 for file in libdbusservice.so libmozgnome.so; do
109 printf "Installing common components/$file"
110 rm -f $fs/usr/lib/$PACKAGE-$VERSION/components/$file &&
111 ln -sf ../../mozilla-common-$VERSION/components/$file \
112 $fs/usr/lib/$PACKAGE-$VERSION/components/$file
113 status
114 done
115 # chrome.manifest
116 printf "Installing common chrome.manifest"
117 rm -f $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest &&
118 ln -sf ../mozilla-common-$VERSION/chrome.manifest \
119 $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest
120 status
122 # run-mozilla.sh
123 printf "Installing common run-mozilla.sh"
124 rm -f $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh &&
125 ln -sf ../mozilla-common-$VERSION/run-mozilla.sh \
126 $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh
127 status
129 # libmozalloc.so
130 printf "Installing common libmozalloc.so"
131 rm -f $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so &&
132 ln -sf ../mozilla-common-$VERSION/libmozalloc.so \
133 $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so
134 status
136 chown -R root.root $fs
137 }