2013-04-28 07:01:01 +08:00
|
|
|
# Contributor: Weng Xuetian <wengxt@gmail.com>
|
|
|
|
|
|
|
|
pkgname=firefox-kde
|
|
|
|
pkgver=20.0.1
|
2013-04-29 00:18:03 +08:00
|
|
|
pkgrel=4
|
2013-04-28 07:01:01 +08:00
|
|
|
pkgdesc="Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE"
|
|
|
|
url='http://www.mozilla.org/projects/firefox'
|
|
|
|
arch=('x86_64')
|
|
|
|
license=('MPL' 'GPL' 'LGPL')
|
2013-04-28 22:10:14 +08:00
|
|
|
depends=('gtk2' 'startup-notification' 'libnotify' 'alsa-lib' 'gstreamer0.10' 'gstreamer0.10-base' 'libxt' 'dbus-glib' 'filesystem-extra')
|
2013-04-28 07:01:01 +08:00
|
|
|
makedepends=('zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'unzip' 'autoconf2.13' 'mesa' 'yasm')
|
|
|
|
screenshot="http://img864.imageshack.us/img864/5116/firefoxm.png"
|
|
|
|
|
|
|
|
provides=("firefox=${pkgver}")
|
|
|
|
conflicts=('firefox')
|
|
|
|
install=firefox.install
|
|
|
|
url="http://www.mozilla.org/projects/firefox"
|
|
|
|
#source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${pkgver}/source/firefox-${pkgver}.source.tar.bz2
|
|
|
|
#patch http://www.rosenauer.org/hg/mozilla/
|
|
|
|
#patch https://build.opensuse.org/package/show?package=MozillaFirefox&project=mozilla%3AFactory
|
|
|
|
source=(ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${pkgver}/source/firefox-${pkgver}.source.tar.bz2
|
|
|
|
mozconfig
|
|
|
|
firefox.desktop
|
|
|
|
firefox-install-dir.patch
|
|
|
|
vendor.js
|
|
|
|
kde.js
|
|
|
|
firefox-kde.patch
|
|
|
|
mozilla-nongnome-proxies.patch
|
|
|
|
mozilla-kde.patch
|
|
|
|
mozilla-gstreamer-760140.patch
|
|
|
|
firefox-712763.patch
|
|
|
|
duckduckgo.xml
|
|
|
|
)
|
|
|
|
md5sums=('b822ff4b2348410587dec563235d9320'
|
2013-04-28 22:10:14 +08:00
|
|
|
'b2a0c175d063e6c4fe0c7ed6c27ac443'
|
2013-04-29 00:18:03 +08:00
|
|
|
'22c8f014ca98e49c4c107e2671dd0e51'
|
2013-04-28 07:01:01 +08:00
|
|
|
'150ac0fb3ac7b2114c8e8851a9e0516c'
|
|
|
|
'b1b1ad060b411a4abee7dcc63927aa02'
|
|
|
|
'75df0f88cc7a7fa7d522459e4ff82cc5'
|
|
|
|
'194da028eba1fbc316cf37dd586c4112'
|
|
|
|
'79f113b56057e17ca2466cd0ac578bb3'
|
|
|
|
'8e833c5abff5ddd3d20bc81eb9bfc028'
|
|
|
|
'9f4e6467284a5c82fbba0c0afe862f31'
|
|
|
|
'7303a96e92e600a46dd6a2cf9af5ada5'
|
|
|
|
'f6e2a6759b8711b445dbc9d35cbd275f')
|
|
|
|
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "mozilla-release"
|
|
|
|
patch -Np1 -i "../firefox-install-dir.patch"
|
|
|
|
|
|
|
|
# modify the patch to make it work in bundle
|
|
|
|
cp ../mozilla-kde.patch ../mozilla-kde-mod.patch
|
|
|
|
sed -i 's|\(\+\#define KMOZILLAHELPER "\)/usr/lib/mozilla/kmozillahelper\("\)|\1kmozillahelper\2|' ../mozilla-kde-mod.patch
|
|
|
|
sed -i 's|\(\+ \)execv\(( KMOZILLAHELPER, args )\)|\1execvp\2|' ../mozilla-kde-mod.patch
|
|
|
|
|
|
|
|
# remove the new file, to make life easier with call makepkg multiple times
|
|
|
|
rm -f content/media/gstreamer/nsGStreamerFormatHelper.cpp \
|
|
|
|
content/media/gstreamer/GStreamerFormatHelper.cpp \
|
|
|
|
content/media/gstreamer/nsGStreamerFormatHelper.h \
|
|
|
|
content/media/gstreamer/GStreamerFormatHelper.h
|
|
|
|
rm -f browser/components/shell/src/nsKDEShellService.cpp \
|
|
|
|
browser/components/shell/src/nsKDEShellService.h \
|
|
|
|
browser/components/shell/src/nsUnixShellService.cpp \
|
|
|
|
browser/components/shell/src/nsUnixShellService.h \
|
|
|
|
browser/base/content/browser-kde.xul
|
|
|
|
rm -f toolkit/xre/nsKDEUtils.cpp \
|
|
|
|
toolkit/xre/nsKDEUtils.h \
|
|
|
|
uriloader/exthandler/unix/nsCommonRegistry.cpp \
|
|
|
|
uriloader/exthandler/unix/nsCommonRegistry.h \
|
|
|
|
uriloader/exthandler/unix/nsKDERegistry.cpp \
|
|
|
|
uriloader/exthandler/unix/nsKDERegistry.h \
|
|
|
|
toolkit/content/widgets/dialog-kde.xml \
|
|
|
|
toolkit/content/widgets/preferences-kde.xml
|
|
|
|
|
|
|
|
msg "apply mozilla-gstreamer-760140.patch"
|
|
|
|
patch -Np1 -i "../mozilla-gstreamer-760140.patch" || return 1
|
|
|
|
msg "apply firefox-712763.patch"
|
|
|
|
patch -Np1 -i "../firefox-712763.patch" || return 1
|
|
|
|
msg "apply mozilla-nongnome-proxies.patch"
|
|
|
|
patch -Np1 -i "../mozilla-nongnome-proxies.patch" || return 1
|
|
|
|
msg "apply mozilla-kde.patch"
|
|
|
|
patch -Np1 -i "../mozilla-kde-mod.patch" || return 1
|
|
|
|
msg "apply firefox-kde.patch"
|
|
|
|
patch -Np1 -i "../firefox-kde.patch" || return 1
|
|
|
|
|
|
|
|
cp "../mozconfig" .mozconfig
|
|
|
|
|
|
|
|
# Fix PRE_RELEASE_SUFFIX
|
|
|
|
sed -i '/^PRE_RELEASE_SUFFIX := ""/s/ ""//' \
|
|
|
|
browser/base/Makefile.in
|
|
|
|
|
2013-04-28 22:10:14 +08:00
|
|
|
export PATH="$srcdir/path:$PATH"
|
|
|
|
export LDFLAGS="$LDFLAGS -Wl,-rpath,/extra/usr/lib/firefox"
|
2013-04-28 07:01:01 +08:00
|
|
|
export PYTHON="/usr/bin/python2"
|
|
|
|
|
|
|
|
make -j1 -f client.mk build MOZ_MAKE_FLAGS="${MAKEFLAGS}"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2013-04-28 22:10:14 +08:00
|
|
|
|
2013-04-28 07:01:01 +08:00
|
|
|
cd mozilla-release
|
|
|
|
make -j1 -f client.mk MOZ_PKG_FATAL_WARNINGS=0 package
|
2013-04-28 22:10:14 +08:00
|
|
|
#make -j1 -f client.mk DESTDIR="$pkgdir" install
|
|
|
|
mkdir -p $pkgdir/extra/usr/lib/
|
|
|
|
tar -C $pkgdir/extra/usr/lib/ -xf obj-ff/dist/firefox-$pkgver.en-US.linux-${CARCH}.tar.bz2
|
|
|
|
|
|
|
|
install -Dm644 ../vendor.js "$pkgdir/extra/usr/lib/firefox/defaults/preferences/vendor.js"
|
|
|
|
install -Dm644 ../kde.js "$pkgdir/extra/usr/lib/firefox/defaults/preferences/kde.js"
|
|
|
|
install -Dm644 ../duckduckgo.xml "$pkgdir/extra/usr/lib/firefox/searchplugins/duckduckgo.xml"
|
|
|
|
|
|
|
|
for i in 16 22 24 32 48 256; do
|
|
|
|
install -Dm644 browser/branding/official/default$i.png \
|
|
|
|
"$pkgdir/extra/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png"
|
|
|
|
done
|
2013-04-28 07:01:01 +08:00
|
|
|
|
2013-04-28 22:10:14 +08:00
|
|
|
install -Dm644 ../firefox.desktop \
|
|
|
|
"$pkgdir/extra/usr/share/applications/firefox.desktop"
|
|
|
|
|
|
|
|
mkdir -p $pkgdir/extra/usr/bin/
|
|
|
|
ln -sf /extra/usr/lib/firefox/firefox $pkgdir/extra/usr/bin/
|
|
|
|
|
2013-04-28 07:01:01 +08:00
|
|
|
# Use system-provided dictionaries
|
2013-04-28 22:10:14 +08:00
|
|
|
rm -rf "$pkgdir"/extra/usr/lib/firefox/{dictionaries,hyphenation}
|
|
|
|
ln -s /usr/share/hunspell "$pkgdir/extra/usr/lib/firefox/dictionaries"
|
|
|
|
ln -s /usr/share/hyphen "$pkgdir/extra/usr/lib/firefox/hyphenation"
|
|
|
|
|
2013-04-28 07:01:01 +08:00
|
|
|
}
|