Skip to content

Commit

Permalink
epm: play added firefox (thx @pechenovv for waterfox) (eterbug #17838)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boria138 authored and vitlav committed Nov 25, 2024
1 parent 3f16ed4 commit 540bf61
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
27 changes: 27 additions & 0 deletions pack.d/firefox.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

TAR="$1"
RETURNTARNAME="$2"
VERSION="$3"

. $(dirname $0)/common.sh

PKGNAME=$PRODUCT-$VERSION

mkdir -p opt/
erc unpack $TAR || fatal
mv $PRODUCT* opt/$PRODUCT
chmod 0755 opt/$PRODUCT/glxtest

cat <<EOF >$PKGNAME.tar.eepm.yaml
name: $PRODUCT
group: Networking/WWW
license: MPL-2.0
url: https://www.mozilla.org/en-US/firefox/
summary: Fast and Private Web Browser
description: Fast and Private Web Browser
EOF

erc pack $PKGNAME.tar opt || fatal

return_tar $PKGNAME.tar
16 changes: 16 additions & 0 deletions play.d/firefox.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
PKGNAME=firefox
SUPPORTEDARCHES="x86_64"
VERSION="$2"
DESCRIPTION="Fast and Private Web Browser"
URL="https://www.mozilla.org/en-US/firefox"

. $(dirname $0)/common.sh

if [ "$VERSION" = "*" ] ; then
VERSION="$(eget -O- https://www.mozilla.org/en-US/firefox/releases/ | grep -oP '\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n1)"
fi

PKGURL="https://ftp.mozilla.org/pub/firefox/releases/$VERSION/linux-x86_64/en-US/firefox-$VERSION.tar.bz2"

install_pack_pkgurl $VERSION
30 changes: 30 additions & 0 deletions repack.d/firefox.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh -x

# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"


. $(dirname $0)/common.sh

add_bin_link_command $PRODUCT $PRODUCTDIR/$PRODUCT

cat <<EOF | create_file /usr/share/applications/$PRODUCT.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Firefox
Comment=Fast and Private Web Browser
Exec=$PRODUCT %f
Icon=$PRODUCT
Terminal=false
StartupNotify=true
Categories=Networking;WWW
EOF

iconpath=$PRODUCTDIR/browser/chrome/icons/default/

iconname=$PRODUCT
for i in 16 32 48 64 128 ; do
install_file $iconpath/default$i.png /usr/share/icons/hicolor/${i}x${i}/apps/$iconname.png
done

0 comments on commit 540bf61

Please sign in to comment.