]> git.pld-linux.org Git - packages/mc.git/blob - mc.spec
- up to 4.6.2 pre1
[packages/mc.git] / mc.spec
1 # TODO:
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)
5 #
6 # Conditional build:
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
12 #
13 %define snap    pre1
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
25 Name:           mc
26 Version:        4.6.2
27 Release:        0.%{snap}.1
28 License:        GPL v2+
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
38 Source8:        %{name}.png
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
65 BuildRequires:  indent
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
72 %if %{with utf8}
73 BuildRequires:  slang-devel >= 1:2.0.0
74 %endif
75 %ifnarch s390 s390x
76 BuildRequires:  gpm-devel
77 %endif
78 # Needed? %%{?with_perl_vfs:Requires:   perl-base}
79 %{?with_x:BuildRequires:        xorg-lib-libX11-devel}
80 %{?with_ext2undel:BuildRequires:        e2fsprogs-devel}
81 Requires:       file
82 Requires:       pam >= 0.77.3
83 Requires:       sed
84 Requires:       setup >= 2.4.6-2
85 Suggests:       bzip2
86 Suggests:       gzip
87 Suggests:       lynx
88 Suggests:       tar
89 Suggests:       unzip
90 Obsoletes:      tkmc
91 Conflicts:      bash < 2.05b
92 Conflicts:      rpm < 4.0
93 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
94
95 %define         specflags_ia32   -fomit-frame-pointer
96
97 %description
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. :-)
102
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.
109
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. :-)
117
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.
126
127 %description -l ja.UTF-8
128 Midnight Commander はいろいろな機能を持ったファイルマネージャ兼
129 ビジュアルシェルです。これはテキストモードのアプリケーションですが、
130 GPM を使っている場合、マウスが使えます。 Midnight Commander には、 FTP
131 に接続できたり、 tar や zip や RPM の中が見えるなど、クールな機能
132 があります。
133
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.
139
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
146 específicos. :-)
147
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.
153
154 %package -n mcserv
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 网络文件管理系统的服务器。
166 Group:          Daemons
167 Requires(post,preun):   /sbin/chkconfig
168 Requires:       pam >= 0.99.7.1-1
169 Requires:       portmap
170 Requires:       rc-scripts >= 0.4.1.5
171
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.
178
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).
184
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.
189
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.
197
198 %description -n mcserv -l ja.UTF-8
199 Midnight Commander
200 のファイル管理システムは、リモートマシンにあるファイルを
201 ローカルにあるかのように扱うことができます。この機能は mcserv
202 プログラムを 実行しているリモートマシンに対してのみ働きます。 Mcserv
203 は Midnight Commander
204 クライアントに対して、このホストのファイルシステムを提供します。
205
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.
210
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.
215
216 %description -n mcserv -l ru.UTF-8
217 mcserv - это серверная программа для сетевой файловой системы Midnight
218 Commander. Она обеспечивает доступ к удаленной файловой системе
219 клиентам, поддерживающим файловую систему Midnight Commander (в
220 настоящее время только собственно Midnight Commander).
221
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.
226
227 %description -n mcserv -l uk.UTF-8
228 mcserv - це серверна програма для мережевої файлової системи Midnight
229 Commander. Вона забезпечує доступ до віддаленої файлової системи
230 клієнтам, що підтримують файлову систему Midnight Commander (наразі
231 тільки власне Midnight Commander).
232
233 %prep
234 %setup -q -a3 -n %{name}-%{version}-%{snap}
235 %patch0 -p1
236 %patch1 -p1
237 %patch2 -p1
238 cp -f vfs/extfs/{rpm,srpm}
239 %patch3 -p1
240 %patch4 -p1
241 %patch5 -p1
242 %patch8 -p1
243 %patch10 -p1
244 %{!?with_perl_vfs:%patch11 -p1}
245 %patch12 -p1
246 %if %{with utf8}
247 %patch13 -p1
248 %endif
249 %patch14 -p1
250 %patch15 -p1
251 %patch16 -p1
252 %patch17 -p1
253
254 %patch21 -p1
255 %if %{with utf8}
256 %patch22 -p1
257 %patch23 -p1
258 %endif
259 %patch24 -p1
260
261 mv -f po/{no,nb}.po
262 rm -f po/stamp-po
263
264 %if %{with utf8}
265 # convert files in /lib to UTF-8
266 cd lib
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
269         mv -f ${i}.tmp ${i}
270 done
271
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
274         mv -f ${i}.tmp ${i}
275 done
276
277 for i in mc.hint.sr mc.menu.sr; do
278         iconv -f iso-8859-5 -t utf-8 < ${i} > ${i}.tmp
279         mv -f ${i}.tmp ${i}
280 done
281
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
288 cd ..
289
290 # convert man pages in /doc to UTF-8
291 cd doc
292
293 cd ru
294 for i in mc.1.in xnc.hlp; do
295         iconv -f koi8-r -t utf-8 < ${i} > ${i}.tmp
296         mv -f ${i}.tmp ${i}
297 done
298 cd ..
299
300 cd sr
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
303         mv -f ${i}.tmp ${i}
304 done
305 cd ..
306
307 for d in es it; do
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}
311         done
312 done
313
314 for d in hu pl; do
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}
318         done
319 done
320 cd ..
321 %endif
322
323 rm -f syntax/Syntax.orig
324 sed -i 's:|hxx|:|hh|hpp|hxx|:' syntax/Syntax
325
326 %build
327 %{__gettextize}
328 %{__aclocal} -I m4
329 %{__autoconf}
330 %{__automake}
331 X11_WWW="
332 if [ -f /usr/bin/netscape ]; then
333         netscape;
334 else
335         if [ -f /usr/bin/galeon ]; then
336                 galeon
337         else
338                 if [ -f /usr/bin/mozilla ]; then
339                         mozilla
340                 else
341                         xterm -c lynx
342                 fi;
343         fi;
344 fi"
345
346 %if %{with utf8}
347 CFLAGS="-DUTF8 %{rpmcflags}"
348 export CFLAGS
349 %endif
350 %configure \
351         --enable-charset \
352         --with%{!?debug:out}-debug \
353         --with%{!?with_ext2undel:out}-ext2undel \
354         --with%{!?with_x:out}-x \
355         --with-vfs \
356         --with-mcfs \
357         %{?with_samba:--with-samba} \
358         --with-configdir=/etc/samba \
359         --with-codepagedir=/etc/samba/codepages \
360         --with-gpm-mouse \
361         --with-screen=%{?!with_utf8:mc}slang \
362         --with-edit
363
364 %{__make}
365
366 %install
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
371
372 %{__make} install \
373         DESTDIR=$RPM_BUILD_ROOT
374
375 install doc/mcserv.8 $RPM_BUILD_ROOT%{_mandir}/man8
376
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}
382
383 for a in es pl ; do
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
388                 done
389         done
390 done
391
392 install lib/{mc.sh,mc.csh} $RPM_BUILD_ROOT/etc/shrc.d
393
394 %find_lang %{name}
395
396 %clean
397 rm -rf $RPM_BUILD_ROOT
398
399 %post -n mcserv
400 /sbin/chkconfig --add mcserv
401 %service mcserv restart "mcserv daemon"
402
403 %preun -n mcserv
404 if [ "$1" = "0" ]; then
405         %service mcserv stop
406         /sbin/chkconfig --del mcserv
407 fi
408
409 %files -f %{name}.lang
410 %defattr(644,root,root,755)
411 %doc FAQ NEWS README
412 %attr(755,root,root) %{_bindir}/mc*
413 %config /etc/shrc.d/*
414 %attr(755,root,root) %{_libdir}/mc/cons.saver
415 %dir %{_libdir}/mc
416
417 %dir %{_datadir}/mc
418
419 %{_datadir}/mc/bin
420 %{_datadir}/mc/syntax
421
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
446
447 %dir %{_datadir}/mc/extfs
448 %{_datadir}/mc/extfs/README
449 %{_datadir}/mc/extfs/extfs.ini
450 %{_datadir}/mc/extfs/sfs.ini
451 %if %{with perl_vfs}
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
462 %endif
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
480
481 %{_datadir}/mc/mc.charsets
482
483 %{_mandir}/man1/*
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/*
490
491 %files -n mcserv
492 %defattr(644,root,root,755)
493 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
494
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
This page took 0.061907 seconds and 4 git commands to generate.