2 # - check spec-syntax,mo patches
3 # - update ancient X11_WWW (or drop if it's no longer used)
6 %bcond_with ext2undel # with ext2 undelete fs
7 %bcond_without perl_vfs # without perl depending vfs'es -- to avoid perl autoreq
8 %bcond_with samba # with SAMBA vfs support
9 %bcond_without x # without text edit in X support
10 %bcond_without utf8 # utf8
12 Summary: A user-friendly file manager and visual shell
13 Summary(de.UTF-8): Visuelle Shell Midnight Commander
14 Summary(es.UTF-8): Interpretador de comandos visual Midnight Commander
15 Summary(fr.UTF-8): Un gestionnaire de fichiers puissant et agréable en mode console
16 Summary(ja.UTF-8): 使いやすいファイルマネージャとビジュアルシェル
17 Summary(pl.UTF-8): Midnight Commander - powłoka wizualna
18 Summary(pt_BR.UTF-8): Interpretador de comandos visual Midnight Commander
19 Summary(ru.UTF-8): Диспетчер файлов Midnight Commander
20 Summary(tr.UTF-8): Midnight Commander görsel kabuğu
21 Summary(uk.UTF-8): Диспетчер файлів Midnight Commander
22 Summary(zh_CN.UTF-8): 一个方便实用的文件管理器和虚拟Shell
27 Group: Applications/Shells
28 Source0: http://www.midnight-commander.org/downloads/%{name}-%{version}.tar.gz
29 # Source0-md5: ec92966f4d0c8b50c344fe901859ae2a
30 Source1: %{name}serv.pamd
31 Source2: %{name}serv.init
32 Source3: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
33 # Source3-md5: 17d7b574e1b85ad6f8ddceda9e841f19
34 Source6: %{name}serv.sysconfig
35 Source7: %{name}.desktop
37 Patch0: %{name}-rpmfs.patch
38 Patch1: %{name}-spec-syntax.patch
39 Patch2: %{name}-urar.patch
40 Patch3: %{name}-srpm.patch
41 Patch4: %{name}-home_etc2.patch
42 Patch5: %{name}-pl.patch
43 Patch6: %{name}-no-ws-visible.patch
44 Patch7: %{name}-mhl.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.midnight-commander.org/downloads/mc-4.6.2-utf8.patch.gz
51 Patch13: %{name}-%{version}-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 Patch24: %{name}-find_options.patch
58 Patch25: %{name}-verilog-syntax.patch
59 Patch26: %{name}-awk-syntax.patch
60 URL: http://www.midnight-commander.org/
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
88 Suggests: p7zip-standalone
93 Conflicts: bash < 2.05b
95 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97 %define specflags_ia32 -fomit-frame-pointer
100 Midnight Commander is a visual shell much like a file manager, only
101 with way more features. It is text mode, but also includes mouse
102 support if you are running GPM. Its coolest feature is the ability to
103 FTP, view tar, zip files, and poke into RPMs for specific files. :-)
105 %description -l de.UTF-8
106 Midnight Commander ist ein Visual-Shell, ähnlich einem Dateimanager,
107 aber mit zusätzlichen Funktionen. Es läuft im Textmodus, kann jedoch
108 eine Maus unterstützen, wenn GPM betrieben wird. Seine coolsten
109 Fähigkeiten sind die FTP-Option, das Einsehen von tar- und zip-Dateien
110 und das Herausfischen von spezifischen Dateien aus RPMs.
112 %description -l es.UTF-8
113 Midnight Commander es un interpretador de comandos visual que más
114 parece un administrador de archivos, solamente con varias
115 características a más. Es un programa en modo texto, pero incluye
116 soporte para ratón, si estuviera ejecutando GPM o en una ventana
117 xterm. Su característica más genial es la habilidad de cotillear en
118 RPMs buscando archivos específicos. :-)
120 %description -l fr.UTF-8
121 Midnight Commander est une interface pour la ligne de commande qui
122 tient beaucoup du gestionnaire de fichiers, mais est bien plus
123 puissant. Il fonctionne en mode console (texte), mais peut être
124 contrôlé à la souris si GPM est présent. Ses caractéristiques les plus
125 remarquables sont la possibilité de se connecter à un serveur FTP, de
126 visualiser des archives tar, de compresser des fichiers avec zip, de
127 récupérer des fichiers dans les packages RPM, et tout ceci simplement.
129 %description -l ja.UTF-8
130 Midnight Commander はいろいろな機能を持ったファイルマネージャ兼
131 ビジュアルシェルです。これはテキストモードのアプリケーションですが、
132 GPM を使っている場合、マウスが使えます。 Midnight Commander には、 FTP
133 に接続できたり、 tar や zip や RPM の中が見えるなど、クールな機能
136 %description -l pl.UTF-8
137 Midnight Commander jest wizualną powłoką podobną do Norton Commandera.
138 Pracuje w trybie tekstowym, ale ma także obsługę myszki. Jest super ;)
139 MC ma wbudowanego klienta FTP, może zaglądać do skompresowanych
140 archiwów tar i zip, a także oglądać pliki w pakietach RPM.
142 %description -l pt_BR.UTF-8
143 Midnight Commander é um interpretador de comandos visual que mais
144 parece um gerenciador de arquivos, somente com várias características
145 a mais. Ele é um programa de modo texto, mas inclui suporte para mouse
146 se você estiver rodando GPM ou em uma janela xterm. Sua característica
147 mais legal é a habilidade de bisbilhotar em RPMs procurando arquivos
150 %description -l tr.UTF-8
151 Midnight Commander bir dosya yöneticisine çok benzeyen ancak daha
152 yetenekli bir görsel kabuktur. Metin ekranda çalışır ve GPM
153 çalışıyorsa fare desteği vardır. En hoş özellikleri FTP yapabilmesi,
154 tar, zip ve RPM dosyalarının içeriklerini gösterebilmesidir.
157 Summary: Server for the Midnight Commander network file management system
158 Summary(de.UTF-8): Midnight Commander File-Server
159 Summary(es.UTF-8): Servidor de archivos del Midnight Commander
160 Summary(fr.UTF-8): Serveur réseau pour le gestionnaire de fichiers Midnight Commander
161 Summary(ja.UTF-8): Midnight Commander でネットワークファイルマネージメントを行うサーバ
162 Summary(pl.UTF-8): Serwer plików Midnight Commandera
163 Summary(pt_BR.UTF-8): Servidor de arquivos do Midnight Commander
164 Summary(ru.UTF-8): Midnight Commander файл-сервер
165 Summary(tr.UTF-8): Midnight Commander dosya sunucusu
166 Summary(uk.UTF-8): Midnight Commander файл-сервер
167 Summary(zh_CN.UTF-8): mc 网络文件管理系统的服务器。
169 Requires(post,preun): /sbin/chkconfig
170 Requires: pam >= 0.99.7.1-1
172 Requires: rc-scripts >= 0.4.1.5
174 %description -n mcserv
175 The Midnight Commander file management system will allow you to
176 manipulate the files on a remote machine as if they were local. This
177 is only possible if the remote machine is running the mcserv server
178 program. Mcserv provides clients running Midnight Commander with
179 access to the host's file systems.
181 %description -n mcserv -l de.UTF-8
182 mcserv ist das Server-Programm für das Netzwerkdateisystem Midnight
183 Commander. Es ermöglicht den Zugriff auf das Host-Dateisystem für
184 Clients, die das Midnight-Dateisystem ausführen (z.Zt. nur Midnight
185 Commander file manager).
187 %description -n mcserv -l es.UTF-8
188 Mcserv es un servidor para el sistema de archivos en red del Midnight
189 Commander. Permite que clientes usando el mc accedan remotamente al
190 sistema de archivos de la máquina en que está ejecutando.
192 %description -n mcserv -l fr.UTF-8
193 Le système de gestion de fichier Midnight Commander vous permet de
194 manipuler des fichiers sur une machine distante comme si ils étaient
195 sur votre propre machine. Ceci est possible seulement si la machine
196 distante possède le programme mcserv et que celui-ci est activé.
197 Mcserv apporte aux machines clientes qui font tourner Midnight
198 Commander un accès aux fichiers situés sur l'hôte.
200 %description -n mcserv -l ja.UTF-8
202 のファイル管理システムは、リモートマシンにあるファイルを
203 ローカルにあるかのように扱うことができます。この機能は mcserv
204 プログラムを 実行しているリモートマシンに対してのみ働きます。 Mcserv
206 クライアントに対して、このホストのファイルシステムを提供します。
208 %description -n mcserv -l pl.UTF-8
209 Mcserv jest aplikacją dla sieciowego systemu plików Midnight
210 Commandera. Pozwala na dostęp do systemu plików dla klienta
211 pracującego pod MC i używającego jego systemu plików.
213 %description -n mcserv -l pt_BR.UTF-8
214 Mcserv é um servidor para o sistema de arquivos em rede do Midnight
215 Commander. Ele permite que clientes usando o mc acessem remotamente o
216 sistema de arquivos da máquina em que está rodando.
218 %description -n mcserv -l ru.UTF-8
219 mcserv - это серверная программа для сетевой файловой системы Midnight
220 Commander. Она обеспечивает доступ к удаленной файловой системе
221 клиентам, поддерживающим файловую систему Midnight Commander (в
222 настоящее время только собственно Midnight Commander).
224 %description -n mcserv -l tr.UTF-8
225 mcserv, Midnight Commander ağ dosya sisteminin sunucu programıdır.
226 Midnight dosya sistemini çalıştıran istemcilerin sunucu dosya
227 sistemine erişimini sağlar.
229 %description -n mcserv -l uk.UTF-8
230 mcserv - це серверна програма для мережевої файлової системи Midnight
231 Commander. Вона забезпечує доступ до віддаленої файлової системи
232 клієнтам, що підтримують файлову систему Midnight Commander (наразі
233 тільки власне Midnight Commander).
236 %setup -q -a3 -n %{name}-%{version}
240 cp -f vfs/extfs/{rpm,srpm}
248 %{!?with_perl_vfs:%patch11 -p1}
258 %if "%{pld_release}" == "ti"
268 # convert files in /lib to UTF-8
270 for i in mc.hint mc.hint.es mc.hint.it mc.hint.nl; do
271 iconv -f iso-8859-1 -t utf-8 < ${i} > ${i}.tmp
275 for i in mc.hint.cs mc.hint.hu mc.hint.pl; do
276 iconv -f iso-8859-2 -t utf-8 < ${i} > ${i}.tmp
280 for i in mc.hint.sr mc.menu.sr; do
281 iconv -f iso-8859-5 -t utf-8 < ${i} > ${i}.tmp
285 iconv -f koi8-r -t utf8 < mc.hint.ru > mc.hint.ru.tmp
286 mv -f mc.hint.ru.tmp mc.hint.ru
287 iconv -f koi8-u -t utf8 < mc.hint.uk > mc.hint.uk.tmp
288 mv -f mc.hint.uk.tmp mc.hint.uk
289 iconv -f big5 -t utf8 < mc.hint.zh > mc.hint.zh.tmp
290 mv -f mc.hint.zh.tmp mc.hint.zh
293 # convert man pages in /doc to UTF-8
297 for i in mc.1.in xnc.hlp; do
298 iconv -f koi8-r -t utf-8 < ${i} > ${i}.tmp
304 for i in mc.1.in mcserv.8.in xnc.hlp; do
305 iconv -f iso-8859-5 -t utf-8 < ${i} > ${i}.tmp
311 for i in mc.1.in xnc.hlp; do
312 iconv -f iso-8859-3 -t utf-8 < ${d}/${i} > ${d}/${i}.tmp
313 mv -f ${d}/${i}.tmp ${d}/${i}
318 for i in mc.1.in xnc.hlp; do
319 iconv -f iso-8859-2 -t utf-8 < ${d}/${i} > ${d}/${i}.tmp
320 mv -f ${d}/${i}.tmp ${d}/${i}
326 rm -f syntax/Syntax.orig
327 sed -i 's:|hxx|:|hh|hpp|hxx|tcc|:' syntax/Syntax
335 if [ -f /usr/bin/iceweasel ]; then
338 if [ -f /usr/bin/galeon ]; then
341 if [ -f /usr/bin/mozilla ]; then
350 CFLAGS="-DUTF8 %{rpmcflags}"
354 --enable-dependency-tracking \
356 --with%{!?debug:out}-debug \
357 --with%{!?with_ext2undel:out}-ext2undel \
358 --with%{!?with_x:out}-x \
361 %{?with_samba:--with-samba} \
362 --with-configdir=/etc/samba \
363 --with-codepagedir=/etc/samba/codepages \
365 --with-screen=%{?!with_utf8:mc}slang \
371 rm -rf $RPM_BUILD_ROOT
372 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pixmapsdir},%{_desktopdir}} \
373 $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,shrc.d,sysconfig} \
374 $RPM_BUILD_ROOT%{_mandir}/man8
377 DESTDIR=$RPM_BUILD_ROOT
379 install doc/mcserv.8 $RPM_BUILD_ROOT%{_mandir}/man8
381 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/mcserv
382 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mcserv
383 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/mcserv
384 install %{SOURCE7} $RPM_BUILD_ROOT%{_desktopdir}
385 install %{SOURCE8} $RPM_BUILD_ROOT%{_pixmapsdir}
388 for b in man1 man8 ; do
389 install -d $RPM_BUILD_ROOT%{_mandir}/{$a,$a/$b}
390 for c in man/$a/$b/* ; do
391 install $c $RPM_BUILD_ROOT%{_mandir}/$a/$b
396 install lib/{mc.sh,mc.csh} $RPM_BUILD_ROOT/etc/shrc.d
401 rm -rf $RPM_BUILD_ROOT
404 /sbin/chkconfig --add mcserv
405 %service mcserv restart "mcserv daemon"
408 if [ "$1" = "0" ]; then
410 /sbin/chkconfig --del mcserv
413 %files -f %{name}.lang
414 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_bindir}/mc*
417 %config /etc/shrc.d/*
418 %attr(755,root,root) %{_libdir}/mc/cons.saver
424 %{_datadir}/mc/syntax
426 %{_datadir}/mc/mc.ext
427 %{_datadir}/mc/cedit*
428 %{_datadir}/mc/edit.*
429 %{_datadir}/mc/mc.hlp
430 %lang(es) %{_datadir}/mc/mc.hlp.es
431 %lang(hu) %{_datadir}/mc/mc.hlp.hu
432 %lang(it) %{_datadir}/mc/mc.hlp.it
433 %lang(pl) %{_datadir}/mc/mc.hlp.pl
434 %lang(ru) %{_datadir}/mc/mc.hlp.ru
435 %lang(sr) %{_datadir}/mc/mc.hlp.sr
436 %{_datadir}/mc/mc.lib
437 %{_datadir}/mc/mc.menu
438 %lang(sr) %{_datadir}/mc/mc.menu.sr
439 %{_datadir}/mc/mc.hint
440 %lang(cs) %{_datadir}/mc/mc.hint.cs
441 %lang(es) %{_datadir}/mc/mc.hint.es
442 %lang(hu) %{_datadir}/mc/mc.hint.hu
443 %lang(it) %{_datadir}/mc/mc.hint.it
444 %lang(nl) %{_datadir}/mc/mc.hint.nl
445 %lang(pl) %{_datadir}/mc/mc.hint.pl
446 %lang(ru) %{_datadir}/mc/mc.hint.ru
447 %lang(sr) %{_datadir}/mc/mc.hint.sr
448 %lang(uk) %{_datadir}/mc/mc.hint.uk
449 %lang(zh) %{_datadir}/mc/mc.hint.zh
451 %dir %{_datadir}/mc/extfs
452 %{_datadir}/mc/extfs/README
453 %{_datadir}/mc/extfs/extfs.ini
454 %{_datadir}/mc/extfs/sfs.ini
456 %attr(755,root,root) %{_datadir}/mc/extfs/a
457 %attr(755,root,root) %{_datadir}/mc/extfs/apt
458 %attr(755,root,root) %{_datadir}/mc/extfs/deb*
459 %attr(755,root,root) %{_datadir}/mc/extfs/dpkg
460 #%attr(755,root,root) %{_datadir}/mc/extfs/ftplist
461 %attr(755,root,root) %{_datadir}/mc/extfs/mailfs
462 %attr(755,root,root) %{_datadir}/mc/extfs/patchfs
463 %attr(755,root,root) %{_datadir}/mc/extfs/rpms
464 #%attr(755,root,root) %{_datadir}/mc/extfs/ucpio
465 %attr(755,root,root) %{_datadir}/mc/extfs/uzip
467 %attr(755,root,root) %{_datadir}/mc/extfs/audio
468 %attr(755,root,root) %{_datadir}/mc/extfs/bpp
469 %attr(755,root,root) %{_datadir}/mc/extfs/hp48
470 %attr(755,root,root) %{_datadir}/mc/extfs/iso9660
471 %attr(755,root,root) %{_datadir}/mc/extfs/lslR
472 %attr(755,root,root) %{_datadir}/mc/extfs/rpm
473 %attr(755,root,root) %{_datadir}/mc/extfs/trpm
474 %attr(755,root,root) %{_datadir}/mc/extfs/u7z
475 %attr(755,root,root) %{_datadir}/mc/extfs/ualz
476 %attr(755,root,root) %{_datadir}/mc/extfs/uar*
477 %attr(755,root,root) %{_datadir}/mc/extfs/uha
478 %attr(755,root,root) %{_datadir}/mc/extfs/ulha
479 %attr(755,root,root) %{_datadir}/mc/extfs/urar
480 %attr(755,root,root) %{_datadir}/mc/extfs/uzoo
481 %attr(755,root,root) %{_datadir}/mc/extfs/srpm
482 %{_desktopdir}/mc.desktop
483 %{_pixmapsdir}/mc.png
485 %{_datadir}/mc/mc.charsets
488 %lang(es) %{_mandir}/es/man1/*
489 %lang(hu) %{_mandir}/hu/man1/*
490 %lang(it) %{_mandir}/it/man1/*
491 %lang(pl) %{_mandir}/pl/man1/*
492 %lang(ru) %{_mandir}/ru/man1/*
493 %lang(sr) %{_mandir}/sr/man1/*
496 %defattr(644,root,root,755)
497 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
499 %attr(754,root,root) /etc/rc.d/init.d/mcserv
500 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mcserv
501 %{_mandir}/man8/mcserv.8*
502 %lang(es) %{_mandir}/es/man8/mcserv.8*
503 %lang(pl) %{_mandir}/pl/man8/mcserv.8*
504 %lang(sr) %{_mandir}/sr/man8/mcserv.8*
505 %attr(755,root,root) %{_sbindir}/mcserv