Install script fixes

This commit is contained in:
Martin Stransky 2014-01-09 14:26:22 +01:00
parent 872cdfa568
commit 58dcc7950f
2 changed files with 8 additions and 10 deletions

View File

@ -61,7 +61,6 @@ if [ ! -r $MOZ_LIB_DIR/firefox/$MOZ_FIREFOX_FILE ]; then
MOZ_LIB_DIR="$SECONDARY_LIB_DIR" MOZ_LIB_DIR="$SECONDARY_LIB_DIR"
fi fi
MOZ_DIST_BIN="$MOZ_LIB_DIR/firefox" MOZ_DIST_BIN="$MOZ_LIB_DIR/firefox"
MOZ_XUL_DIR="$MOZ_LIB_DIR/XULRUNNER_DIRECTORY"
MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks" MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks"
MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE" MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE"
@ -172,9 +171,9 @@ FEDORA_LANGPACK_CONFIG="$MOZ_EXTENSIONS_PROFILE_DIR/.fedora-langpack-install"
# MOZ_DISABLE_LANGPACKS disables language packs completely # MOZ_DISABLE_LANGPACKS disables language packs completely
MOZILLA_DOWN=0 MOZILLA_DOWN=0
if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then
if [ -x $MOZ_XUL_DIR/mozilla-xremote-client ]; then if [ -x $MOZ_LIB_DIR/mozilla-xremote-client ]; then
# Is firefox running? # Is firefox running?
$MOZ_XUL_DIR/mozilla-xremote-client -a firefox 'ping()' > /dev/null 2>&1 $MOZ_LIB_DIR/mozilla-xremote-client -a firefox 'ping()' > /dev/null 2>&1
MOZILLA_DOWN=$? MOZILLA_DOWN=$?
fi fi
fi fi

View File

@ -326,6 +326,10 @@ echo "ac_add_options --disable-tracejit" >> .mozconfig
echo "ac_add_options --disable-webrtc" >> .mozconfig echo "ac_add_options --disable-webrtc" >> .mozconfig
%endif %endif
%if !%{enable_mozilla_crashreporter}
echo "ac_add_options --disable-crashreporter" >> .mozconfig
%endif
#--------------------------------------------------------------------- #---------------------------------------------------------------------
%build %build
@ -422,14 +426,9 @@ desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE20}
# set up the firefox start script # set up the firefox start script
%{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/firefox %{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/firefox
XULRUNNER_DIR=`pkg-config --variable=libdir libxul | %{__sed} -e "s,%{_libdir}/\?,,g"` %{__cat} %{SOURCE21} > $RPM_BUILD_ROOT%{_bindir}/firefox
%{__cat} %{SOURCE21} | %{__sed} -e "s,XULRUNNER_DIRECTORY,$XULRUNNER_DIR,g" > \
$RPM_BUILD_ROOT%{_bindir}/firefox
%{__chmod} 755 $RPM_BUILD_ROOT%{_bindir}/firefox %{__chmod} 755 $RPM_BUILD_ROOT%{_bindir}/firefox
# Link with xulrunner
ln -s `pkg-config --variable=libdir libxul` $RPM_BUILD_ROOT/%{mozappdir}/xulrunner
%{__install} -p -D -m 644 %{SOURCE23} $RPM_BUILD_ROOT%{_mandir}/man1/firefox.1 %{__install} -p -D -m 644 %{SOURCE23} $RPM_BUILD_ROOT%{_mandir}/man1/firefox.1
%{__rm} -f $RPM_BUILD_ROOT/%{mozappdir}/firefox-config %{__rm} -f $RPM_BUILD_ROOT/%{mozappdir}/firefox-config
@ -462,7 +461,6 @@ for langpack in `ls firefox-langpacks/*.xpi`; do
echo "%%lang($language) %{langpackdir}/${extensionID}.xpi" >> ../%{name}.lang echo "%%lang($language) %{langpackdir}/${extensionID}.xpi" >> ../%{name}.lang
done done
%{__rm} -rf firefox-langpacks %{__rm} -rf firefox-langpacks
%endif # build_langpacks
# Install langpack workaround (see #707100, #821169) # Install langpack workaround (see #707100, #821169)
function create_default_langpack() { function create_default_langpack() {
@ -489,6 +487,7 @@ create_default_langpack "pa-IN" "pa"
create_default_langpack "pt-PT" "pt" create_default_langpack "pt-PT" "pt"
create_default_langpack "sv-SE" "sv" create_default_langpack "sv-SE" "sv"
create_default_langpack "zh-TW" "zh" create_default_langpack "zh-TW" "zh"
%endif # build_langpacks
# Keep compatibility with the old preference location # Keep compatibility with the old preference location
# on Fedora 18 and earlier # on Fedora 18 and earlier