wok-next annotate firefox/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents 82b613cfd1e0
children
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"
al@21020 6 SHORT_DESC="User friendly, secure and fast web browser"
al@21020 7 MAINTAINER="devel@slitaz.org"
pascal@15215 8 LICENSE="MPL2"
al@21020 9 WEB_SITE="https://www.mozilla.org/en-US/firefox/"
al@21020 10
pankso@4079 11 TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
slaxemulator@11324 12 WGET_URL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
pankso@45 13
Hans-G?nter@21263 14 BUILD_DEPENDS="alsa-lib-dev coreutils dbus-dev dbus-glib-dev findutils
Hans-G?nter@21263 15 glib-dev gtk2-dev gzip libevent-dev libffi-dev libidl
Hans-G?nter@21263 16 libjpeg-turbo-dev libvpx-dev mesa-dev nss-dev pango-dev perl
Hans-G?nter@21263 17 python sqlite3-dev tar wireless_tools-dev yasm zip"
al@21020 18 SPLIT="$PACKAGE-dev libfirefox"
pankso@10737 19
pankso@45 20 # A long compile time... dont forget to build libidl before and check the
pankso@45 21 # .mozconfig file from the stuff and the stuff/README document.
pankso@45 22 #
domcox@14210 23 # WARNING: 1GB RAM minimum. Additional RAM will significantly decrease
domcox@14210 24 # build time.
domcox@14210 25 # At least 2.5 GB free disk space
domcox@14210 26
Hans-G?nter@21263 27 compile_rules()
Hans-G?nter@21263 28 {
domcox@14210 29 # load mozconfig
domcox@14210 30 cp -a $stuff/mozconfig $src
slaxemulator@11324 31
domcox@14210 32 # build firefox and create a firefox tarball
domcox@14210 33 # reducing log size: hide c++, nsinstall, python msgs
domcox@14210 34 # Exception... Component returned failure code: known bug #696763
domcox@14210 35 make -f client.mk | egrep -v "c++|nsinstall|python" &&
domcox@14210 36 make -C obj-firefox/browser/installer
slaxemulator@11324 37
domcox@14210 38 # install
domcox@14210 39 # locate tarball
domcox@14210 40 local tarball tarpath fn1 fn2
domcox@14210 41 tarpath=$src/obj-firefox/dist
domcox@14210 42 fn1="$tarpath/firefox-${VERSION%esr}.en-US.linux-$ARCH.tar.bz2"
domcox@14210 43 fn2="$tarpath/firefox-${VERSION%esr}.en-US.linux-$(uname -m).tar.bz2"
domcox@14210 44 [ -e "$fn1" ] && tarball="$fn1" && echo "$ARCH tarball found"
domcox@14210 45 [ -e "$fn2" ] && tarball="$fn2" && echo "$(uname -m) tarball found"
al@21020 46 [ -z "$tarball" ] && echo "ERROR: tarball not found" && return 1
domcox@14210 47 # extract tarball
domcox@14210 48 mkdir -p $install/usr/lib/firefox-$VERSION &&
domcox@14210 49 tar -xvf $tarball -C $install/usr/lib/firefox-$VERSION \
domcox@14210 50 --strip-components=1 &&
domcox@14210 51 chown -R -v root:root $install/usr/lib/firefox-$VERSION &&
domcox@14210 52 chmod -v 755 $install/usr/lib/firefox-$VERSION/libxpcom.so &&
domcox@14210 53 # install symlink in /usr/bin
domcox@14210 54 mkdir -p $install/usr/bin &&
domcox@14210 55 ln -sf ../lib/firefox-$VERSION/firefox $install/usr/bin &&
domcox@14210 56 # install symlink for plugins
domcox@14210 57 mkdir -p $install/usr/lib/mozilla/plugins &&
domcox@14210 58 ln -sf ../mozilla/plugins $install/usr/lib/firefox-$VERSION
pankso@45 59 }
pankso@45 60
Hans-G?nter@21263 61 genpkg_rules()
Hans-G?nter@21263 62 {
pascal@20170 63 case $PACKAGE in
al@21020 64 firefox)
al@21020 65 # program
al@21020 66 mkdir -p $fs/usr/lib &&
al@21020 67 cp -a $install/usr/lib/$PACKAGE-$VERSION $fs/usr/lib &&
al@21020 68 cp -a $install/usr/lib/mozilla $fs/usr/lib &&
al@21020 69 cp -a $install/usr/bin $fs/usr
pankso@45 70
al@21020 71 # search Plugin (by: oddball)
al@21020 72 cp -a $stuff/searchplugins $fs/usr/lib/$PACKAGE-$VERSION
pankso@45 73
al@21020 74 # prefs
al@21020 75 mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/distribution &&
al@21020 76 cp -a $stuff/distribution.ini $fs/usr/lib/$PACKAGE-$VERSION/distribution
slaxemulator@9382 77
al@21020 78 # mozilla-common files
al@21020 79 # dictionaries
al@21020 80 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries &&
al@21020 81 ln -sf ../mozilla-common-$VERSION/dictionaries \
al@21020 82 $fs/usr/lib/$PACKAGE-$VERSION/dictionaries
al@21020 83 # plugin-container
al@21020 84 rm -f $fs/usr/lib/$PACKAGE-$VERSION/plugin-container &&
al@21020 85 ln -sf ../mozilla-common-$VERSION/plugin-container \
al@21020 86 $fs/usr/lib/$PACKAGE-$VERSION/plugin-container
al@21020 87 # mozilla-xremote-client
al@21020 88 rm -f $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client &&
al@21020 89 ln -sf ../mozilla-common-$VERSION/mozilla-xremote-client \
al@21020 90 $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client
al@21020 91 # components/libdbusservice.so
al@21020 92 # components/libmozgnome.so
al@21020 93 for file in libdbusservice.so libmozgnome.so; do
al@21020 94 rm -f $fs/usr/lib/$PACKAGE-$VERSION/components/$file &&
al@21020 95 ln -sf ../../mozilla-common-$VERSION/components/$file \
al@21020 96 $fs/usr/lib/$PACKAGE-$VERSION/components/$file
al@21020 97 done
al@21020 98 # chrome.manifest
al@21020 99 rm -f $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest &&
al@21020 100 ln -sf ../mozilla-common-$VERSION/chrome.manifest \
al@21020 101 $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest
pascal@20170 102
al@21020 103 # run-mozilla.sh
al@21020 104 rm -f $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh &&
al@21020 105 ln -sf ../mozilla-common-$VERSION/run-mozilla.sh \
al@21020 106 $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh
pascal@20170 107
al@21020 108 # libmozalloc.so
al@21020 109 rm -f $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so &&
al@21020 110 ln -sf ../mozilla-common-$VERSION/libmozalloc.so \
al@21020 111 $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so
pascal@20170 112
al@21020 113 chown -R root.root $fs
al@21078 114 DEPENDS="gtk2 sqlite3 dbus dbus-glib glib jpeg libx11 \
al@21078 115 libxdamage alsa-lib libxt libevent libvpx pango nss \
al@21020 116 libfirefox"
al@21020 117 TAGS="web-browser"
al@21020 118 ;;
al@21020 119 *-dev)
al@21105 120 DEPENDS="alsa-lib sqlite3 libcairo dbus-glib pango atk glib libxt \
al@21078 121 libxinerama libxcursor libxcomposite libxext \
al@21078 122 libxdamage libxcb libsm libice"
al@21020 123 mkdir -p $fs/usr/include/$WANTED-$VERSION
al@21020 124 cp -rL $src/obj-firefox/dist/include/* $fs/usr/include/$WANTED-$VERSION
pascal@20170 125
al@21020 126 mkdir -p $fs/usr/lib/$WANTED-devel/sdk/bin/ply
al@21020 127 cp -rL $src/obj-firefox/dist/sdk/bin/*.py \
al@21020 128 $fs/usr/lib/$WANTED-devel/sdk/bin
al@21020 129 cp -rL $src/obj-firefox/dist/sdk/bin/ply/*.py \
al@21020 130 $fs/usr/lib/$WANTED-devel/sdk/bin/ply
al@21020 131 mkdir -p $fs/usr/lib/$WANTED-devel/sdk/lib
al@21020 132 cp -rL $src/obj-firefox/dist/sdk/lib/* \
al@21020 133 $fs/usr/lib/$WANTED-devel/sdk/lib
pascal@20170 134
al@21020 135 # mkdir -v $fs/usr/include/$WANTED-$VERSION/npapi
al@21020 136 # cp -a $src/dom/plugins/base/*.h $fs/usr/include/$WANTED-$VERSION/npapi
pascal@20170 137
al@21020 138 # /usr/share/idl folder should also be in firefox-dev
al@21020 139 mkdir -p $fs/usr/share/$WANTED-$VERSION/idl
al@21020 140 cp -rL $src/obj-firefox/dist/idl/* $fs/usr/share/$WANTED-$VERSION/idl
pascal@20170 141
al@21020 142 # copy missing *.pc files
al@21020 143 mkdir -p $fs/usr/lib/pkgconfig
al@21020 144 cp -a $stuff/*.pc $fs/usr/lib/pkgconfig
al@21020 145 # fix version
al@21020 146 sed -i "s/VERSION/$VERSION/" $fs/usr/lib/pkgconfig/*
al@21020 147 ;;
al@21020 148 libfirefox)
al@21020 149 CAT="network|firefox/thunderbird common files"
al@21078 150 DEPENDS="gtk2 sqlite3 dbus dbus-glib glib jpeg libx11 \
al@21078 151 libxdamage alsa-lib libxt"
al@21020 152 # dictionaries/en-US.aff
al@21020 153 # dictionaries/en-US.dic
al@21020 154 mkdir -p $fs/usr/lib/mozilla-common-$VERSION/dictionaries
al@21020 155 # cp -a $install/usr/lib/firefox-$VERSION/dictionaries \
al@21020 156 # $fs/usr/lib/mozilla-common-$VERSION
pascal@20170 157
al@21020 158 # plugin-container
al@21020 159 cp -a $install/usr/lib/firefox-$VERSION/plugin-container \
al@21020 160 $fs/usr/lib/mozilla-common-$VERSION
pascal@20170 161
al@21020 162 # mozilla-xremote-client
al@21020 163 cp -a $install/usr/lib/firefox-$VERSION/mozilla-xremote-client \
al@21020 164 $fs/usr/lib/mozilla-common-$VERSION
pascal@20170 165
al@21020 166 # components/libdbusservice.so
al@21020 167 # components/libmozgnome.so
al@21020 168 mkdir -p $fs/usr/lib/mozilla-common-$VERSION/components
al@21020 169 for file in libdbusservice.so libmozgnome.so; do
al@21020 170 cp -a $install/usr/lib/firefox-$VERSION/components/$file \
al@21020 171 $fs/usr/lib/mozilla-common-$VERSION/components
al@21020 172 done
pascal@20170 173
al@21020 174 # chrome.manifest
al@21020 175 cp -a $install/usr/lib/firefox-$VERSION/chrome.manifest \
al@21020 176 $fs/usr/lib/mozilla-common-$VERSION
pascal@20170 177
al@21020 178 # run-mozilla.sh
al@21020 179 cp -a $install/usr/lib/firefox-$VERSION/run-mozilla.sh \
al@21020 180 $fs/usr/lib/mozilla-common-$VERSION
pascal@20170 181
al@21020 182 # libmozalloc.so
al@21020 183 cp -a $install/usr/lib/firefox-$VERSION/libmozalloc.so \
al@21020 184 $fs/usr/lib/mozilla-common-$VERSION
al@21020 185 ;;
pascal@20170 186 esac
pascal@20170 187 }
pascal@20170 188
Hans-G?nter@21263 189 post_install_firefox_dev()
Hans-G?nter@21263 190 {
Hans-G?nter@21263 191 for i in usr/share/idl/firefox- usr/include/firefox- usr/lib/firefox-devel-
Hans-G?nter@21263 192 do
Hans-G?nter@21263 193 for j in $(ls -d "$1"/$i* 2>/dev/null)
Hans-G?nter@21263 194 do
pascal@20170 195 [ "${j##*-}" = "$VERSION" ] && continue
pascal@20170 196 [ ! -d "$j" ] || rm -rf "$j"
Hans-G?nter@21263 197 done
Hans-G?nter@21263 198 done
pankso@45 199 }