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