gtk/firefox-kde/PKGBUILD
Weng 409273eb6a merge firefox and kmozillahelper and change the patch to use firefox's own notification
firefox's own notification use libnotify, and provides additional "activate" button
comparing with the one provided by kmozillahelper, IMHO integrates better.
2013-05-06 20:46:15 +00:00

162 lines
6.1 KiB
Bash

# Contributor: Weng Xuetian <wengxt@gmail.com>
pkgname=firefox-kde
pkgver=20.0.1
pkgrel=6
pkgdesc="Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE"
_obsver=b88c72dfdc858f6209feb123227bd7df
url='http://www.mozilla.org/projects/firefox'
arch=('x86_64')
license=('MPL' 'GPL' 'LGPL')
depends=('gtk2' 'startup-notification' 'libnotify' 'alsa-lib' 'gstreamer0.10' 'gstreamer0.10-base' 'libxt' 'dbus-glib' 'filesystem-extra' 'kdelibs')
makedepends=('zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'unzip' 'autoconf2.13' 'mesa' 'yasm' 'cmake' 'automoc4')
screenshot="http://img864.imageshack.us/img864/5116/firefoxm.png"
provides=("firefox=${pkgver}" "kmozillahelper=0.6.4")
conflicts=('firefox' 'kmozillahelper')
replaces=('kmozillahelper')
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
"kmozillahelper-0.6.4.tar.bz2::https://api.opensuse.org/public/source/mozilla:Factory/mozilla-kde4-integration/${pkgname}-${pkgver}.tar.bz2?rev=${_obsver}"
)
md5sums=('b822ff4b2348410587dec563235d9320'
'b2a0c175d063e6c4fe0c7ed6c27ac443'
'22c8f014ca98e49c4c107e2671dd0e51'
'150ac0fb3ac7b2114c8e8851a9e0516c'
'b1b1ad060b411a4abee7dcc63927aa02'
'75df0f88cc7a7fa7d522459e4ff82cc5'
'194da028eba1fbc316cf37dd586c4112'
'79f113b56057e17ca2466cd0ac578bb3'
'8e833c5abff5ddd3d20bc81eb9bfc028'
'9f4e6467284a5c82fbba0c0afe862f31'
'7303a96e92e600a46dd6a2cf9af5ada5'
'f6e2a6759b8711b445dbc9d35cbd275f')
build() {
pushd .
build_kmozillahelper
popd
pushd .
build_firefox
popd
}
build_kmozillahelper() {
mkdir -p kmozillahelper-build
cd kmozillahelper-build
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=Release ../kmozillahelper
make || return 1
}
build_firefox() {
cd "mozilla-release"
patch -Np1 -i "../firefox-install-dir.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.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
export PATH="$srcdir/path:$PATH"
export LDFLAGS="$LDFLAGS -Wl,-rpath,/extra/usr/lib/firefox"
export PYTHON="/usr/bin/python2"
make -j1 -f client.mk build MOZ_MAKE_FLAGS="${MAKEFLAGS}"
}
package() {
pushd .
cd $srcdir/kmozillahelper-build
make DESTDIR=$pkgdir install
popd
cd mozilla-release
make -j1 -f client.mk MOZ_PKG_FATAL_WARNINGS=0 package
#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
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/
# Use system-provided dictionaries
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"
}
md5sums=('b822ff4b2348410587dec563235d9320'
'b2a0c175d063e6c4fe0c7ed6c27ac443'
'22c8f014ca98e49c4c107e2671dd0e51'
'150ac0fb3ac7b2114c8e8851a9e0516c'
'b1b1ad060b411a4abee7dcc63927aa02'
'75df0f88cc7a7fa7d522459e4ff82cc5'
'194da028eba1fbc316cf37dd586c4112'
'79f113b56057e17ca2466cd0ac578bb3'
'69a90693ab4fc4d81afd83c1524e73d4'
'9f4e6467284a5c82fbba0c0afe862f31'
'7303a96e92e600a46dd6a2cf9af5ada5'
'f6e2a6759b8711b445dbc9d35cbd275f'
'7db8c8904371204fb4c13e9cd306deb0')