]> git.pld-linux.org Git - packages/mc.git/blob - mc.spec
- fixed slang-8bit_xterm.patch, rel. 0.9
[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 #
11 %define snap    pre4
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.7.0
25 Release:        0.9
26 License:        GPL v2+
27 Group:          Applications/Shells
28 Source0:        http://www.midnight-commander.org/downloads/%{name}-%{version}-%{snap}.tar.bz2
29 # Source0-md5:  7bdc0ac4fe57c19a6bf2fd3e8894a073
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:         slang-8bit_xterm.patch
39 Patch4:         %{name}-home_etc2.patch
40 Patch5:         %{name}-pl.patch
41 Patch6:         %{name}-no-ws-visible.patch
42 Patch11:        %{name}-noperl-vfs.patch
43 # at now syntax highligthing for PLD-update-TODO and CVSROOT/users
44 Patch12:        %{name}-pld-developerfriendly.patch
45 Patch17:        %{name}-nolibs.patch
46 Patch24:        %{name}-find_options.patch
47 URL:            http://www.midnight-commander.org/
48 BuildRequires:  autoconf
49 BuildRequires:  automake
50 BuildRequires:  gettext-devel
51 BuildRequires:  glib2-devel
52 BuildRequires:  indent
53 BuildRequires:  libtool
54 BuildRequires:  pam-devel
55 BuildRequires:  pkgconfig
56 BuildRequires:  rpm-perlprov
57 BuildRequires:  rpmbuild(macros) >= 1.268
58 BuildRequires:  sed >= 4.0
59 BuildRequires:  slang-devel >= 2.2.1
60 %ifnarch s390 s390x
61 BuildRequires:  gpm-devel
62 %endif
63 # Needed? %%{?with_perl_vfs:Requires:   perl-base}
64 %{?with_x:BuildRequires:        xorg-lib-libX11-devel}
65 %{?with_ext2undel:BuildRequires:        e2fsprogs-devel}
66 Requires:       file
67 Requires:       pam >= 0.77.3
68 Requires:       sed
69 Requires:       setup >= 2.4.6-2
70 Suggests:       bzip2
71 Suggests:       gzip
72 Suggests:       lynx
73 Suggests:       p7zip-standalone
74 Suggests:       rpm-utils
75 Suggests:       tar
76 Suggests:       unzip
77 Obsoletes:      tkmc
78 Conflicts:      bash < 2.05b
79 Conflicts:      rpm < 4.0
80 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
81
82 %define         specflags_ia32  -fomit-frame-pointer
83
84 %description
85 Midnight Commander is a visual shell much like a file manager, only
86 with way more features. It is text mode, but also includes mouse
87 support if you are running GPM. Its coolest feature is the ability to
88 FTP, view tar, zip files, and poke into RPMs for specific files. :-)
89
90 %description -l de.UTF-8
91 Midnight Commander ist ein Visual-Shell, ähnlich einem Dateimanager,
92 aber mit zusätzlichen Funktionen. Es läuft im Textmodus, kann jedoch
93 eine Maus unterstützen, wenn GPM betrieben wird. Seine coolsten
94 Fähigkeiten sind die FTP-Option, das Einsehen von tar- und zip-Dateien
95 und das Herausfischen von spezifischen Dateien aus RPMs.
96
97 %description -l es.UTF-8
98 Midnight Commander es un interpretador de comandos visual que más
99 parece un administrador de archivos, solamente con varias
100 características a más. Es un programa en modo texto, pero incluye
101 soporte para ratón, si estuviera ejecutando GPM o en una ventana
102 xterm. Su característica más genial es la habilidad de cotillear en
103 RPMs buscando archivos específicos. :-)
104
105 %description -l fr.UTF-8
106 Midnight Commander est une interface pour la ligne de commande qui
107 tient beaucoup du gestionnaire de fichiers, mais est bien plus
108 puissant. Il fonctionne en mode console (texte), mais peut être
109 contrôlé à la souris si GPM est présent. Ses caractéristiques les plus
110 remarquables sont la possibilité de se connecter à un serveur FTP, de
111 visualiser des archives tar, de compresser des fichiers avec zip, de
112 récupérer des fichiers dans les packages RPM, et tout ceci simplement.
113
114 %description -l ja.UTF-8
115 Midnight Commander はいろいろな機能を持ったファイルマネージャ兼
116 ビジュアルシェルです。これはテキストモードのアプリケーションですが、
117 GPM を使っている場合、マウスが使えます。 Midnight Commander には、 FTP
118 に接続できたり、 tar や zip や RPM の中が見えるなど、クールな機能
119 があります。
120
121 %description -l pl.UTF-8
122 Midnight Commander jest wizualną powłoką podobną do Norton Commandera.
123 Pracuje w trybie tekstowym, ale ma także obsługę myszki. Jest super ;)
124 MC ma wbudowanego klienta FTP, może zaglądać do skompresowanych
125 archiwów tar i zip, a także oglądać pliki w pakietach RPM.
126
127 %description -l pt_BR.UTF-8
128 Midnight Commander é um interpretador de comandos visual que mais
129 parece um gerenciador de arquivos, somente com várias características
130 a mais. Ele é um programa de modo texto, mas inclui suporte para mouse
131 se você estiver rodando GPM ou em uma janela xterm. Sua característica
132 mais legal é a habilidade de bisbilhotar em RPMs procurando arquivos
133 específicos. :-)
134
135 %description -l tr.UTF-8
136 Midnight Commander bir dosya yöneticisine çok benzeyen ancak daha
137 yetenekli bir görsel kabuktur. Metin ekranda çalışır ve GPM
138 çalışıyorsa fare desteği vardır. En hoş özellikleri FTP yapabilmesi,
139 tar, zip ve RPM dosyalarının içeriklerini gösterebilmesidir.
140
141 %package -n mcserv
142 Summary:        Server for the Midnight Commander network file management system
143 Summary(de.UTF-8):      Midnight Commander File-Server
144 Summary(es.UTF-8):      Servidor de archivos del Midnight Commander
145 Summary(fr.UTF-8):      Serveur réseau pour le gestionnaire de fichiers Midnight Commander
146 Summary(ja.UTF-8):      Midnight Commander でネットワークファイルマネージメントを行うサーバ
147 Summary(pl.UTF-8):      Serwer plików Midnight Commandera
148 Summary(pt_BR.UTF-8):   Servidor de arquivos do Midnight Commander
149 Summary(ru.UTF-8):      Midnight Commander файл-сервер
150 Summary(tr.UTF-8):      Midnight Commander dosya sunucusu
151 Summary(uk.UTF-8):      Midnight Commander файл-сервер
152 Summary(zh_CN.UTF-8):   mc 网络文件管理系统的服务器。
153 Group:          Daemons
154 Requires(post,preun):   /sbin/chkconfig
155 Requires:       pam >= 0.99.7.1-1
156 Requires:       portmap
157 Requires:       rc-scripts >= 0.4.1.5
158
159 %description -n mcserv
160 The Midnight Commander file management system will allow you to
161 manipulate the files on a remote machine as if they were local. This
162 is only possible if the remote machine is running the mcserv server
163 program. Mcserv provides clients running Midnight Commander with
164 access to the host's file systems.
165
166 %description -n mcserv -l de.UTF-8
167 mcserv ist das Server-Programm für das Netzwerkdateisystem Midnight
168 Commander. Es ermöglicht den Zugriff auf das Host-Dateisystem für
169 Clients, die das Midnight-Dateisystem ausführen (z.Zt. nur Midnight
170 Commander file manager).
171
172 %description -n mcserv -l es.UTF-8
173 Mcserv es un servidor para el sistema de archivos en red del Midnight
174 Commander. Permite que clientes usando el mc accedan remotamente al
175 sistema de archivos de la máquina en que está ejecutando.
176
177 %description -n mcserv -l fr.UTF-8
178 Le système de gestion de fichier Midnight Commander vous permet de
179 manipuler des fichiers sur une machine distante comme si ils étaient
180 sur votre propre machine. Ceci est possible seulement si la machine
181 distante possède le programme mcserv et que celui-ci est activé.
182 Mcserv apporte aux machines clientes qui font tourner Midnight
183 Commander un accès aux fichiers situés sur l'hôte.
184
185 %description -n mcserv -l ja.UTF-8
186 Midnight Commander
187 のファイル管理システムは、リモートマシンにあるファイルを
188 ローカルにあるかのように扱うことができます。この機能は mcserv
189 プログラムを 実行しているリモートマシンに対してのみ働きます。 Mcserv
190 は Midnight Commander
191 クライアントに対して、このホストのファイルシステムを提供します。
192
193 %description -n mcserv -l pl.UTF-8
194 Mcserv jest aplikacją dla sieciowego systemu plików Midnight
195 Commandera. Pozwala na dostęp do systemu plików dla klienta
196 pracującego pod MC i używającego jego systemu plików.
197
198 %description -n mcserv -l pt_BR.UTF-8
199 Mcserv é um servidor para o sistema de arquivos em rede do Midnight
200 Commander. Ele permite que clientes usando o mc acessem remotamente o
201 sistema de arquivos da máquina em que está rodando.
202
203 %description -n mcserv -l ru.UTF-8
204 mcserv - это серверная программа для сетевой файловой системы Midnight
205 Commander. Она обеспечивает доступ к удаленной файловой системе
206 клиентам, поддерживающим файловую систему Midnight Commander (в
207 настоящее время только собственно Midnight Commander).
208
209 %description -n mcserv -l tr.UTF-8
210 mcserv, Midnight Commander ağ dosya sisteminin sunucu programıdır.
211 Midnight dosya sistemini çalıştıran istemcilerin sunucu dosya
212 sistemine erişimini sağlar.
213
214 %description -n mcserv -l uk.UTF-8
215 mcserv - це серверна програма для мережевої файлової системи Midnight
216 Commander. Вона забезпечує доступ до віддаленої файлової системи
217 клієнтам, що підтримують файлову систему Midnight Commander (наразі
218 тільки власне Midnight Commander).
219
220 %prep
221 %setup -q -a3 -n %{name}-%{version}-%{snap}
222 %patch0 -p1
223 %patch1 -p1
224 cp -f vfs/extfs/{rpm,srpm}
225 # doesn't apply
226 #%patch4 -p1
227 # doesn't apply
228 #%patch5 -p1
229 %patch6 -p1
230 %{!?with_perl_vfs:%patch11 -p1}
231 %patch12 -p1
232 %patch17 -p1
233 %if "%{pld_release}" == "ti"
234 %patch24 -p1
235 %endif
236
237 rm -f po/stamp-po
238
239 sed -i 's:|hxx|:|hh|hpp|hxx|tcc|:' syntax/Syntax
240
241 %build
242 %{__gettextize}
243 %{__libtoolize}
244 %{__aclocal} -I m4
245 %{__autoconf}
246 %{__automake}
247 X11_WWW="
248 if [ -f /usr/bin/iceweasel ]; then
249         iceweasel;
250 else
251         if [ -f /usr/bin/galeon ]; then
252                 galeon
253         else
254                 if [ -f /usr/bin/mozilla ]; then
255                         mozilla
256                 else
257                         xterm -c lynx
258                 fi;
259         fi;
260 fi"
261
262 %configure \
263         --enable-dependency-tracking \
264         --enable-charset \
265         --with%{!?debug:out}-debug \
266         --with%{!?with_ext2undel:out}-ext2undel \
267         --with%{!?with_x:out}-x \
268         --with-vfs \
269         --enable-vfs-mcfs \
270         --enable-mcserver \
271         %{?with_samba:--with-samba} \
272         --with-configdir=/etc/samba \
273         --with-codepagedir=/etc/samba/codepages \
274         --with-gpm-mouse \
275         --with-screen=slang \
276         --with-edit
277
278 %{__make}
279
280 %install
281 rm -rf $RPM_BUILD_ROOT
282 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pixmapsdir},%{_desktopdir}} \
283         $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,shrc.d,sysconfig} \
284         $RPM_BUILD_ROOT%{_mandir}/man8
285
286 %{__make} install \
287         DESTDIR=$RPM_BUILD_ROOT
288
289 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/mcserv
290 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mcserv
291 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/mcserv
292 install %{SOURCE7} $RPM_BUILD_ROOT%{_desktopdir}
293 install %{SOURCE8} $RPM_BUILD_ROOT%{_pixmapsdir}
294
295 for a in es pl ; do
296         for b in man1 man8 ; do
297                 install -d $RPM_BUILD_ROOT%{_mandir}/{$a,$a/$b}
298                 for c in man/$a/$b/* ; do
299                         install $c $RPM_BUILD_ROOT%{_mandir}/$a/$b
300                 done
301         done
302 done
303
304 install contrib/{mc.sh,mc.csh} $RPM_BUILD_ROOT/etc/shrc.d
305
306 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/be-tarask
307
308 %find_lang %{name}
309
310 %clean
311 rm -rf $RPM_BUILD_ROOT
312
313 %post -n mcserv
314 /sbin/chkconfig --add mcserv
315 %service mcserv restart "mcserv daemon"
316
317 %preun -n mcserv
318 if [ "$1" = "0" ]; then
319         %service mcserv stop
320         /sbin/chkconfig --del mcserv
321 fi
322
323 %files -f %{name}.lang
324 %defattr(644,root,root,755)
325 %doc NEWS README
326 %attr(755,root,root) %{_bindir}/mc*
327 %config /etc/shrc.d/*
328 %attr(755,root,root) %{_libdir}/mc/cons.saver
329 %dir %{_libdir}/mc
330 %attr(755,root,root) %{_libdir}/mc/*.sh
331 %attr(755,root,root) %{_libdir}/mc/*.csh
332 %dir %{_datadir}/mc
333
334 %{_datadir}/mc/skins
335 %{_datadir}/mc/syntax
336
337 %{_datadir}/mc/mc.hlp
338 %lang(es) %{_datadir}/mc/mc.hlp.es
339 %lang(hu) %{_datadir}/mc/mc.hlp.hu
340 %lang(it) %{_datadir}/mc/mc.hlp.it
341 %lang(pl) %{_datadir}/mc/mc.hlp.pl
342 %lang(ru) %{_datadir}/mc/mc.hlp.ru
343 %lang(sr) %{_datadir}/mc/mc.hlp.sr
344 %{_datadir}/mc/mc.hint
345 %lang(cs) %{_datadir}/mc/mc.hint.cs
346 %lang(es) %{_datadir}/mc/mc.hint.es
347 %lang(hu) %{_datadir}/mc/mc.hint.hu
348 %lang(it) %{_datadir}/mc/mc.hint.it
349 %lang(nl) %{_datadir}/mc/mc.hint.nl
350 %lang(pl) %{_datadir}/mc/mc.hint.pl
351 %lang(ru) %{_datadir}/mc/mc.hint.ru
352 %lang(sr) %{_datadir}/mc/mc.hint.sr
353 %lang(uk) %{_datadir}/mc/mc.hint.uk
354 %lang(zh) %{_datadir}/mc/mc.hint.zh
355
356 %dir %{_datadir}/mc/extfs
357 %{_datadir}/mc/extfs/README
358 %if %{with perl_vfs}
359 %attr(755,root,root) %{_datadir}/mc/extfs/a
360 %attr(755,root,root) %{_datadir}/mc/extfs/apt
361 %attr(755,root,root) %{_datadir}/mc/extfs/deb*
362 %attr(755,root,root) %{_datadir}/mc/extfs/dpkg
363 %attr(755,root,root) %{_datadir}/mc/extfs/mailfs
364 %attr(755,root,root) %{_datadir}/mc/extfs/patchfs
365 %attr(755,root,root) %{_datadir}/mc/extfs/rpms
366 %attr(755,root,root) %{_datadir}/mc/extfs/uzip
367 %endif
368 %attr(755,root,root) %{_datadir}/mc/extfs/audio
369 %attr(755,root,root) %{_datadir}/mc/extfs/bpp
370 %attr(755,root,root) %{_datadir}/mc/extfs/hp48
371 %attr(755,root,root) %{_datadir}/mc/extfs/iso9660
372 %attr(755,root,root) %{_datadir}/mc/extfs/lslR
373 %attr(755,root,root) %{_datadir}/mc/extfs/rpm
374 %attr(755,root,root) %{_datadir}/mc/extfs/trpm
375 %attr(755,root,root) %{_datadir}/mc/extfs/u7z
376 %attr(755,root,root) %{_datadir}/mc/extfs/ualz
377 %attr(755,root,root) %{_datadir}/mc/extfs/uar*
378 %attr(755,root,root) %{_datadir}/mc/extfs/uace
379 %attr(755,root,root) %{_datadir}/mc/extfs/uc1541
380 %attr(755,root,root) %{_datadir}/mc/extfs/ucab
381 %attr(755,root,root) %{_datadir}/mc/extfs/uha
382 %attr(755,root,root) %{_datadir}/mc/extfs/ulha
383 %attr(755,root,root) %{_datadir}/mc/extfs/urar
384 %attr(755,root,root) %{_datadir}/mc/extfs/uzoo
385 %attr(755,root,root) %{_datadir}/mc/extfs/srpm
386 %{_desktopdir}/mc.desktop
387 %{_pixmapsdir}/mc.png
388
389 %{_mandir}/man1/*
390 %lang(es) %{_mandir}/es/man1/*
391 %lang(hu) %{_mandir}/hu/man1/*
392 %lang(it) %{_mandir}/it/man1/*
393 %lang(pl) %{_mandir}/pl/man1/*
394 %lang(ru) %{_mandir}/ru/man1/*
395 %lang(sr) %{_mandir}/sr/man1/*
396
397 %dir %{_sysconfdir}/mc
398 %config(noreplace) %verify(not md5 mtime size) /etc/mc/Syntax
399 %config(noreplace) %verify(not md5 mtime size) /etc/mc/*.*
400 %dir %{_sysconfdir}/mc/extfs
401 %config(noreplace) %verify(not md5 mtime size) /etc/mc/extfs/*.*
402
403 %files -n mcserv
404 %defattr(644,root,root,755)
405 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
406 %attr(754,root,root) /etc/rc.d/init.d/mcserv
407 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mcserv
408 %{_mandir}/man8/mcserv.8*
409 %lang(es) %{_mandir}/es/man8/mcserv.8*
410 %lang(pl) %{_mandir}/pl/man8/mcserv.8*
411 %lang(sr) %{_mandir}/sr/man8/mcserv.8*
412 %attr(755,root,root) %{_sbindir}/mcserv
This page took 0.163729 seconds and 4 git commands to generate.