From d9af29210dfe62624ea8f5abca17936f2b44011f Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Wed, 9 Nov 2011 07:17:45 +0100 Subject: [PATCH] run xdg-open for images and DjVu files (#532784) --- mc-extensions.patch | 39 ++++++++++++++++++++++++--------------- mc.spec | 14 ++++++-------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/mc-extensions.patch b/mc-extensions.patch index 6c35f7b..67d7a6e 100644 --- a/mc-extensions.patch +++ b/mc-extensions.patch @@ -1,7 +1,7 @@ -diff -up mc-4.7.0-pre4/configure.ac.extensions mc-4.7.0-pre4/configure.ac ---- mc-4.7.0-pre4/configure.ac.extensions 2009-10-30 19:44:38.000000000 +0100 -+++ mc-4.7.0-pre4/configure.ac 2009-12-10 20:41:43.000000000 +0100 -@@ -69,7 +69,7 @@ AC_PROG_LN_S +diff -up mc-4.8.0/configure.ac.extensions mc-4.8.0/configure.ac +--- mc-4.8.0/configure.ac.extensions 2011-10-17 11:33:45.000000000 +0200 ++++ mc-4.8.0/configure.ac 2011-11-09 07:03:04.416596731 +0100 +@@ -78,7 +78,7 @@ AC_PROG_LN_S AC_CHECK_TOOL(AR, ar, ar) dnl Only list browsers here that can be run in background (i.e. with `&') @@ -10,19 +10,19 @@ diff -up mc-4.7.0-pre4/configure.ac.extensions mc-4.7.0-pre4/configure.ac dnl dnl Ovverriding mmap support. This has to be before AC_FUNC_MMAP is used. -diff -up mc-4.7.0-pre4/misc/mc.ext.in.extensions mc-4.7.0-pre4/misc/mc.ext.in ---- mc-4.7.0-pre4/misc/mc.ext.in.extensions 2009-10-29 20:02:37.000000000 +0100 -+++ mc-4.7.0-pre4/misc/mc.ext.in 2009-12-10 20:46:47.000000000 +0100 -@@ -387,7 +387,7 @@ shell/.ico +diff -up mc-4.8.0/misc/mc.ext.in.extensions mc-4.8.0/misc/mc.ext.in +--- mc-4.8.0/misc/mc.ext.in.extensions 2011-10-17 11:33:45.000000000 +0200 ++++ mc-4.8.0/misc/mc.ext.in 2011-11-09 07:04:24.981728775 +0100 +@@ -403,7 +403,7 @@ shell/.ico Include=image include/image - Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi -+ Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (eog %f &); fi ++ Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (xdg-open %f &); fi View=%view{ascii} identify %f #View=%view{ascii} asciiview %f -@@ -395,7 +395,8 @@ include/image +@@ -411,7 +411,8 @@ include/image ### Sound files ### regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$ @@ -32,7 +32,7 @@ diff -up mc-4.7.0-pre4/misc/mc.ext.in.extensions mc-4.7.0-pre4/misc/mc.ext.in regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$ Open=mikmod %f -@@ -405,15 +406,22 @@ regex/\.([wW][aA][wW]22)$ +@@ -421,15 +422,22 @@ regex/\.([wW][aA][wW]22)$ Open=vplay -s 22 %f regex/\.([mM][pP]3)$ @@ -59,7 +59,7 @@ diff -up mc-4.7.0-pre4/misc/mc.ext.in.extensions mc-4.7.0-pre4/misc/mc.ext.in regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$ Open=timidity %f -@@ -422,11 +430,15 @@ regex/\.([wW][mM][aA])$ +@@ -438,11 +446,15 @@ regex/\.([wW][mM][aA])$ Open=mplayer -vo null %f View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f @@ -76,7 +76,7 @@ diff -up mc-4.7.0-pre4/misc/mc.ext.in.extensions mc-4.7.0-pre4/misc/mc.ext.in ### Video ### -@@ -471,12 +486,12 @@ include/video +@@ -494,12 +506,12 @@ include/video # Postscript type/^PostScript @@ -91,7 +91,7 @@ diff -up mc-4.7.0-pre4/misc/mc.ext.in.extensions mc-4.7.0-pre4/misc/mc.ext.in #Open=(acroread %f &) #Open=(ghostview %f &) View=%view{ascii} pdftotext %f - -@@ -486,7 +501,7 @@ type/^PDF +@@ -509,7 +521,7 @@ type/^PDF # html regex/\.([hH][tT][mM][lL]?)$ @@ -100,7 +100,7 @@ diff -up mc-4.7.0-pre4/misc/mc.ext.in.extensions mc-4.7.0-pre4/misc/mc.ext.in View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f # StarOffice 5.2 -@@ -504,22 +519,27 @@ shell/.abw +@@ -527,22 +539,27 @@ shell/.abw # Microsoft Word Document regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$ @@ -133,3 +133,12 @@ diff -up mc-4.7.0-pre4/misc/mc.ext.in.extensions mc-4.7.0-pre4/misc/mc.ext.in View=%view{ascii} xls2csv %f || strings %f # Use OpenOffice.org to open any MS Office documents +@@ -564,7 +581,7 @@ regex/\.([Tt][Ee][Xx])$ + + # DjVu + regex/\.(djvu|DJVU)$ +- Open=djview %f & ++ Open=xdg-open %f & + + ### Miscellaneous ### + diff --git a/mc.spec b/mc.spec index 19ae490..fdc59ec 100644 --- a/mc.spec +++ b/mc.spec @@ -1,7 +1,7 @@ Summary: User-friendly text console file manager and visual shell Name: mc Version: 4.8.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 License: GPLv3+ Group: System Environment/Shells @@ -45,7 +45,7 @@ make install DESTDIR="$RPM_BUILD_ROOT" install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d install contrib/{mc.sh,mc.csh} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d -%find_lang %{name} +%find_lang %{name} --with-man %clean rm -rf $RPM_BUILD_ROOT @@ -63,12 +63,6 @@ rm -rf $RPM_BUILD_ROOT %{_libexecdir}/mc/extfs.d/* %{_libexecdir}/mc/fish/* %{_mandir}/man1/* -%lang(es) %{_mandir}/es/man1/mc.1* -%lang(hu) %{_mandir}/hu/man1/mc.1* -%lang(it) %{_mandir}/it/man1/mc.1* -%lang(pl) %{_mandir}/pl/man1/mc.1* -%lang(ru) %{_mandir}/ru/man1/mc.1* -%lang(sr) %{_mandir}/sr/man1/mc.1* %{_sysconfdir}/profile.d/* %config(noreplace) %{_sysconfdir}/mc/mc.ext %config(noreplace) %{_sysconfdir}/mc/*edit* @@ -82,6 +76,10 @@ rm -rf $RPM_BUILD_ROOT %dir %{_libexecdir}/mc/extfs.d %changelog +* Wed Nov 09 2011 Jindrich Novy 4.8.0-3 +- run xdg-open for images and DjVu files (#532784) +- tell find-lang about localized man pages + * Wed Oct 26 2011 Fedora Release Engineering - 1:4.8.0-2 - Rebuilt for glibc bug#747377