-# TODO: use browser-plugins framework
#
# Conditional build:
%bcond_without gnomevfs # disable GnomeVFS support
Summary(pt_BR): Navegador SeaMonkey Community Edition
Name: seamonkey
Version: 1.1
-Release: 2
+Release: 3
License: Mozilla Public License
Group: X11/Applications/Networking
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/%{version}/%{name}-%{version}.source.tar.bz2
BuildRequires: nss-devel >= 1:3.11.3
BuildRequires: perl-modules >= 5.6.0
BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.356
BuildRequires: sed >= 4.0
BuildRequires: xorg-lib-libXext-devel
BuildRequires: xorg-lib-libXft-devel >= 2.1
Requires(post,postun): %{name}-libs = %{epoch}:%{version}-%{release}
Requires(post,postun): /sbin/ldconfig
Requires: %{name}-libs = %{epoch}:%{version}-%{release}
+Requires: browser-plugins >= 2.0
%{?with_svg:Requires: cairo >= 1.0.0}
Requires: nspr >= 1:4.6.1
Requires: nss >= 1:3.11.3
fi
PING=`$SEAMONKEY -remote 'ping()' 2>&1 >/dev/null`
-if [ -n "$PING" ]; then
- if [ -f "`pwd`/$1" ]; then
+ if [ -n "$PING" ]; then
+ if [ -f "`pwd`/$1" ]; then
exec $SEAMONKEY "file://`pwd`/$1"
- else
+ else
exec $SEAMONKEY "$@"
- fi
+ fi
fi
-if [ -z "$1" ]; then
+ if [ -z "$1" ]; then
exec $SEAMONKEY -remote 'xfeDoCommand (openBrowser)'
-elif [ "$1" == "-mail" ]; then
+ elif [ "$1" == "-mail" ]; then
exec $SEAMONKEY -remote 'xfeDoCommand (openInbox)'
-elif [ "$1" == "-compose" ]; then
+ elif [ "$1" == "-compose" ]; then
exec $SEAMONKEY -remote 'xfeDoCommand (composeMessage)'
fi
[[ $1 == -* ]] && exec $SEAMONKEY "$@"
-if [ -f "`pwd`/$1" ]; then
- URL="file://`pwd`/$1"
-else
- URL="$1"
-fi
+ if [ -f "`pwd`/$1" ]; then
+ URL="file://`pwd`/$1"
+ else
+ URL="$1"
+ fi
if grep -q -E 'browser.tabs.opentabfor.middleclick.*true' \
~/.mozilla/default/*/prefs.js; then
exec $SEAMONKEY -remote "OpenUrl($URL,new-tab)"
-else
+ else
exec $SEAMONKEY -remote "OpenUrl($URL,new-window)"
fi
exit 0
EOF
+%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
+
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p %{_sbindir}/%{name}-chrome+xpcom-generate
-%postun -p %{_sbindir}/%{name}-chrome+xpcom-generate
+%post
+%{_sbindir}/%{name}-chrome+xpcom-generate
+%update_browser_plugins
+
+%postun
+%{_sbindir}/%{name}-chrome+xpcom-generate
+if [ "$1" = 0 ]; then
+ %update_browser_plugins
+fi
%post mailnews -p %{_sbindir}/%{name}-chrome+xpcom-generate
%postun mailnews -p %{_sbindir}/%{name}-chrome+xpcom-generate
%attr(755,root,root) %{_bindir}/seamonkey
%attr(744,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate
+# browser plugins v2
+%{_browserpluginsconfdir}/browsers.d/%{name}.*
+%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
+
%dir %{_chromedir}
%dir %{_seamonkeydir}/components
%dir %{_seamonkeydir}/defaults