]> git.pld-linux.org Git - packages/mc.git/blob - mc.spec
- find_options patch is back for Titanium builds, case sensitiviness and
[packages/mc.git] / mc.spec
1 # TODO:
2 # - check spec-syntax,mo patches
3 # - update ancient X11_WWW (or drop if it's no longer used)
4 #
5 # Conditional build:
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
11 #
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
23 Name:           mc
24 Version:        4.6.2
25 Release:        0.1
26 License:        GPL v2+
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
36 Source8:        %{name}.png
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
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:       p7zip-standalone
89 Suggests:       rpm-utils
90 Suggests:       tar
91 Suggests:       unzip
92 Obsoletes:      tkmc
93 Conflicts:      bash < 2.05b
94 Conflicts:      rpm < 4.0
95 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
96
97 %define         specflags_ia32   -fomit-frame-pointer
98
99 %description
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. :-)
104
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.
111
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. :-)
119
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.
128
129 %description -l ja.UTF-8
130 Midnight Commander はいろいろな機能を持ったファイルマネージャ兼
131 ビジュアルシェルです。これはテキストモードのアプリケーションですが、
132 GPM を使っている場合、マウスが使えます。 Midnight Commander には、 FTP
133 に接続できたり、 tar や zip や RPM の中が見えるなど、クールな機能
134 があります。
135
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.
141
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
148 específicos. :-)
149
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.
155
156 %package -n mcserv
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 网络文件管理系统的服务器。
168 Group:          Daemons
169 Requires(post,preun):   /sbin/chkconfig
170 Requires:       pam >= 0.99.7.1-1
171 Requires:       portmap
172 Requires:       rc-scripts >= 0.4.1.5
173
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.
180
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).
186
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.
191
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.
199
200 %description -n mcserv -l ja.UTF-8
201 Midnight Commander
202 のファイル管理システムは、リモートマシンにあるファイルを
203 ローカルにあるかのように扱うことができます。この機能は mcserv
204 プログラムを 実行しているリモートマシンに対してのみ働きます。 Mcserv
205 は Midnight Commander
206 クライアントに対して、このホストのファイルシステムを提供します。
207
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.
212
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.
217
218 %description -n mcserv -l ru.UTF-8
219 mcserv - это серверная программа для сетевой файловой системы Midnight
220 Commander. Она обеспечивает доступ к удаленной файловой системе
221 клиентам, поддерживающим файловую систему Midnight Commander (в
222 настоящее время только собственно Midnight Commander).
223
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.
228
229 %description -n mcserv -l uk.UTF-8
230 mcserv - це серверна програма для мережевої файлової системи Midnight
231 Commander. Вона забезпечує доступ до віддаленої файлової системи
232 клієнтам, що підтримують файлову систему Midnight Commander (наразі
233 тільки власне Midnight Commander).
234
235 %prep
236 %setup -q -a3 -n %{name}-%{version}
237 %patch0 -p1
238 %patch1 -p1
239 %patch2 -p1
240 cp -f vfs/extfs/{rpm,srpm}
241 %patch3 -p1
242 %patch4 -p1
243 %patch5 -p1
244 %patch6 -p1
245 %patch7 -p1
246 %patch8 -p1
247 %patch10 -p1
248 %{!?with_perl_vfs:%patch11 -p1}
249 %patch12 -p1
250 %if %{with utf8}
251 %patch13 -p1
252 %endif
253 %patch14 -p1
254 %patch15 -p1
255 %patch16 -p1
256 %patch17 -p1
257 %patch21 -p1
258 %if "%{pld_release}" == "ti"
259 %patch24 -p1
260 %endif
261 %patch25 -p1
262 %patch26 -p1
263
264 mv -f po/{no,nb}.po
265 rm -f po/stamp-po
266
267 %if %{with utf8}
268 # convert files in /lib to UTF-8
269 cd lib
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
272         mv -f ${i}.tmp ${i}
273 done
274
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
277         mv -f ${i}.tmp ${i}
278 done
279
280 for i in mc.hint.sr mc.menu.sr; do
281         iconv -f iso-8859-5 -t utf-8 < ${i} > ${i}.tmp
282         mv -f ${i}.tmp ${i}
283 done
284
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
291 cd ..
292
293 # convert man pages in /doc to UTF-8
294 cd doc
295
296 cd ru
297 for i in mc.1.in xnc.hlp; do
298         iconv -f koi8-r -t utf-8 < ${i} > ${i}.tmp
299         mv -f ${i}.tmp ${i}
300 done
301 cd ..
302
303 cd sr
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
306         mv -f ${i}.tmp ${i}
307 done
308 cd ..
309
310 for d in es it; do
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}
314         done
315 done
316
317 for d in hu pl; do
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}
321         done
322 done
323 cd ..
324 %endif
325
326 rm -f syntax/Syntax.orig
327 sed -i 's:|hxx|:|hh|hpp|hxx|tcc|:' syntax/Syntax
328
329 %build
330 %{__gettextize}
331 %{__aclocal} -I m4
332 %{__autoconf}
333 %{__automake}
334 X11_WWW="
335 if [ -f /usr/bin/iceweasel ]; then
336         iceweasel;
337 else
338         if [ -f /usr/bin/galeon ]; then
339                 galeon
340         else
341                 if [ -f /usr/bin/mozilla ]; then
342                         mozilla
343                 else
344                         xterm -c lynx
345                 fi;
346         fi;
347 fi"
348
349 %if %{with utf8}
350 CFLAGS="-DUTF8 %{rpmcflags}"
351 export CFLAGS
352 %endif
353 %configure \
354         --enable-dependency-tracking \
355         --enable-charset \
356         --with%{!?debug:out}-debug \
357         --with%{!?with_ext2undel:out}-ext2undel \
358         --with%{!?with_x:out}-x \
359         --with-vfs \
360         --with-mcfs \
361         %{?with_samba:--with-samba} \
362         --with-configdir=/etc/samba \
363         --with-codepagedir=/etc/samba/codepages \
364         --with-gpm-mouse \
365         --with-screen=%{?!with_utf8:mc}slang \
366         --with-edit
367
368 %{__make}
369
370 %install
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
375
376 %{__make} install \
377         DESTDIR=$RPM_BUILD_ROOT
378
379 install doc/mcserv.8 $RPM_BUILD_ROOT%{_mandir}/man8
380
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}
386
387 for a in es pl ; do
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
392                 done
393         done
394 done
395
396 install lib/{mc.sh,mc.csh} $RPM_BUILD_ROOT/etc/shrc.d
397
398 %find_lang %{name}
399
400 %clean
401 rm -rf $RPM_BUILD_ROOT
402
403 %post -n mcserv
404 /sbin/chkconfig --add mcserv
405 %service mcserv restart "mcserv daemon"
406
407 %preun -n mcserv
408 if [ "$1" = "0" ]; then
409         %service mcserv stop
410         /sbin/chkconfig --del mcserv
411 fi
412
413 %files -f %{name}.lang
414 %defattr(644,root,root,755)
415 %doc FAQ NEWS README
416 %attr(755,root,root) %{_bindir}/mc*
417 %config /etc/shrc.d/*
418 %attr(755,root,root) %{_libdir}/mc/cons.saver
419 %dir %{_libdir}/mc
420
421 %dir %{_datadir}/mc
422
423 %{_datadir}/mc/bin
424 %{_datadir}/mc/syntax
425
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
450
451 %dir %{_datadir}/mc/extfs
452 %{_datadir}/mc/extfs/README
453 %{_datadir}/mc/extfs/extfs.ini
454 %{_datadir}/mc/extfs/sfs.ini
455 %if %{with perl_vfs}
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
466 %endif
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
484
485 %{_datadir}/mc/mc.charsets
486
487 %{_mandir}/man1/*
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/*
494
495 %files -n mcserv
496 %defattr(644,root,root,755)
497 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
498
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
This page took 0.055927 seconds and 4 git commands to generate.