Fix up MimeType entries in .desktop instructions

We aso had a sed in the Makefile that changes text/html.
I changed that to only look at the top 20 lines of each page.
This commit is contained in:
Bruce Dubbs 2021-08-31 15:39:20 -05:00
parent b205497008
commit 28909b7239
4 changed files with 21 additions and 14 deletions

View File

@ -129,7 +129,7 @@ $(BASEDIR)/index.html: $(RENDERTMP)/$(BLFSHTML) version
tidy -config tidy.conf $$filename; \
true; \
bash obfuscate.sh $$filename; \
sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
sed -i -e "1,20s@text/html@application/xhtml+xml@g" $$filename; \
done;
nochunks: $(BASEDIR)/$(NOCHUNKS_OUTPUT)
@ -144,7 +144,7 @@ $(BASEDIR)/$(NOCHUNKS_OUTPUT): $(RENDERTMP)/$(BLFSHTML) version
@echo "Running Tidy and obfuscate.sh on non-chunked XHTML..."
$(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
$(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)
$(Q)sed -i -e "s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
$(Q)sed -i -e "1,20s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT)
tmpdir: $(RENDERTMP)
$(RENDERTMP):

View File

@ -502,7 +502,11 @@ export MOZBUILD_STATE_PATH=${PWD}/mozbuild &&
<screen role="root"><userinput>mkdir -pv /usr/share/applications &amp;&amp;
mkdir -pv /usr/share/pixmaps &amp;&amp;
cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; "EOF" &amp;&amp;
MIMETYPE="text/xml;text/mml;text/html;" &amp;&amp;
MIMETYPE="$MIMETYPE;application/xhtml+xml;application/vnd.mozilla.xul+xml" &amp;&amp;
MIMETYPE="$MIMETYPE;x-scheme-handler/http;x-scheme-handler/https; &amp;&amp;
cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; EOF &amp;&amp;
<literal>[Desktop Entry]
Encoding=UTF-8
Name=Firefox Web Browser
@ -513,10 +517,12 @@ Terminal=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
MimeType=$MIMETYPE
StartupNotify=true</literal>
EOF
unset MIMETYPE &amp;&amp;
ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \
/usr/share/pixmaps/firefox.png</userinput></screen>

View File

@ -514,7 +514,11 @@ export MOZBUILD_STATE_PATH=${PWD}/mozbuild &amp;&amp;
<screen role="root"><userinput>mkdir -pv /usr/share/applications &amp;&amp;
mkdir -pv /usr/share/pixmaps &amp;&amp;
cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; "EOF" &amp;&amp;
MIMETYPE="text/xml;text/mml;text/html;" &amp;&amp;
MIMETYPE="$MIMETYPE;application/xhtml+xml;application/vnd.mozilla.xul+xml" &amp;&amp;
MIMETYPE="$MIMETYPE;x-scheme-handler/http;x-scheme-handler/https; &amp;&amp;
cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; EOF &amp;&amp;
<literal>[Desktop Entry]
Encoding=UTF-8
Name=Firefox Web Browser
@ -525,10 +529,12 @@ Terminal=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
MimeType=$MIMETYPE
StartupNotify=true</literal>
EOF
unset MIMETYPE &amp;&amp;
ln -sfv /usr/lib/firefox/browser/chrome/icons/default/default128.png \
/usr/share/pixmaps/firefox.png</userinput></screen>

View File

@ -359,10 +359,7 @@ export MACH_USE_SYSTEM_PYTHON=1 &amp;&amp;
<screen role="root"><userinput>mkdir -pv /usr/share/{applications,pixmaps} &amp;&amp;
MIMETYPE="text/html;text/xml;application/xhtml+xml;application/xml"
MIMETYPE="$MIMETYPE;application/rss+xml;x-scheme-handler/mailto;"
cat &gt; /usr/share/applications/thunderbird.desktop &lt;&lt; EOF &amp;&amp;
cat &gt; /usr/share/applications/thunderbird.desktop &lt;&lt; "EOF" &amp;&amp;
<literal>[Desktop Entry]
Name=Thunderbird Mail
Comment=Send and receive mail with Thunderbird
@ -372,12 +369,10 @@ Terminal=false
Type=Application
Icon=thunderbird
Categories=Network;Email;
MimeType=$MIMETYPE
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;x-scheme-handler/mailto;
StartupNotify=true</literal>
EOF
unset MIMETYPE
ln -sfv /usr/lib/thunderbird/chrome/icons/default/default256.png \
/usr/share/pixmaps/thunderbird.png</userinput></screen>
</sect3>