wok-next annotate firefox/receipt @ rev 20170

firefox: receipt v2
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 01 20:21:41 2017 +0100 (2017-11-01)
parents 2809ecb8c754
children 48817c16eab3
rev   line source
pascal@20170 1 # SliTaz package receipt v2.
pankso@45 2
pankso@45 3 PACKAGE="firefox"
domcox@15533 4 VERSION="17.0.11esr"
pankso@197 5 CATEGORY="network"
pankso@45 6 SHORT_DESC="User friendly, secure and fast web browser."
pankso@45 7 MAINTAINER="pankso@slitaz.org"
pascal@15215 8 LICENSE="MPL2"
pankso@4079 9 TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
domcox@14210 10 WEB_SITE="http://www.mozilla.org/firefox"
slaxemulator@11324 11 WGET_URL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
al@17501 12 TAGS="web-browser"
pankso@45 13
pascal@20098 14 DEPENDS="gtk+ sqlite3 dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage \
pascal@20098 15 alsa-lib xorg-libXt libevent libvpx pango nss libfirefox"
slaxemulator@11324 16 BUILD_DEPENDS="zip libIDL coreutils findutils wireless_tools-dev \
pascal@12628 17 perl python yasm alsa-lib-dev mesa-dev libevent-dev libvpx-dev dbus-dev \
pascal@20098 18 dbus-glib-dev gtk+-dev glib-dev pango-dev nss-dev sqlite3-dev tar gzip"
pascal@20170 19 SPLIT="firefox firefox-dev libfirefox"
pankso@10737 20
pankso@45 21 # Rules to configure and make the package.
pankso@45 22 #
pankso@45 23 # A long compile time... dont forget to build libidl before and check the
pankso@45 24 # .mozconfig file from the stuff and the stuff/README document.
pankso@45 25 #
domcox@14210 26 # WARNING: 1GB RAM minimum. Additional RAM will significantly decrease
domcox@14210 27 # build time.
domcox@14210 28 # At least 2.5 GB free disk space
domcox@14210 29
pankso@45 30 compile_rules()
pankso@45 31 {
domcox@14210 32 # load mozconfig
domcox@14210 33 cp -a $stuff/mozconfig $src
slaxemulator@11324 34
domcox@14210 35 # build firefox and create a firefox tarball
domcox@14210 36 # reducing log size: hide c++, nsinstall, python msgs
domcox@14210 37 # Exception... Component returned failure code: known bug #696763
domcox@14210 38 make -f client.mk | egrep -v "c++|nsinstall|python" &&
domcox@14210 39 make -C obj-firefox/browser/installer
slaxemulator@11324 40
domcox@14210 41 # install
domcox@14210 42 # locate tarball
domcox@14210 43 local tarball tarpath fn1 fn2
domcox@14210 44 tarpath=$src/obj-firefox/dist
domcox@14210 45 fn1="$tarpath/firefox-${VERSION%esr}.en-US.linux-$ARCH.tar.bz2"
domcox@14210 46 fn2="$tarpath/firefox-${VERSION%esr}.en-US.linux-$(uname -m).tar.bz2"
domcox@14210 47 [ -e "$fn1" ] && tarball="$fn1" && echo "$ARCH tarball found"
domcox@14210 48 [ -e "$fn2" ] && tarball="$fn2" && echo "$(uname -m) tarball found"
domcox@14210 49 [ -z "$tarball" ] && echo "ERROR: tarball not found" && exit 1
domcox@14210 50 # extract tarball
domcox@14210 51 mkdir -p $install/usr/lib/firefox-$VERSION &&
domcox@14210 52 tar -xvf $tarball -C $install/usr/lib/firefox-$VERSION \
domcox@14210 53 --strip-components=1 &&
domcox@14210 54 chown -R -v root:root $install/usr/lib/firefox-$VERSION &&
domcox@14210 55 chmod -v 755 $install/usr/lib/firefox-$VERSION/libxpcom.so &&
domcox@14210 56 # install symlink in /usr/bin
domcox@14210 57 mkdir -p $install/usr/bin &&
domcox@14210 58 ln -sf ../lib/firefox-$VERSION/firefox $install/usr/bin &&
domcox@14210 59 # install symlink for plugins
domcox@14210 60 mkdir -p $install/usr/lib/mozilla/plugins &&
domcox@14210 61 ln -sf ../mozilla/plugins $install/usr/lib/firefox-$VERSION
pankso@45 62 }
pankso@45 63
pankso@45 64 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@45 65 genpkg_rules()
pankso@45 66 {
pascal@20170 67 case $PACKAGE in
pascal@20170 68 firefox)
pascal@20170 69 # program
pascal@20170 70 printf "Installing program.."
pascal@20170 71 mkdir -p $fs/usr/lib &&
pascal@20170 72 cp -a $install/usr/lib/$PACKAGE-$VERSION $fs/usr/lib &&
pascal@20170 73 cp -a $install/usr/lib/mozilla $fs/usr/lib &&
pascal@20170 74 cp -a $install/usr/bin $fs/usr
pascal@20170 75 status
pankso@45 76
pascal@20170 77 # search Plugin (by: oddball)
pascal@20170 78 printf "Installing SliTaz search plugins.."
pascal@20170 79 cp -a $stuff/searchplugins $fs/usr/lib/$PACKAGE-$VERSION
pascal@20170 80 status
pankso@45 81
pascal@20170 82 # prefs
pascal@20170 83 printf "Installing SliTaz preferences.."
pascal@20170 84 mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/distribution &&
pascal@20170 85 cp -a $stuff/distribution.ini $fs/usr/lib/$PACKAGE-$VERSION/distribution
pascal@20170 86 status
slaxemulator@9382 87
pascal@20170 88 # mozilla-common files
pascal@20170 89 # dictionaries
pascal@20170 90 printf "Installing common dictionnaries.."
pascal@20170 91 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries &&
pascal@20170 92 ln -sf ../mozilla-common-$VERSION/dictionaries \
pascal@20170 93 $fs/usr/lib/$PACKAGE-$VERSION/dictionaries
domcox@14210 94 status
pascal@20170 95 # plugin-container
pascal@20170 96 printf "Installing common plugin-container"
pascal@20170 97 rm -f $fs/usr/lib/$PACKAGE-$VERSION/plugin-container &&
pascal@20170 98 ln -sf ../mozilla-common-$VERSION/plugin-container \
pascal@20170 99 $fs/usr/lib/$PACKAGE-$VERSION/plugin-container
pascal@20170 100 status
pascal@20170 101 # mozilla-xremote-client
pascal@20170 102 printf "Installing common mozilla-xremote-client"
pascal@20170 103 rm -f $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client &&
pascal@20170 104 ln -sf ../mozilla-common-$VERSION/mozilla-xremote-client \
pascal@20170 105 $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client
pascal@20170 106 status
pascal@20170 107 # components/libdbusservice.so
pascal@20170 108 # components/libmozgnome.so
pascal@20170 109 for file in libdbusservice.so libmozgnome.so; do
pascal@20170 110 printf "Installing common components/$file"
pascal@20170 111 rm -f $fs/usr/lib/$PACKAGE-$VERSION/components/$file &&
pascal@20170 112 ln -sf ../../mozilla-common-$VERSION/components/$file \
pascal@20170 113 $fs/usr/lib/$PACKAGE-$VERSION/components/$file
pascal@20170 114 status
pascal@20170 115 done
pascal@20170 116 # chrome.manifest
pascal@20170 117 printf "Installing common chrome.manifest"
pascal@20170 118 rm -f $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest &&
pascal@20170 119 ln -sf ../mozilla-common-$VERSION/chrome.manifest \
pascal@20170 120 $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest
pascal@20170 121 status
pascal@20170 122
pascal@20170 123 # run-mozilla.sh
pascal@20170 124 printf "Installing common run-mozilla.sh"
pascal@20170 125 rm -f $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh &&
pascal@20170 126 ln -sf ../mozilla-common-$VERSION/run-mozilla.sh \
pascal@20170 127 $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh
pascal@20170 128 status
pascal@20170 129
pascal@20170 130 # libmozalloc.so
pascal@20170 131 printf "Installing common libmozalloc.so"
pascal@20170 132 rm -f $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so &&
pascal@20170 133 ln -sf ../mozilla-common-$VERSION/libmozalloc.so \
pascal@20170 134 $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so
pascal@20170 135 status
pascal@20170 136
pascal@20170 137 chown -R root.root $fs
pascal@20170 138 ;;
pascal@20170 139 firefox-dev)
pascal@20170 140 CAT="development|firefox devel files"
pascal@20170 141 DEPENDS="alsa-lib sqlite3 cairo dbus-glib pango atk \
pascal@20170 142 glib xorg-libXt xorg-libXinerama \
pascal@20170 143 xorg-libXcursor xorg-libXcomposite xorg-libXext \
pascal@20170 144 xorg-libXdamage libxcb xorg-libSM xorg-libICE pkg-config"
pascal@20170 145 printf "Installing include files.."
pascal@20170 146 mkdir -p $fs/usr/include/$WANTED-$VERSION &&
pascal@20170 147 cp -rL $src/obj-firefox/dist/include/* $fs/usr/include/$WANTED-$VERSION
pascal@20170 148 status
pascal@20170 149
pascal@20170 150 printf "Installing libs files.."
pascal@20170 151 mkdir -p $fs/usr/lib/$WANTED-devel/sdk/bin/ply &&
pascal@20170 152 cp -rL $src/obj-firefox/dist/sdk/bin/*.py \
pascal@20170 153 $fs/usr/lib/$WANTED-devel/sdk/bin &&
pascal@20170 154 cp -rL $src/obj-firefox/dist/sdk/bin/ply/*.py \
pascal@20170 155 $fs/usr/lib/$WANTED-devel/sdk/bin/ply &&
pascal@20170 156 mkdir -p $fs/usr/lib/$WANTED-devel/sdk/lib &&
pascal@20170 157 cp -rL $src/obj-firefox/dist/sdk/lib/* \
pascal@20170 158 $fs/usr/lib/$WANTED-devel/sdk/lib
pascal@20170 159 status
pascal@20170 160
pascal@20170 161 # printf "Installing npapi files.."
pascal@20170 162 # mkdir -v $fs/usr/include/$WANTED-$VERSION/npapi &&
pascal@20170 163 # cp -a $src/dom/plugins/base/*.h $fs/usr/include/$WANTED-$VERSION/npapi
pascal@20170 164 # status
pascal@20170 165
pascal@20170 166 # /usr/share/idl folder should also be in firefox-dev
pascal@20170 167 printf "Installing idl files.."
pascal@20170 168 mkdir -p $fs/usr/share/$WANTED-$VERSION/idl &&
pascal@20170 169 cp -rL $src/obj-firefox/dist/idl/* $fs/usr/share/$WANTED-$VERSION/idl
pascal@20170 170 status
pascal@20170 171
pascal@20170 172 # copy missing *.pc files
pascal@20170 173 printf "Installing pkgconfig files.."
pascal@20170 174 mkdir -p $fs/usr/lib/pkgconfig &&
pascal@20170 175 cp -a $stuff/*.pc $fs/usr/lib/pkgconfig &&
pascal@20170 176 # fix version
pascal@20170 177 sed -i "s/VERSION/$VERSION/" $fs/usr/lib/pkgconfig/*
pascal@20170 178 status
pascal@20170 179 ;;
pascal@20170 180 libfirefox)
pascal@20170 181 CAT="network|firefox/thunderbird common files"
pascal@20170 182 DEPENDS="gtk+ sqlite3 dbus dbus-glib glib jpeg xorg-libX11 \
pascal@20170 183 xorg-libXdamage alsa-lib xorg-libXt"
pascal@20170 184 # dictionaries/en-US.aff
pascal@20170 185 # dictionaries/en-US.dic
pascal@20170 186 printf "Installing dictionaries"
pascal@20170 187 mkdir -p $fs/usr/lib/mozilla-common-$VERSION/dictionaries
pascal@20170 188 # cp -a $install/usr/lib/firefox-$VERSION/dictionaries \
pascal@20170 189 # $fs/usr/lib/mozilla-common-$VERSION
pascal@20170 190 status
pascal@20170 191
pascal@20170 192 # plugin-container
pascal@20170 193 printf "Installing common plugin-container"
pascal@20170 194 cp -a $install/usr/lib/firefox-$VERSION/plugin-container \
pascal@20170 195 $fs/usr/lib/mozilla-common-$VERSION
pascal@20170 196 status
pascal@20170 197
pascal@20170 198 # mozilla-xremote-client
pascal@20170 199 printf "Installing common mozilla-xremote-client"
pascal@20170 200 cp -a $install/usr/lib/firefox-$VERSION/mozilla-xremote-client \
pascal@20170 201 $fs/usr/lib/mozilla-common-$VERSION
pascal@20170 202 status
pascal@20170 203
pascal@20170 204 # components/libdbusservice.so
pascal@20170 205 # components/libmozgnome.so
pascal@20170 206 mkdir -p $fs/usr/lib/mozilla-common-$VERSION/components
pascal@20170 207 for file in libdbusservice.so libmozgnome.so; do
pascal@20170 208 printf "Installing common components/$file"
pascal@20170 209 cp -a $install/usr/lib/firefox-$VERSION/components/$file \
pascal@20170 210 $fs/usr/lib/mozilla-common-$VERSION/components
pascal@20170 211 status
pascal@20170 212 done
pascal@20170 213
pascal@20170 214 # chrome.manifest
pascal@20170 215 printf "Installing common chrome.manifest"
pascal@20170 216 cp -a $install/usr/lib/firefox-$VERSION/chrome.manifest \
pascal@20170 217 $fs/usr/lib/mozilla-common-$VERSION
pascal@20170 218 status
pascal@20170 219
pascal@20170 220 # run-mozilla.sh
pascal@20170 221 printf "Installing common run-mozilla.sh"
pascal@20170 222 cp -a $install/usr/lib/firefox-$VERSION/run-mozilla.sh \
pascal@20170 223 $fs/usr/lib/mozilla-common-$VERSION
pascal@20170 224 status
pascal@20170 225
pascal@20170 226 # libmozalloc.so
pascal@20170 227 printf "Installing common libmozalloc.so"
pascal@20170 228 cp -a $install/usr/lib/firefox-$VERSION/libmozalloc.so \
pascal@20170 229 $fs/usr/lib/mozilla-common-$VERSION
pascal@20170 230 status
pascal@20170 231 ;;
pascal@20170 232 esac
pascal@20170 233 }
pascal@20170 234
pascal@20170 235 # Pre and post install commands for Tazpkg.
pascal@20170 236 post_install_firefox_dev()
pascal@20170 237 {
pascal@20170 238 for i in usr/share/idl/firefox- usr/include/firefox- \
pascal@20170 239 usr/lib/firefox-devel- ; do
pascal@20170 240 for j in $(ls -d "$1"/$i* 2>/dev/null); do
pascal@20170 241 [ "${j##*-}" = "$VERSION" ] && continue
pascal@20170 242 [ ! -d "$j" ] || rm -rf "$j"
pascal@20170 243 done
domcox@14210 244 done
pankso@45 245 }