Skip to content
Permalink
Newer
Older
100755 94 lines (70 sloc) 2.44 KB
1
#!/bin/env beesh
2
3
# BEE_VERSION firefox_esr-52.3.0-0
4
5
#export BEE_TMP_TMPDIR=/dev/shm BEE_TMP_BUILDROOT=/dev/shm/bee-root BEE_MAKEFLAGS='-j80'
6
7
SRCURL[0]="https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PKGVERSION}${PKGEXTRANAME}/source/firefox-${PKGVERSION}${PKGEXTRANAME}.source.tar.xz"
8
9
mee_configure() {
10
${S}/configure \
11
--prefix=/usr \
12
--enable-application=browser \
13
--disable-necko-wifi \
14
--enable-official-branding \
15
--without-system-icu \
16
--without-system-nspr \
17
--disable-tests \
18
--enable-optimize \
19
--enable-safe-browsing
20
}
21
22
mee_build() {
23
start_cmd make $BEE_MAKEFLAGS
24
}
25
26
mee_build_post() {
27
28
# create menu entry
29
30
cat >${B}/firefoxesr.desktop <<-EOF
31
[Desktop Entry]
32
Version=1.0
33
Name=Firefox-ESR-${PKGVERSION[1]}
34
GenericName=Web Browser
35
Comment=Surf the World Wide Web
36
Exec=firefoxesr${PKGVERSION[1]} -ProfileManager %u
37
Icon=firefox
38
Terminal=false
39
Type=Application
40
StartupNotify=true
41
Categories=Network;WebBrowser;
42
EOF
43
}
44
45
mee_install() {
46
start_cmd make install DESTDIR=${D}
47
}
48
49
mee_install_post() {
50
if [ "${PKGEXTRANAME}" = "esr" ] ; then
51
mv -v "${D}${BINDIR}/firefox" "${D}${BINDIR}/firefox${PKGEXTRANAME}${PKGVERSION[1]}"
52
else
53
start_cmd install -d ${D}${LIBDIR}/mariux64
54
start_cmd mv ${D}${BINDIR}/${PKGNAME} ${D}${LIBDIR}/mariux64/${PKGNAME}
55
56
# install official icon in all sizes
57
58
for size in 16 22 24 32 48 256 ; do
59
srcdir=${S}/browser/branding/official
60
destdir=${D}${DATADIR}/icons/hicolor/${size}x${size}/apps
61
62
start_cmd mkdir -p ${destdir}
63
start_cmd install -m 644 ${srcdir}/default${size}.png ${destdir}/firefox.png
64
done
65
fi
66
67
# remove unneeded firefox-devel
April 25, 2017 10:18
68
69
rm -r ${D}${LIBDIR}/firefox-devel-${PKGVERSION}
April 25, 2017 10:18
70
71
# install menu-entry
72
73
start_cmd mkdir -p ${D}${DATADIR}/applications
74
start_cmd desktop-file-install --dir ${D}${DATADIR}/applications ${B}/firefoxesr.desktop
75
76
mkdir -pv ${D}/usr/local/bin
77
78
cat > ${D}/usr/local/bin/sbportal <<-EOF
79
#!/bin/bash
80
81
export MOZ_APP_LAUNCHER=firefox
82
83
export XAUTHORITY=\${XAUTHORITY:-\$HOME/.Xauthority}
84
export ICEAUTHORITY=\${ICEAUTHORITY:-\$HOME/.ICEauthority}
85
export HOME=/scratch/local/sap-firefoxesr-\${USER}-home
86
87
mkdir -p \${HOME}
88
chmod 0700 \${HOME}
89
April 25, 2017 10:18
90
exec firefox${PKGEXTRANAME}${PKGVERSION[1]} -no-remote https://sbportal.sap.mpg.de/irj/portal
91
EOF
92
93
chmod 755 ${D}/usr/local/bin/sbportal
94
}