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