Lines 1-6
Link Here
|
1 |
# Copyright 1999-2013 Gentoo Foundation |
1 |
# Copyright 1999-2013 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/firefox-bin-23.0.ebuild,v 1.1 2013/08/07 22:37:14 anarchy Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/firefox-bin-21.0.ebuild,v 1.4 2013/05/15 13:17:38 jdhore Exp $ |
4 |
|
4 |
|
5 |
EAPI="5" |
5 |
EAPI="5" |
6 |
|
6 |
|
Lines 21-33
Link Here
|
21 |
# We don't use the http mirror because it deletes old tarballs. |
21 |
# We don't use the http mirror because it deletes old tarballs. |
22 |
MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/" |
22 |
MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/" |
23 |
|
23 |
|
24 |
inherit eutils multilib pax-utils fdo-mime gnome2-utils mozlinguas nsplugins |
24 |
inherit eutils pax-utils fdo-mime gnome2-utils mozlinguas nsplugins multilib-minimal |
25 |
|
25 |
|
26 |
DESCRIPTION="Firefox Web Browser" |
26 |
DESCRIPTION="Firefox Web Browser" |
27 |
MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases" |
27 |
MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases" |
28 |
SRC_URI="${SRC_URI} |
28 |
SRC_URI="${SRC_URI} |
29 |
amd64? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 ) |
29 |
abi_x86_64? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 ) |
30 |
x86? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )" |
30 |
abi_x86_32? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )" |
31 |
HOMEPAGE="http://www.mozilla.com/firefox" |
31 |
HOMEPAGE="http://www.mozilla.com/firefox" |
32 |
RESTRICT="strip mirror" |
32 |
RESTRICT="strip mirror" |
33 |
|
33 |
|
Lines 47-82
Link Here
|
47 |
>=media-libs/alsa-lib-1.0.16 |
47 |
>=media-libs/alsa-lib-1.0.16 |
48 |
|
48 |
|
49 |
!net-libs/libproxy[spidermonkey] |
49 |
!net-libs/libproxy[spidermonkey] |
|
|
50 |
amd64? ( abi_x86_32? ( app-emulation/emul-linux-x86-gtklibs ) ) |
50 |
" |
51 |
" |
51 |
|
52 |
|
52 |
QA_PREBUILT=" |
53 |
QA_PREBUILT=" |
53 |
opt/${MOZ_PN}/*.so |
54 |
opt/${MOZ_PN}*/*.so |
54 |
opt/${MOZ_PN}/${MOZ_PN} |
55 |
opt/${MOZ_PN}*/${MOZ_PN} |
55 |
opt/${MOZ_PN}/${PN} |
56 |
opt/${MOZ_PN}*/${PN} |
56 |
opt/${MOZ_PN}/crashreporter |
57 |
opt/${MOZ_PN}*/crashreporter |
57 |
opt/${MOZ_PN}/webapprt-stub |
58 |
opt/${MOZ_PN}*/webapprt-stub |
58 |
opt/${MOZ_PN}/plugin-container |
59 |
opt/${MOZ_PN}*/plugin-container |
59 |
opt/${MOZ_PN}/mozilla-xremote-client |
60 |
opt/${MOZ_PN}*/mozilla-xremote-client |
60 |
opt/${MOZ_PN}/updater |
61 |
opt/${MOZ_PN}*/updater |
61 |
" |
62 |
" |
62 |
|
63 |
|
63 |
S="${WORKDIR}/${MOZ_PN}" |
64 |
S="${WORKDIR}" |
|
|
65 |
BUILD_DIR="${S}/${MOZ_PN}" |
64 |
|
66 |
|
65 |
src_unpack() { |
67 |
src_unpack() { |
66 |
unpack ${A} |
68 |
local i |
|
|
69 |
for i in ${A} ; do |
70 |
[[ $i = *.xpi ]] && continue |
71 |
unpack "${i}" |
72 |
mv "${MOZ_PN}" "${MOZ_PN}-$([[ $i = *i686* ]] && echo x86 || echo amd64)" || die |
73 |
done |
67 |
|
74 |
|
68 |
# Unpack language packs |
75 |
# Unpack language packs |
69 |
mozlinguas_src_unpack |
76 |
mozlinguas_src_unpack |
70 |
} |
77 |
} |
71 |
|
78 |
|
72 |
src_install() { |
79 |
multilib_src_install() { |
73 |
declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN} |
80 |
local suffix= |
|
|
81 |
multilib_is_native_abi || suffix="-${ABI}" |
82 |
local MY_PN="${PN}${suffix}" |
83 |
|
84 |
declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN}${suffix} |
74 |
|
85 |
|
75 |
local size sizes icon_path icon name |
86 |
local size sizes icon_path icon name |
76 |
sizes="16 32 48" |
87 |
sizes="16 32 48" |
77 |
icon_path="${S}/browser/chrome/icons/default" |
88 |
icon_path="${BUILD_DIR}/browser/chrome/icons/default" |
78 |
icon="${PN}" |
89 |
icon="${PN}-icon" |
79 |
name="Mozilla Firefox" |
90 |
name="Mozilla Firefox (bin/${ABI})" |
80 |
|
91 |
|
81 |
# Install icons and .desktop for menu entry |
92 |
# Install icons and .desktop for menu entry |
82 |
for size in ${sizes}; do |
93 |
for size in ${sizes}; do |
Lines 87-105
Link Here
|
87 |
insinto "/usr/share/icons/hicolor/128x128/apps" |
98 |
insinto "/usr/share/icons/hicolor/128x128/apps" |
88 |
newins "${icon_path}/../../../icons/mozicon128.png" "${icon}.png" || die |
99 |
newins "${icon_path}/../../../icons/mozicon128.png" "${icon}.png" || die |
89 |
# Install a 48x48 icon into /usr/share/pixmaps for legacy DEs |
100 |
# Install a 48x48 icon into /usr/share/pixmaps for legacy DEs |
90 |
newicon "${S}"/browser/chrome/icons/default/default48.png ${PN}-icon.png |
101 |
newicon "${BUILD_DIR}"/browser/chrome/icons/default/default48.png ${PN}-icon.png |
91 |
domenu "${FILESDIR}"/${PN}.desktop |
102 |
newmenu "${FILESDIR}"/${PN}.desktop "${MY_PN}".desktop |
92 |
sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \ |
103 |
sed -e "/^Name/s:=.*:=${name}:" \ |
93 |
"${ED}/usr/share/applications/${PN}.desktop" || die |
104 |
-e "/^Icon/s:=.*:=${icon}:" \ |
|
|
105 |
-e "/^Exec/s:=.*:=/usr/bin/${MY_PN} %u:" \ |
106 |
-i "${ED}/usr/share/applications/${MY_PN}.desktop" || die |
94 |
|
107 |
|
95 |
# Add StartupNotify=true bug 237317 |
108 |
# Add StartupNotify=true bug 237317 |
96 |
if use startup-notification; then |
109 |
if use startup-notification; then |
97 |
echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}.desktop |
110 |
echo "StartupNotify=true" >> "${D}"/usr/share/applications/${MY_PN}.desktop |
98 |
fi |
111 |
fi |
99 |
|
112 |
|
100 |
# Install firefox in /opt |
113 |
# Install firefox in /opt |
101 |
dodir ${MOZILLA_FIVE_HOME%/*} |
114 |
dodir ${MOZILLA_FIVE_HOME%/*} |
102 |
mv "${S}" "${D}"${MOZILLA_FIVE_HOME} || die |
115 |
mv "${BUILD_DIR}" "${D}"${MOZILLA_FIVE_HOME} || die |
103 |
|
116 |
|
104 |
# Fix prefs that make no sense for a system-wide install |
117 |
# Fix prefs that make no sense for a system-wide install |
105 |
insinto ${MOZILLA_FIVE_HOME}/defaults/pref/ |
118 |
insinto ${MOZILLA_FIVE_HOME}/defaults/pref/ |
Lines 120-137
Link Here
|
120 |
|
133 |
|
121 |
# Create /usr/bin/firefox-bin |
134 |
# Create /usr/bin/firefox-bin |
122 |
dodir /usr/bin/ |
135 |
dodir /usr/bin/ |
123 |
cat <<-EOF >"${D}"/usr/bin/${PN} |
136 |
cat <<-EOF >"${D}"/usr/bin/${MY_PN} |
124 |
#!/bin/sh |
137 |
#!/bin/sh |
125 |
unset LD_PRELOAD |
138 |
unset LD_PRELOAD |
126 |
LD_LIBRARY_PATH="/opt/firefox/" |
139 |
LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}" |
127 |
GTK_PATH=/usr/lib/gtk-2.0/ |
140 |
GTK_PATH=/usr/$(get_libdir)/gtk-2.0/ |
128 |
exec /opt/${MOZ_PN}/${MOZ_PN} "\$@" |
141 |
exec /opt/${MOZ_PN}${suffix}/${MOZ_PN} "\$@" |
129 |
EOF |
142 |
EOF |
130 |
fperms 0755 /usr/bin/${PN} |
143 |
fperms 0755 /usr/bin/${MY_PN} |
131 |
|
144 |
|
132 |
# revdep-rebuild entry |
145 |
# revdep-rebuild entry |
133 |
insinto /etc/revdep-rebuild |
146 |
insinto /etc/revdep-rebuild |
134 |
doins "${FILESDIR}"/10${PN} || die |
147 |
sed -e "s:${MOZ_PN}:&${suffix}:" "${FILESDIR}/10${PN}" > "${T}/10${MY_PN}" || die |
|
|
148 |
doins "${T}"/10${MY_PN} || die |
135 |
|
149 |
|
136 |
# Plugins dir |
150 |
# Plugins dir |
137 |
share_plugins_dir |
151 |
share_plugins_dir |