forked from flathub/flathub
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-makefile
28 lines (28 loc) · 1.47 KB
/
build-makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
all:
echo 'Nothing to do'
install:
mkdir -p /app/lib/firefox
cp -r firefox $(prefix)/lib
mkdir -p $(prefix)/share/appdata
cp -p org.mozilla.firefox_esr.appdata.xml $(prefix)/share/appdata
desktop-file-install --dir $(prefix)/share/applications --set-key=StartupWMClass --set-value=firefox-esr org.mozilla.firefox.desktop
mkdir -p $(prefix)/share/icons/hicolor/128x128/apps/ $(prefix)/share/appdata
cp -p firefox/browser/chrome/icons/default/default128.png $(prefix)/share/icons/hicolor/128x128/apps/org.mozilla.firefox.png
mkdir -p $(prefix)/lib/firefox/distribution/extensions
cp distribution.ini $(prefix)/lib/firefox/distribution
# Mimicing Mozilla's way of handling language packs.
chmod +x ./setup-langpack.sh
PREFIX=$(prefix) bash -c ./setup-langpack.sh
mkdir -p $(prefix)/lib/firefox/browser/defaults/preferences
cp default-preferences.js $(prefix)/lib/firefox/browser/defaults/preferences
mkdir -p $(prefix)/lib/firefox/distribution
cp distribution.ini $(prefix)/lib/firefox/distribution
cp policies.json $(prefix)/lib/firefox/distribution
# Create wrapper script which will make files downloaded for opening available outside of sandbox
mkdir -p $(prefix)/bin
echo '#!/bin/bash' > $(prefix)/bin/firefox
echo 'export TMPDIR=$$XDG_CACHE_HOME/tmp' >> $(prefix)/bin/firefox
echo 'exec $(prefix)/lib/firefox/firefox $$@' >> $(prefix)/bin/firefox
chmod +x $(prefix)/bin/firefox
# We use ffmpeg-full from FreeDesktop platform, so this is required.
mkdir -p /app/lib/ffmpeg