wok view firefox-official/receipt @ rev 24425

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Feb 11 17:50:36 2022 +0000 (2022-02-11)
parents a6d313c5cce7
children 8ae9e1d172f0
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox-official"
4 VERSION="77.0"
5 CATEGORY="network"
6 TAGS="web-browser"
7 SHORT_DESC="Official Firefox build by the Mozilla foundation (English language)."
8 MAINTAINER="al.bobylev@gmail.com"
9 LICENSE="MPL2"
10 WEB_SITE="http://www.mozilla.org/firefox"
12 TARBALL="firefox-$VERSION.tar.bz2"
13 WGET_URL="http://ftp.mozilla.org/pub/firefox/releases/$VERSION/linux-i686/en-US/$TARBALL"
15 PROVIDE="browser-html5"
16 DEPENDS="alsa-lib dbus-glib gtk+ gtk+3 libatomic xorg-libXt libwrap vlc"
17 HOST_ARCH="i486"
19 # What is the latest version available today?
20 current_version()
21 {
22 wget -O - http://ftp.mozilla.org/pub/firefox/releases/ 2>/dev/null | \
23 sed '/releases\/[0-9]/!d;s|.*releases/||;s|/.*||' | sort -Vr | sed q
24 }
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 # Installation path
30 fx='/opt/mozilla/firefox'
32 mkdir -p \
33 $install$fx \
34 $install/usr/bin \
35 $install/usr/share/applications \
36 $install/usr/share/icons/hicolor/128x128/apps
38 # Copy everything
39 cp -a $src/* $install$fx
41 # Executable
42 ln -s $fx/firefox $install/usr/bin/firefox-official
44 # Icons
45 ln -s $fx/browser/icons/mozicon128.png \
46 $install/usr/share/icons/hicolor/128x128/apps/firefox-official.png
47 for size in 16 32 48; do
48 icon_folder="$install/usr/share/icons/hicolor/${size}x$size/apps"
49 mkdir -p $icon_folder
50 ln -s $fx/browser/chrome/icons/default/default$size.png \
51 $icon_folder/firefox-official.png
52 done
54 # Allow user updates (save user's and our traffic)
55 chmod -R a+w $install$fx
57 # Desktop shortcut
58 cp $stuff/firefox-official.desktop \
59 $install/usr/share/applications
60 cp $stuff/firefox-official-private.desktop \
61 $install/usr/share/applications
62 cp $stuff/firefox-official-safe.desktop \
63 $install/usr/share/applications
64 }
66 # Rules to gen a SliTaz package suitable for Tazpkg.
67 genpkg_rules()
68 {
69 cp -a $install/* $fs
70 ln -s firefox-official $fs/usr/bin/browser-html5
71 }