2 %bcond_with ext2undel # with ext2 undelete fs
3 %bcond_without perl_vfs # without perl depending vfs'es -- to avoid perl autoreq
4 %bcond_with samba # with SAMBA vfs support
5 %bcond_without x # without text edit in X support
7 Summary: A user-friendly file manager and visual shell
8 Summary(de.UTF-8): Visuelle Shell Midnight Commander
9 Summary(es.UTF-8): Interpretador de comandos visual Midnight Commander
10 Summary(fr.UTF-8): Un gestionnaire de fichiers puissant et agréable en mode console
11 Summary(hu.UTF-8): Egy felhasználóbarát fájlkezelő és vizuális shell
12 Summary(ja.UTF-8): 使いやすいファイルマネージャとビジュアルシェル
13 Summary(pl.UTF-8): Midnight Commander - powłoka wizualna
14 Summary(pt_BR.UTF-8): Interpretador de comandos visual Midnight Commander
15 Summary(ru.UTF-8): Диспетчер файлов Midnight Commander
16 Summary(tr.UTF-8): Midnight Commander görsel kabuğu
17 Summary(uk.UTF-8): Диспетчер файлів Midnight Commander
18 Summary(zh_CN.UTF-8): 一个方便实用的文件管理器和虚拟Shell
24 Group: Applications/Shells
25 Source0: http://ftp.midnight-commander.org/%{name}-%{version}.tar.xz
26 # Source0-md5: 19f14d368001aac454c28a2ddd2e851b
27 Source3: %{name}-non-english-man-pages.tar.bz2
28 # Source3-md5: 17d7b574e1b85ad6f8ddceda9e841f19
29 Source7: %{name}.desktop
31 Patch1: %{name}-no-ws-visible.patch
32 Patch2: %{name}-no-compute-totals.patch
33 Patch3: %{name}-file-find-case-insensitive.patch
34 Patch4: %{name}-confirm-exit.patch
35 Patch5: %{name}-noperl-vfs.patch
36 # at now syntax highligthing for PLD-update-TODO and CVSROOT/users
37 Patch6: %{name}-pld-developerfriendly.patch
38 URL: http://www.midnight-commander.org/
39 BuildRequires: autoconf >= 2.60
40 BuildRequires: automake >= 1.5
41 %{?with_ext2undel:BuildRequires: e2fsprogs-devel}
42 BuildRequires: gettext-tools >= 0.14.3
43 BuildRequires: glib2-devel >= 2.8
45 BuildRequires: gpm-devel
47 BuildRequires: libssh2-devel >= 1.2.5
48 BuildRequires: libtool
49 BuildRequires: pam-devel
50 BuildRequires: pcre-devel
51 BuildRequires: pkgconfig
52 BuildRequires: rpm-pythonprov
53 BuildRequires: rpmbuild(macros) >= 1.268
54 BuildRequires: sed >= 4.0
55 BuildRequires: slang-devel >= 2.2.1
56 %{?with_x:BuildRequires: xorg-lib-libX11-devel}
58 Requires: pam >= 0.77.3
60 Requires: setup >= 2.4.6-2
63 Suggests: cdrtools-utils
76 Suggests: p7zip-standalone
77 Suggests: perl-tools-pod
91 Conflicts: bash < 2.05b
93 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
95 %define specflags_ia32 -fomit-frame-pointer
98 Midnight Commander is a visual shell much like a file manager, only
99 with way more features. It is text mode, but also includes mouse
100 support if you are running GPM. Its coolest feature is the ability to
101 FTP, view tar, zip files, and poke into RPMs for specific files. :-)
103 %description -l de.UTF-8
104 Midnight Commander ist ein Visual-Shell, ähnlich einem Dateimanager,
105 aber mit zusätzlichen Funktionen. Es läuft im Textmodus, kann jedoch
106 eine Maus unterstützen, wenn GPM betrieben wird. Seine coolsten
107 Fähigkeiten sind die FTP-Option, das Einsehen von tar- und zip-Dateien
108 und das Herausfischen von spezifischen Dateien aus RPMs.
110 %description -l es.UTF-8
111 Midnight Commander es un interpretador de comandos visual que más
112 parece un administrador de archivos, solamente con varias
113 características a más. Es un programa en modo texto, pero incluye
114 soporte para ratón, si estuviera ejecutando GPM o en una ventana
115 xterm. Su característica más genial es la habilidad de cotillear en
116 RPMs buscando archivos específicos. :-)
118 %description -l fr.UTF-8
119 Midnight Commander est une interface pour la ligne de commande qui
120 tient beaucoup du gestionnaire de fichiers, mais est bien plus
121 puissant. Il fonctionne en mode console (texte), mais peut être
122 contrôlé à la souris si GPM est présent. Ses caractéristiques les plus
123 remarquables sont la possibilité de se connecter à un serveur FTP, de
124 visualiser des archives tar, de compresser des fichiers avec zip, de
125 récupérer des fichiers dans les packages RPM, et tout ceci simplement.
127 %description -l hu.UTF-8
128 Midnight Commander egy vizuális shell, lényegében egy fájlkezelő
129 sok-sok lehetőséggel. Szöveges módú, de az egeret is támogatja, ha fut
130 a GPM. A legjobb lehetőség az FTP elérése, tar, zip és RPM fájlok
133 %description -l ja.UTF-8
134 Midnight Commander はいろいろな機能を持ったファイルマネージャ兼
135 ビジュアルシェルです。これはテキストモードのアプリケーションですが、
136 GPM を使っている場合、マウスが使えます。 Midnight Commander には、 FTP
137 に接続できたり、 tar や zip や RPM の中が見えるなど、クールな機能
140 %description -l pl.UTF-8
141 Midnight Commander jest wizualną powłoką podobną do Norton Commandera.
142 Pracuje w trybie tekstowym, ale ma także obsługę myszki. Jest super ;)
143 MC ma wbudowanego klienta FTP, może zaglądać do skompresowanych
144 archiwów tar i zip, a także oglądać pliki w pakietach RPM.
146 %description -l pt_BR.UTF-8
147 Midnight Commander é um interpretador de comandos visual que mais
148 parece um gerenciador de arquivos, somente com várias características
149 a mais. Ele é um programa de modo texto, mas inclui suporte para mouse
150 se você estiver rodando GPM ou em uma janela xterm. Sua característica
151 mais legal é a habilidade de bisbilhotar em RPMs procurando arquivos
154 %description -l tr.UTF-8
155 Midnight Commander bir dosya yöneticisine çok benzeyen ancak daha
156 yetenekli bir görsel kabuktur. Metin ekranda çalışır ve GPM
157 çalışıyorsa fare desteği vardır. En hoş özellikleri FTP yapabilmesi,
158 tar, zip ve RPM dosyalarının içeriklerini gösterebilmesidir.
166 %{!?with_perl_vfs:%patch5 -p1}
171 %{__sed} -i 's:|hxx|:|hxx|tcc|:' misc/syntax/Syntax.in
173 sed -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \
174 src/vfs/extfs/helpers/uc1541
183 export X11_WWW="xdg-open"
185 PYTHON=%{_bindir}/python3 \
186 %{?with_ext2undel:--enable-vfs-undelfs} \
187 %{?with_samba:--enable-vfs-smb} \
188 --with-smb-configdir=/etc/samba \
189 --with-smb-codepagedir=/etc/samba/codepages \
190 --with%{!?with_x:out}-x \
193 --with-screen=slang \
194 --disable-silent-rules
199 rm -rf $RPM_BUILD_ROOT
200 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pixmapsdir},%{_desktopdir}} \
201 $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,shrc.d,sysconfig} \
202 $RPM_BUILD_ROOT%{_mandir}/man8
205 DESTDIR=$RPM_BUILD_ROOT
207 install %{SOURCE7} $RPM_BUILD_ROOT%{_desktopdir}
208 install %{SOURCE8} $RPM_BUILD_ROOT%{_pixmapsdir}
211 for b in man1 man8 ; do
212 install -d $RPM_BUILD_ROOT%{_mandir}/{$a,$a/$b}
213 for c in man/$a/$b/* ; do
214 install $c $RPM_BUILD_ROOT%{_mandir}/$a/$b
219 install contrib/{mc.sh,mc.csh} $RPM_BUILD_ROOT/etc/shrc.d
221 %{__rm} $RPM_BUILD_ROOT%{_mandir}/*/man8/mcserv.8
224 %{__rm} $RPM_BUILD_ROOT%{_datadir}/mc/hints/mc.hint.sv_SE
225 # another variant of it
226 %{__rm} $RPM_BUILD_ROOT%{_datadir}/mc/hints/mc.hint.it_IT
228 %{__mv} $RPM_BUILD_ROOT%{_datadir}/mc/hints/mc.hint.{zh,zh_CN}
233 rm -rf $RPM_BUILD_ROOT
235 %files -f %{name}.lang
236 %defattr(644,root,root,755)
238 %config /etc/shrc.d/*
239 %attr(755,root,root) %{_bindir}/mc*
240 %dir %{_libexecdir}/mc
241 %attr(755,root,root) %{_libexecdir}/mc/cons.saver
242 %attr(755,root,root) %{_libexecdir}/mc/*.sh
243 %attr(755,root,root) %{_libexecdir}/mc/*.csh
248 %{_datadir}/mc/syntax
250 %dir %{_datadir}/mc/examples
251 %dir %{_datadir}/mc/examples/macros.d
252 %{_datadir}/mc/examples/macros.d/*
254 %dir %{_datadir}/mc/help
255 %{_datadir}/mc/help/mc.hlp
256 %lang(es) %{_datadir}/mc/help/mc.hlp.es
257 %lang(hu) %{_datadir}/mc/help/mc.hlp.hu
258 %lang(it) %{_datadir}/mc/help/mc.hlp.it
259 %lang(pl) %{_datadir}/mc/help/mc.hlp.pl
260 %lang(ru) %{_datadir}/mc/help/mc.hlp.ru
261 %lang(sr) %{_datadir}/mc/help/mc.hlp.sr
262 %dir %{_datadir}/mc/hints
263 %{_datadir}/mc/hints/mc.hint
264 # disabled hint files contain only English messages (as for 4.8.21)
265 #%lang(af) %{_datadir}/mc/hints/mc.hint.af
266 #%lang(ar) %{_datadir}/mc/hints/mc.hint.ar
267 #%lang(az) %{_datadir}/mc/hints/mc.hint.az
268 %lang(be) %{_datadir}/mc/hints/mc.hint.be
269 %lang(bg) %{_datadir}/mc/hints/mc.hint.bg
270 %lang(ca) %{_datadir}/mc/hints/mc.hint.ca
271 %lang(cs) %{_datadir}/mc/hints/mc.hint.cs
272 %lang(da) %{_datadir}/mc/hints/mc.hint.da
273 %lang(de) %{_datadir}/mc/hints/mc.hint.de
274 #%lang(de_CH) %{_datadir}/mc/hints/mc.hint.de_CH
275 %lang(el) %{_datadir}/mc/hints/mc.hint.el
276 %lang(en_GB) %{_datadir}/mc/hints/mc.hint.en_GB
277 %lang(eo) %{_datadir}/mc/hints/mc.hint.eo
278 %lang(es) %{_datadir}/mc/hints/mc.hint.es
279 %lang(et) %{_datadir}/mc/hints/mc.hint.et
280 %lang(eu) %{_datadir}/mc/hints/mc.hint.eu
281 %lang(fa) %{_datadir}/mc/hints/mc.hint.fa
282 #%lang(fi) %{_datadir}/mc/hints/mc.hint.fi
283 %lang(fr) %{_datadir}/mc/hints/mc.hint.fr
284 #%lang(fr_CA) %{_datadir}/mc/hints/mc.hint.fr_CA
285 %lang(ga) %{_datadir}/mc/hints/mc.hint.ga
286 %lang(gl) %{_datadir}/mc/hints/mc.hint.gl
287 #%lang(hr) %{_datadir}/mc/hints/mc.hint.hr
288 %lang(hu) %{_datadir}/mc/hints/mc.hint.hu
289 #%lang(ia) %{_datadir}/mc/hints/mc.hint.ia
290 %lang(id) %{_datadir}/mc/hints/mc.hint.id
291 %lang(it) %{_datadir}/mc/hints/mc.hint.it
292 %lang(ja) %{_datadir}/mc/hints/mc.hint.ja
293 #%lang(ka) %{_datadir}/mc/hints/mc.hint.ka
294 #%lang(kk) %{_datadir}/mc/hints/mc.hint.kk
295 #%lang(ko) %{_datadir}/mc/hints/mc.hint.ko
296 %lang(lt) %{_datadir}/mc/hints/mc.hint.lt
297 %lang(nl) %{_datadir}/mc/hints/mc.hint.nl
298 %lang(pl) %{_datadir}/mc/hints/mc.hint.pl
299 %lang(pt) %{_datadir}/mc/hints/mc.hint.pt
300 %lang(pt_BR) %{_datadir}/mc/hints/mc.hint.pt_BR
301 %lang(ro) %{_datadir}/mc/hints/mc.hint.ro
302 %lang(ru) %{_datadir}/mc/hints/mc.hint.ru
303 %lang(sk) %{_datadir}/mc/hints/mc.hint.sk
304 #%lang(sl) %{_datadir}/mc/hints/mc.hint.sl
305 %lang(sr) %{_datadir}/mc/hints/mc.hint.sr
306 %lang(sv) %{_datadir}/mc/hints/mc.hint.sv
307 #%lang(szl) %{_datadir}/mc/hints/mc.hint.szl
308 #%lang(te) %{_datadir}/mc/hints/mc.hint.te
309 %lang(tr) %{_datadir}/mc/hints/mc.hint.tr
310 %lang(uk) %{_datadir}/mc/hints/mc.hint.uk
311 #%lang(uz) %{_datadir}/mc/hints/mc.hint.uz
312 %lang(zh_CN) %{_datadir}/mc/hints/mc.hint.zh_CN
314 %dir %{_libexecdir}/mc/ext.d
315 %attr(755,root,root) %{_libexecdir}/mc/ext.d/archive.sh
316 %attr(755,root,root) %{_libexecdir}/mc/ext.d/doc.sh
317 %attr(755,root,root) %{_libexecdir}/mc/ext.d/image.sh
318 %attr(755,root,root) %{_libexecdir}/mc/ext.d/misc.sh
319 %attr(755,root,root) %{_libexecdir}/mc/ext.d/package.sh
320 %attr(755,root,root) %{_libexecdir}/mc/ext.d/sound.sh
321 %attr(755,root,root) %{_libexecdir}/mc/ext.d/text.sh
322 %attr(755,root,root) %{_libexecdir}/mc/ext.d/video.sh
323 %attr(755,root,root) %{_libexecdir}/mc/ext.d/web.sh
325 %dir %{_libexecdir}/mc/extfs.d
326 %{_libexecdir}/mc/extfs.d/README*
328 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/a+
329 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/apt+
330 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/deb*
331 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/dpkg+
332 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/mailfs
333 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/patchfs
334 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/rpms+
335 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/ulib
336 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/uzip
338 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/audio
339 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/bpp
340 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/changesetfs
341 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/gitfs+
342 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/hp48+
343 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/iso9660
344 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/lslR
345 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/patchsetfs
346 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/rpm
347 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/s3+
348 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/trpm
349 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/u7z
350 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/uace
351 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/ualz
352 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/uar*
353 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/uc1541
354 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/ucab
355 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/uha
356 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/ulha
357 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/urar
358 %attr(755,root,root) %{_libexecdir}/mc/extfs.d/uzoo
359 %dir %{_libexecdir}/mc/fish
360 %{_libexecdir}/mc/fish/README.fish
361 %attr(755,root,root) %{_libexecdir}/mc/fish/[a-z]*
362 %{_desktopdir}/mc.desktop
363 %{_pixmapsdir}/mc.png
365 %{_mandir}/man1/mc.1*
366 %{_mandir}/man1/mcedit.1*
367 %{_mandir}/man1/mcview.1*
368 %lang(es) %{_mandir}/es/man1/*
369 %lang(hu) %{_mandir}/hu/man1/*
370 %lang(it) %{_mandir}/it/man1/*
371 %lang(pl) %{_mandir}/pl/man1/*
372 %lang(ru) %{_mandir}/ru/man1/*
373 %lang(sr) %{_mandir}/sr/man1/*
375 %dir %{_sysconfdir}/mc
376 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mc/*.*