2 # - UTF-8 patch still broken (file view breaks all non-ascii characters when using non-UTF locale)
3 # - check spec-syntax,mo patches
4 # - update ancient X11_WWW (or drop if it's no longer used)
7 %bcond_with ext2undel # with ext2 undelete fs
8 %bcond_without perl_vfs # without perl depending vfs'es -- to avoid perl autoreq
9 %bcond_with samba # with SAMBA vfs support
10 %bcond_without x # without text edit in X support
11 %bcond_without utf8 # utf8
14 Summary: A user-friendly file manager and visual shell
15 Summary(de.UTF-8): Visuelle Shell Midnight Commander
16 Summary(es.UTF-8): Interpretador de comandos visual Midnight Commander
17 Summary(fr.UTF-8): Un gestionnaire de fichiers puissant et agréable en mode console
18 Summary(ja.UTF-8): 使いやすいファイルマネージャとビジュアルシェル
19 Summary(pl.UTF-8): Midnight Commander - powłoka wizualna
20 Summary(pt_BR.UTF-8): Interpretador de comandos visual Midnight Commander
21 Summary(ru.UTF-8): Диспетчер файлов Midnight Commander
22 Summary(tr.UTF-8): Midnight Commander görsel kabuğu
23 Summary(uk.UTF-8): Диспетчер файлів Midnight Commander
24 Summary(zh_CN.UTF-8): 一个方便实用的文件管理器和虚拟Shell
29 Group: Applications/Shells
30 Source0: ftp://ftp.gnu.org/gnu/mc/%{name}-%{version}-%{snap}.tar.gz
31 # Source0-md5: 7626c446f016b09fd1210f00b9d0c292
32 Source1: %{name}serv.pamd
33 Source2: %{name}serv.init
34 Source3: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
35 # Source3-md5: 17d7b574e1b85ad6f8ddceda9e841f19
36 Source6: %{name}serv.sysconfig
37 Source7: %{name}.desktop
39 Patch0: %{name}-rpmfs.patch
40 Patch1: %{name}-spec-syntax.patch
41 Patch2: %{name}-urar.patch
42 Patch3: %{name}-srpm.patch
43 Patch4: %{name}-home_etc2.patch
44 Patch5: %{name}-pl.patch
45 Patch8: %{name}-mc.ext.patch
46 Patch10: %{name}-localenames.patch
47 Patch11: %{name}-noperl-vfs.patch
48 # at now syntax highligthing for PLD-update-TODO and CVSROOT/users
49 Patch12: %{name}-pld-developerfriendly.patch
50 # http://www.suse.de/~nadvornik/mc.html
51 Patch13: %{name}-utf8.patch
52 Patch14: %{name}-vhdl-syntax.patch
53 Patch15: %{name}-ipv6.patch
54 Patch16: %{name}-refresh.patch
55 Patch17: %{name}-nolibs.patch
56 Patch21: %{name}-userhost.patch
57 Patch22: %{name}-utf8-look-and-feel.patch
58 Patch23: %{name}-utf8-8bit-hex.patch
59 Patch24: %{name}-find_options.patch
60 URL: http://www.ibiblio.org/mc/
61 BuildRequires: autoconf
62 BuildRequires: automake
63 BuildRequires: gettext-devel
64 BuildRequires: glib2-devel
66 BuildRequires: ncurses-devel >= 5.0
67 BuildRequires: pam-devel
68 BuildRequires: pkgconfig
69 BuildRequires: rpm-perlprov
70 BuildRequires: rpmbuild(macros) >= 1.268
71 BuildRequires: sed >= 4.0
73 BuildRequires: slang-devel >= 1:2.0.0
76 BuildRequires: gpm-devel
78 # Needed? %%{?with_perl_vfs:Requires: perl-base}
79 %{?with_x:BuildRequires: xorg-lib-libX11-devel}
80 %{?with_ext2undel:BuildRequires: e2fsprogs-devel}
82 Requires: pam >= 0.77.3
84 Requires: setup >= 2.4.6-2
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 ja.UTF-8
128 Midnight Commander はいろいろな機能を持ったファイルマネージャ兼
129 ビジュアルシェルです。これはテキストモードのアプリケーションですが、
130 GPM を使っている場合、マウスが使えます。 Midnight Commander には、 FTP
131 に接続できたり、 tar や zip や RPM の中が見えるなど、クールな機能
134 %description -l pl.UTF-8
135 Midnight Commander jest wizualną powłoką podobną do Norton Commandera.
136 Pracuje w trybie tekstowym, ale ma także obsługę myszki. Jest super ;)
137 MC ma wbudowanego klienta FTP, może zaglądać do skompresowanych
138 archiwów tar i zip, a także oglądać pliki w pakietach RPM.
140 %description -l pt_BR.UTF-8
141 Midnight Commander é um interpretador de comandos visual que mais
142 parece um gerenciador de arquivos, somente com várias características
143 a mais. Ele é um programa de modo texto, mas inclui suporte para mouse
144 se você estiver rodando GPM ou em uma janela xterm. Sua característica
145 mais legal é a habilidade de bisbilhotar em RPMs procurando arquivos
148 %description -l tr.UTF-8
149 Midnight Commander bir dosya yöneticisine çok benzeyen ancak daha
150 yetenekli bir görsel kabuktur. Metin ekranda çalışır ve GPM
151 çalışıyorsa fare desteği vardır. En hoş özellikleri FTP yapabilmesi,
152 tar, zip ve RPM dosyalarının içeriklerini gösterebilmesidir.
155 Summary: Server for the Midnight Commander network file management system
156 Summary(de.UTF-8): Midnight Commander File-Server
157 Summary(es.UTF-8): Servidor de archivos del Midnight Commander
158 Summary(fr.UTF-8): Serveur réseau pour le gestionnaire de fichiers Midnight Commander
159 Summary(ja.UTF-8): Midnight Commander でネットワークファイルマネージメントを行うサーバ
160 Summary(pl.UTF-8): Serwer plików Midnight Commandera
161 Summary(pt_BR.UTF-8): Servidor de arquivos do Midnight Commander
162 Summary(ru.UTF-8): Midnight Commander файл-сервер
163 Summary(tr.UTF-8): Midnight Commander dosya sunucusu
164 Summary(uk.UTF-8): Midnight Commander файл-сервер
165 Summary(zh_CN.UTF-8): mc 网络文件管理系统的服务器。
167 Requires(post,preun): /sbin/chkconfig
168 Requires: pam >= 0.99.7.1-1
170 Requires: rc-scripts >= 0.4.1.5
172 %description -n mcserv
173 The Midnight Commander file management system will allow you to
174 manipulate the files on a remote machine as if they were local. This
175 is only possible if the remote machine is running the mcserv server
176 program. Mcserv provides clients running Midnight Commander with
177 access to the host's file systems.
179 %description -n mcserv -l de.UTF-8
180 mcserv ist das Server-Programm für das Netzwerkdateisystem Midnight
181 Commander. Es ermöglicht den Zugriff auf das Host-Dateisystem für
182 Clients, die das Midnight-Dateisystem ausführen (z.Zt. nur Midnight
183 Commander file manager).
185 %description -n mcserv -l es.UTF-8
186 Mcserv es un servidor para el sistema de archivos en red del Midnight
187 Commander. Permite que clientes usando el mc accedan remotamente al
188 sistema de archivos de la máquina en que está ejecutando.
190 %description -n mcserv -l fr.UTF-8
191 Le système de gestion de fichier Midnight Commander vous permet de
192 manipuler des fichiers sur une machine distante comme si ils étaient
193 sur votre propre machine. Ceci est possible seulement si la machine
194 distante possède le programme mcserv et que celui-ci est activé.
195 Mcserv apporte aux machines clientes qui font tourner Midnight
196 Commander un accès aux fichiers situés sur l'hôte.
198 %description -n mcserv -l ja.UTF-8
200 のファイル管理システムは、リモートマシンにあるファイルを
201 ローカルにあるかのように扱うことができます。この機能は mcserv
202 プログラムを 実行しているリモートマシンに対してのみ働きます。 Mcserv
204 クライアントに対して、このホストのファイルシステムを提供します。
206 %description -n mcserv -l pl.UTF-8
207 Mcserv jest aplikacją dla sieciowego systemu plików Midnight
208 Commandera. Pozwala na dostęp do systemu plików dla klienta
209 pracującego pod MC i używającego jego systemu plików.
211 %description -n mcserv -l pt_BR.UTF-8
212 Mcserv é um servidor para o sistema de arquivos em rede do Midnight
213 Commander. Ele permite que clientes usando o mc acessem remotamente o
214 sistema de arquivos da máquina em que está rodando.
216 %description -n mcserv -l ru.UTF-8
217 mcserv - это серверная программа для сетевой файловой системы Midnight
218 Commander. Она обеспечивает доступ к удаленной файловой системе
219 клиентам, поддерживающим файловую систему Midnight Commander (в
220 настоящее время только собственно Midnight Commander).
222 %description -n mcserv -l tr.UTF-8
223 mcserv, Midnight Commander ağ dosya sisteminin sunucu programıdır.
224 Midnight dosya sistemini çalıştıran istemcilerin sunucu dosya
225 sistemine erişimini sağlar.
227 %description -n mcserv -l uk.UTF-8
228 mcserv - це серверна програма для мережевої файлової системи Midnight
229 Commander. Вона забезпечує доступ до віддаленої файлової системи
230 клієнтам, що підтримують файлову систему Midnight Commander (наразі
231 тільки власне Midnight Commander).
234 %setup -q -a3 -n %{name}-%{version}-%{snap}
238 cp -f vfs/extfs/{rpm,srpm}
244 %{!?with_perl_vfs:%patch11 -p1}
265 # convert files in /lib to UTF-8
267 for i in mc.hint mc.hint.es mc.hint.it mc.hint.nl; do
268 iconv -f iso-8859-1 -t utf-8 < ${i} > ${i}.tmp
272 for i in mc.hint.cs mc.hint.hu mc.hint.pl; do
273 iconv -f iso-8859-2 -t utf-8 < ${i} > ${i}.tmp
277 for i in mc.hint.sr mc.menu.sr; do
278 iconv -f iso-8859-5 -t utf-8 < ${i} > ${i}.tmp
282 iconv -f koi8-r -t utf8 < mc.hint.ru > mc.hint.ru.tmp
283 mv -f mc.hint.ru.tmp mc.hint.ru
284 iconv -f koi8-u -t utf8 < mc.hint.uk > mc.hint.uk.tmp
285 mv -f mc.hint.uk.tmp mc.hint.uk
286 iconv -f big5 -t utf8 < mc.hint.zh > mc.hint.zh.tmp
287 mv -f mc.hint.zh.tmp mc.hint.zh
290 # convert man pages in /doc to UTF-8
294 for i in mc.1.in xnc.hlp; do
295 iconv -f koi8-r -t utf-8 < ${i} > ${i}.tmp
301 for i in mc.1.in mcserv.8.in xnc.hlp; do
302 iconv -f iso-8859-5 -t utf-8 < ${i} > ${i}.tmp
308 for i in mc.1.in xnc.hlp; do
309 iconv -f iso-8859-3 -t utf-8 < ${d}/${i} > ${d}/${i}.tmp
310 mv -f ${d}/${i}.tmp ${d}/${i}
315 for i in mc.1.in xnc.hlp; do
316 iconv -f iso-8859-2 -t utf-8 < ${d}/${i} > ${d}/${i}.tmp
317 mv -f ${d}/${i}.tmp ${d}/${i}
323 rm -f syntax/Syntax.orig
324 sed -i 's:|hxx|:|hh|hpp|hxx|:' syntax/Syntax
332 if [ -f /usr/bin/netscape ]; then
335 if [ -f /usr/bin/galeon ]; then
338 if [ -f /usr/bin/mozilla ]; then
347 CFLAGS="-DUTF8 %{rpmcflags}"
352 --with%{!?debug:out}-debug \
353 --with%{!?with_ext2undel:out}-ext2undel \
354 --with%{!?with_x:out}-x \
357 %{?with_samba:--with-samba} \
358 --with-configdir=/etc/samba \
359 --with-codepagedir=/etc/samba/codepages \
361 --with-screen=%{?!with_utf8:mc}slang \
367 rm -rf $RPM_BUILD_ROOT
368 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pixmapsdir},%{_desktopdir}} \
369 $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,shrc.d,sysconfig} \
370 $RPM_BUILD_ROOT%{_mandir}/man8
373 DESTDIR=$RPM_BUILD_ROOT
375 install doc/mcserv.8 $RPM_BUILD_ROOT%{_mandir}/man8
377 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/mcserv
378 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mcserv
379 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/mcserv
380 install %{SOURCE7} $RPM_BUILD_ROOT%{_desktopdir}
381 install %{SOURCE8} $RPM_BUILD_ROOT%{_pixmapsdir}
384 for b in man1 man8 ; do
385 install -d $RPM_BUILD_ROOT%{_mandir}/{$a,$a/$b}
386 for c in man/$a/$b/* ; do
387 install $c $RPM_BUILD_ROOT%{_mandir}/$a/$b
392 install lib/{mc.sh,mc.csh} $RPM_BUILD_ROOT/etc/shrc.d
397 rm -rf $RPM_BUILD_ROOT
400 /sbin/chkconfig --add mcserv
401 %service mcserv restart "mcserv daemon"
404 if [ "$1" = "0" ]; then
406 /sbin/chkconfig --del mcserv
409 %files -f %{name}.lang
410 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_bindir}/mc*
413 %config /etc/shrc.d/*
414 %attr(755,root,root) %{_libdir}/mc/cons.saver
420 %{_datadir}/mc/syntax
422 %{_datadir}/mc/mc.ext
423 %{_datadir}/mc/cedit*
424 %{_datadir}/mc/edit.*
425 %{_datadir}/mc/mc.hlp
426 %lang(es) %{_datadir}/mc/mc.hlp.es
427 %lang(hu) %{_datadir}/mc/mc.hlp.hu
428 %lang(it) %{_datadir}/mc/mc.hlp.it
429 %lang(pl) %{_datadir}/mc/mc.hlp.pl
430 %lang(ru) %{_datadir}/mc/mc.hlp.ru
431 %lang(sr) %{_datadir}/mc/mc.hlp.sr
432 %{_datadir}/mc/mc.lib
433 %{_datadir}/mc/mc.menu
434 %lang(sr) %{_datadir}/mc/mc.menu.sr
435 %{_datadir}/mc/mc.hint
436 %lang(cs) %{_datadir}/mc/mc.hint.cs
437 %lang(es) %{_datadir}/mc/mc.hint.es
438 %lang(hu) %{_datadir}/mc/mc.hint.hu
439 %lang(it) %{_datadir}/mc/mc.hint.it
440 %lang(nl) %{_datadir}/mc/mc.hint.nl
441 %lang(pl) %{_datadir}/mc/mc.hint.pl
442 %lang(ru) %{_datadir}/mc/mc.hint.ru
443 %lang(sr) %{_datadir}/mc/mc.hint.sr
444 %lang(uk) %{_datadir}/mc/mc.hint.uk
445 %lang(zh) %{_datadir}/mc/mc.hint.zh
447 %dir %{_datadir}/mc/extfs
448 %{_datadir}/mc/extfs/README
449 %{_datadir}/mc/extfs/extfs.ini
450 %{_datadir}/mc/extfs/sfs.ini
452 %attr(755,root,root) %{_datadir}/mc/extfs/a
453 %attr(755,root,root) %{_datadir}/mc/extfs/apt
454 %attr(755,root,root) %{_datadir}/mc/extfs/deb*
455 %attr(755,root,root) %{_datadir}/mc/extfs/dpkg
456 #%attr(755,root,root) %{_datadir}/mc/extfs/ftplist
457 %attr(755,root,root) %{_datadir}/mc/extfs/mailfs
458 %attr(755,root,root) %{_datadir}/mc/extfs/patchfs
459 %attr(755,root,root) %{_datadir}/mc/extfs/rpms
460 #%attr(755,root,root) %{_datadir}/mc/extfs/ucpio
461 %attr(755,root,root) %{_datadir}/mc/extfs/uzip
463 %attr(755,root,root) %{_datadir}/mc/extfs/audio
464 %attr(755,root,root) %{_datadir}/mc/extfs/bpp
465 %attr(755,root,root) %{_datadir}/mc/extfs/hp48
466 %attr(755,root,root) %{_datadir}/mc/extfs/iso9660
467 %attr(755,root,root) %{_datadir}/mc/extfs/lslR
468 %attr(755,root,root) %{_datadir}/mc/extfs/rpm
469 %attr(755,root,root) %{_datadir}/mc/extfs/trpm
470 %attr(755,root,root) %{_datadir}/mc/extfs/u7z
471 %attr(755,root,root) %{_datadir}/mc/extfs/ualz
472 %attr(755,root,root) %{_datadir}/mc/extfs/uar*
473 %attr(755,root,root) %{_datadir}/mc/extfs/uha
474 %attr(755,root,root) %{_datadir}/mc/extfs/ulha
475 %attr(755,root,root) %{_datadir}/mc/extfs/urar
476 %attr(755,root,root) %{_datadir}/mc/extfs/uzoo
477 %attr(755,root,root) %{_datadir}/mc/extfs/srpm
478 %{_desktopdir}/mc.desktop
479 %{_pixmapsdir}/mc.png
481 %{_datadir}/mc/mc.charsets
484 %lang(es) %{_mandir}/es/man1/*
485 %lang(hu) %{_mandir}/hu/man1/*
486 %lang(it) %{_mandir}/it/man1/*
487 %lang(pl) %{_mandir}/pl/man1/*
488 %lang(ru) %{_mandir}/ru/man1/*
489 %lang(sr) %{_mandir}/sr/man1/*
492 %defattr(644,root,root,755)
493 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
495 %attr(754,root,root) /etc/rc.d/init.d/mcserv
496 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mcserv
497 %{_mandir}/man8/mcserv.8*
498 %lang(es) %{_mandir}/es/man8/mcserv.8*
499 %lang(pl) %{_mandir}/pl/man8/mcserv.8*
500 %lang(sr) %{_mandir}/sr/man8/mcserv.8*
501 %attr(755,root,root) %{_sbindir}/mcserv