]> TLD Linux GIT Repositories - packages/mc.git/blob - mc.spec
- from PLD
[packages/mc.git] / mc.spec
1 #
2 # Conditional build:
3 %bcond_with     ext2undel       # with ext2 undelete fs
4 %bcond_without  perl_vfs        # without perl depending vfs'es -- to avoid perl autoreq
5 %bcond_with     samba           # with SAMBA vfs support
6 %bcond_without  x               # without text edit in X support
7 #
8 Summary:        A user-friendly file manager and visual shell
9 Summary(de.UTF-8):      Visuelle Shell Midnight Commander
10 Summary(es.UTF-8):      Interpretador de comandos visual Midnight Commander
11 Summary(fr.UTF-8):      Un gestionnaire de fichiers puissant et agréable en mode console
12 Summary(hu.UTF-8):      Egy felhasználóbarát fájlkezelő és vizuális shell
13 Summary(ja.UTF-8):      使いやすいファイルマネージャとビジュアルシェル
14 Summary(pl.UTF-8):      Midnight Commander - powłoka wizualna
15 Summary(pt_BR.UTF-8):   Interpretador de comandos visual Midnight Commander
16 Summary(ru.UTF-8):      Диспетчер файлов Midnight Commander
17 Summary(tr.UTF-8):      Midnight Commander görsel kabuğu
18 Summary(uk.UTF-8):      Диспетчер файлів Midnight Commander
19 Summary(zh_CN.UTF-8):   一个方便实用的文件管理器和虚拟Shell
20 Name:           mc
21 Version:        4.8.12
22 Release:        2
23 Epoch:          1
24 License:        GPL v3+
25 Group:          Applications/Shells
26 Source0:        http://ftp.midnight-commander.org/%{name}-%{version}.tar.xz
27 # Source0-md5:  7ecccc03df060cd0ca1414a5a14e6649
28 Source3:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
29 # Source3-md5:  17d7b574e1b85ad6f8ddceda9e841f19
30 Source7:        %{name}.desktop
31 Source8:        %{name}.png
32 Patch2:         %{name}-no-ws-visible.patch
33 Patch3:         %{name}-noperl-vfs.patch
34 # at now syntax highligthing for PLD-update-TODO and CVSROOT/users
35 Patch4:         %{name}-pld-developerfriendly.patch
36 URL:            http://www.midnight-commander.org/
37 BuildRequires:  autoconf >= 2.60
38 BuildRequires:  automake >= 1.5
39 %{?with_ext2undel:BuildRequires:        e2fsprogs-devel}
40 BuildRequires:  gettext-devel >= 0.14.3
41 BuildRequires:  glib2-devel >= 2.8
42 %ifnarch s390 s390x
43 BuildRequires:  gpm-devel
44 %endif
45 BuildRequires:  libtool
46 BuildRequires:  pam-devel
47 BuildRequires:  pcre-devel
48 BuildRequires:  pkgconfig
49 BuildRequires:  rpm-pythonprov
50 BuildRequires:  rpmbuild(macros) >= 1.268
51 BuildRequires:  sed >= 4.0
52 BuildRequires:  slang-devel >= 2.2.1
53 %{?with_x:BuildRequires:        xorg-lib-libX11-devel}
54 Requires:       file
55 Requires:       pam >= 0.77.3
56 Requires:       sed
57 Requires:       setup >= 2.4.6-2
58 Suggests:       bzip2
59 Suggests:       cabextract
60 Suggests:       cdrtools-utils
61 Suggests:       cpio
62 Suggests:       dvi2tty
63 Suggests:       enca
64 Suggests:       file
65 Suggests:       ghostscript
66 Suggests:       groff
67 Suggests:       gzip
68 Suggests:       lha
69 Suggests:       links
70 Suggests:       lynx
71 Suggests:       lzma
72 Suggests:       odt2txt
73 Suggests:       p7zip-standalone
74 Suggests:       perl-tools-pod
75 Suggests:       rar
76 Suggests:       rpm-utils
77 Suggests:       tar
78 Suggests:       unarj
79 Suggests:       unzip
80 Suggests:       xdg-utils
81 Suggests:       xpdf-tools
82 Suggests:       xz
83 Suggests:       zoo
84 Obsoletes:      mc46
85 Obsoletes:      mc46serv
86 Obsoletes:      mcserv
87 Obsoletes:      tkmc
88 Conflicts:      bash < 2.05b
89 Conflicts:      rpm < 4.0
90 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
91
92 %define         specflags_ia32  -fomit-frame-pointer
93
94 %description
95 Midnight Commander is a visual shell much like a file manager, only
96 with way more features. It is text mode, but also includes mouse
97 support if you are running GPM. Its coolest feature is the ability to
98 FTP, view tar, zip files, and poke into RPMs for specific files. :-)
99
100 %description -l de.UTF-8
101 Midnight Commander ist ein Visual-Shell, ähnlich einem Dateimanager,
102 aber mit zusätzlichen Funktionen. Es läuft im Textmodus, kann jedoch
103 eine Maus unterstützen, wenn GPM betrieben wird. Seine coolsten
104 Fähigkeiten sind die FTP-Option, das Einsehen von tar- und zip-Dateien
105 und das Herausfischen von spezifischen Dateien aus RPMs.
106
107 %description -l es.UTF-8
108 Midnight Commander es un interpretador de comandos visual que más
109 parece un administrador de archivos, solamente con varias
110 características a más. Es un programa en modo texto, pero incluye
111 soporte para ratón, si estuviera ejecutando GPM o en una ventana
112 xterm. Su característica más genial es la habilidad de cotillear en
113 RPMs buscando archivos específicos. :-)
114
115 %description -l fr.UTF-8
116 Midnight Commander est une interface pour la ligne de commande qui
117 tient beaucoup du gestionnaire de fichiers, mais est bien plus
118 puissant. Il fonctionne en mode console (texte), mais peut être
119 contrôlé à la souris si GPM est présent. Ses caractéristiques les plus
120 remarquables sont la possibilité de se connecter à un serveur FTP, de
121 visualiser des archives tar, de compresser des fichiers avec zip, de
122 récupérer des fichiers dans les packages RPM, et tout ceci simplement.
123
124 %description -l hu.UTF-8
125 Midnight Commander egy vizuális shell, lényegében egy fájlkezelő
126 sok-sok lehetőséggel. Szöveges módú, de az egeret is támogatja, ha fut
127 a GPM. A legjobb lehetőség az FTP elérése, tar, zip és RPM fájlok
128 kezelése.
129
130 %description -l ja.UTF-8
131 Midnight Commander はいろいろな機能を持ったファイルマネージャ兼
132 ビジュアルシェルです。これはテキストモードのアプリケーションですが、
133 GPM を使っている場合、マウスが使えます。 Midnight Commander には、 FTP
134 に接続できたり、 tar や zip や RPM の中が見えるなど、クールな機能
135 があります。
136
137 %description -l pl.UTF-8
138 Midnight Commander jest wizualną powłoką podobną do Norton Commandera.
139 Pracuje w trybie tekstowym, ale ma także obsługę myszki. Jest super ;)
140 MC ma wbudowanego klienta FTP, może zaglądać do skompresowanych
141 archiwów tar i zip, a także oglądać pliki w pakietach RPM.
142
143 %description -l pt_BR.UTF-8
144 Midnight Commander é um interpretador de comandos visual que mais
145 parece um gerenciador de arquivos, somente com várias características
146 a mais. Ele é um programa de modo texto, mas inclui suporte para mouse
147 se você estiver rodando GPM ou em uma janela xterm. Sua característica
148 mais legal é a habilidade de bisbilhotar em RPMs procurando arquivos
149 específicos. :-)
150
151 %description -l tr.UTF-8
152 Midnight Commander bir dosya yöneticisine çok benzeyen ancak daha
153 yetenekli bir görsel kabuktur. Metin ekranda çalışır ve GPM
154 çalışıyorsa fare desteği vardır. En hoş özellikleri FTP yapabilmesi,
155 tar, zip ve RPM dosyalarının içeriklerini gösterebilmesidir.
156
157 %prep
158 %setup -q -a3
159 %patch2 -p1
160 %{!?with_perl_vfs:%patch3 -p1}
161 %patch4 -p1
162
163 %{__rm} po/stamp-po
164
165 %{__sed} -i 's:|hxx|:|hh|hpp|hxx|tcc|:' misc/syntax/Syntax.in
166
167 %build
168 %{__gettextize}
169 %{__libtoolize}
170 %{__aclocal} -I m4
171 %{__autoconf}
172 %{__automake}
173
174 export X11_WWW="xdg-open"
175 %configure \
176         %{?with_ext2undel:--enable-vfs-undelfs} \
177         %{?with_samba:--enable-vfs-smb} \
178         --with-smb-configdir=/etc/samba \
179         --with-smb-codepagedir=/etc/samba/codepages \
180         --with%{!?with_x:out}-x \
181         --with-gpm-mouse \
182         --with-pcre \
183         --with-screen=slang \
184         --disable-silent-rules
185
186 %{__make}
187
188 %install
189 rm -rf $RPM_BUILD_ROOT
190 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pixmapsdir},%{_desktopdir}} \
191         $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,shrc.d,sysconfig} \
192         $RPM_BUILD_ROOT%{_mandir}/man8
193
194 %{__make} install \
195         DESTDIR=$RPM_BUILD_ROOT
196
197 install %{SOURCE7} $RPM_BUILD_ROOT%{_desktopdir}
198 install %{SOURCE8} $RPM_BUILD_ROOT%{_pixmapsdir}
199
200 for a in es pl ; do
201         for b in man1 man8 ; do
202                 install -d $RPM_BUILD_ROOT%{_mandir}/{$a,$a/$b}
203                 for c in man/$a/$b/* ; do
204                         install $c $RPM_BUILD_ROOT%{_mandir}/$a/$b
205                 done
206         done
207 done
208
209 install contrib/{mc.sh,mc.csh} $RPM_BUILD_ROOT/etc/shrc.d
210
211 %{__rm} $RPM_BUILD_ROOT%{_mandir}/*/man8/mcserv.8
212
213 # just a copy of sv
214 %{__rm} $RPM_BUILD_ROOT%{_datadir}/mc/hints/mc.hint.sv_SE
215 # another variant of it
216 %{__rm} $RPM_BUILD_ROOT%{_datadir}/mc/hints/mc.hint.it_IT
217 # enhanced version
218 %{__mv} $RPM_BUILD_ROOT%{_datadir}/mc/hints/mc.hint.{zh,zh_CN}
219
220 # outdated version of fi
221 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/fi_FI
222 # empty version of sv
223 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sv_SE
224
225 %find_lang %{name}
226
227 %clean
228 rm -rf $RPM_BUILD_ROOT
229
230 %files -f %{name}.lang
231 %defattr(644,root,root,755)
232 %doc NEWS README doc/keybind-migration.txt
233 %config /etc/shrc.d/*
234 %attr(755,root,root) %{_bindir}/mc*
235 %dir %{_libdir}/mc
236 %attr(755,root,root) %{_libdir}/mc/cons.saver
237 %attr(755,root,root) %{_libdir}/mc/*.sh
238 %attr(755,root,root) %{_libdir}/mc/*.csh
239 %dir %{_datadir}/mc
240
241 %{_datadir}/mc/mc.*
242 %{_datadir}/mc/skins
243 %{_datadir}/mc/syntax
244
245 %dir %{_datadir}/mc/help
246 %{_datadir}/mc/help/mc.hlp
247 %lang(es) %{_datadir}/mc/help/mc.hlp.es
248 %lang(hu) %{_datadir}/mc/help/mc.hlp.hu
249 %lang(it) %{_datadir}/mc/help/mc.hlp.it
250 %lang(pl) %{_datadir}/mc/help/mc.hlp.pl
251 %lang(ru) %{_datadir}/mc/help/mc.hlp.ru
252 %lang(sr) %{_datadir}/mc/help/mc.hlp.sr
253 %dir %{_datadir}/mc/hints
254 %{_datadir}/mc/hints/mc.hint
255 # only English messages inside (as for 4.8.12)
256 #%lang(az) %{_datadir}/mc/hints/mc.hint.az
257 %lang(be) %{_datadir}/mc/hints/mc.hint.be
258 # only English messages inside (as for 4.8.12)
259 #%lang(bg) %{_datadir}/mc/hints/mc.hint.bg
260 #%lang(ca) %{_datadir}/mc/hints/mc.hint.ca
261 %lang(cs) %{_datadir}/mc/hints/mc.hint.cs
262 # only English messages inside (as for 4.8.12)
263 #%lang(da) %{_datadir}/mc/hints/mc.hint.da
264 #%lang(de) %{_datadir}/mc/hints/mc.hint.de
265 #%lang(de_CH) %{_datadir}/mc/hints/mc.hint.de_CH
266 %lang(el) %{_datadir}/mc/hints/mc.hint.el
267 %lang(en_GB) %{_datadir}/mc/hints/mc.hint.en_GB
268 %lang(eo) %{_datadir}/mc/hints/mc.hint.eo
269 %lang(es) %{_datadir}/mc/hints/mc.hint.es
270 %lang(et) %{_datadir}/mc/hints/mc.hint.et
271 %lang(eu) %{_datadir}/mc/hints/mc.hint.eu
272 %lang(fa) %{_datadir}/mc/hints/mc.hint.fa
273 # only English messages inside (as for 4.8.12)
274 #%lang(fi) %{_datadir}/mc/hints/mc.hint.fi
275 %lang(fr) %{_datadir}/mc/hints/mc.hint.fr
276 %lang(gl) %{_datadir}/mc/hints/mc.hint.gl
277 # only English messages inside (as for 4.8.12)
278 #%lang(hr) %{_datadir}/mc/hints/mc.hint.hr
279 %lang(hu) %{_datadir}/mc/hints/mc.hint.hu
280 # only English messages inside (as for 4.8.12)
281 #%lang(ia) %{_datadir}/mc/hints/mc.hint.ia
282 %lang(id) %{_datadir}/mc/hints/mc.hint.id
283 %lang(it) %{_datadir}/mc/hints/mc.hint.it
284 # only English messages inside (as for 4.8.12)
285 #%lang(ja) %{_datadir}/mc/hints/mc.hint.ja
286 #%lang(ka) %{_datadir}/mc/hints/mc.hint.ka
287 #%lang(kk) %{_datadir}/mc/hints/mc.hint.kk
288 #%lang(ko) %{_datadir}/mc/hints/mc.hint.ko
289 #%lang(lt) %{_datadir}/mc/hints/mc.hint.lt
290 %lang(nl) %{_datadir}/mc/hints/mc.hint.nl
291 %lang(pl) %{_datadir}/mc/hints/mc.hint.pl
292 %lang(pt) %{_datadir}/mc/hints/mc.hint.pt
293 %lang(pt_BR) %{_datadir}/mc/hints/mc.hint.pt_BR
294 %lang(ro) %{_datadir}/mc/hints/mc.hint.ro
295 %lang(ru) %{_datadir}/mc/hints/mc.hint.ru
296 # only English messages inside (as for 4.8.12)
297 #%lang(sk) %{_datadir}/mc/hints/mc.hint.sk
298 #%lang(sl) %{_datadir}/mc/hints/mc.hint.sl
299 #%lang(sr) %{_datadir}/mc/hints/mc.hint.sr
300 #%lang(sv) %{_datadir}/mc/hints/mc.hint.sv
301 #%lang(szl) %{_datadir}/mc/hints/mc.hint.szl
302 #%lang(tr) %{_datadir}/mc/hints/mc.hint.tr
303 %lang(uk) %{_datadir}/mc/hints/mc.hint.uk
304 %lang(zh_CN) %{_datadir}/mc/hints/mc.hint.zh_CN
305
306 %dir %{_libdir}/mc/ext.d
307 %attr(755,root,root) %{_libdir}/mc/ext.d/archive.sh
308 %attr(755,root,root) %{_libdir}/mc/ext.d/doc.sh
309 %attr(755,root,root) %{_libdir}/mc/ext.d/image.sh
310 %attr(755,root,root) %{_libdir}/mc/ext.d/misc.sh
311 %attr(755,root,root) %{_libdir}/mc/ext.d/package.sh
312 %attr(755,root,root) %{_libdir}/mc/ext.d/sound.sh
313 %attr(755,root,root) %{_libdir}/mc/ext.d/text.sh
314 %attr(755,root,root) %{_libdir}/mc/ext.d/video.sh
315 %attr(755,root,root) %{_libdir}/mc/ext.d/web.sh
316
317 %dir %{_libdir}/mc/extfs.d
318 %{_libdir}/mc/extfs.d/README*
319 %if %{with perl_vfs}
320 %attr(755,root,root) %{_libdir}/mc/extfs.d/a+
321 %attr(755,root,root) %{_libdir}/mc/extfs.d/apt+
322 %attr(755,root,root) %{_libdir}/mc/extfs.d/deb*
323 %attr(755,root,root) %{_libdir}/mc/extfs.d/dpkg+
324 %attr(755,root,root) %{_libdir}/mc/extfs.d/mailfs
325 %attr(755,root,root) %{_libdir}/mc/extfs.d/patchfs
326 %attr(755,root,root) %{_libdir}/mc/extfs.d/rpms+
327 %attr(755,root,root) %{_libdir}/mc/extfs.d/ulib
328 %attr(755,root,root) %{_libdir}/mc/extfs.d/uzip
329 %endif
330 %attr(755,root,root) %{_libdir}/mc/extfs.d/audio
331 %attr(755,root,root) %{_libdir}/mc/extfs.d/bpp
332 %attr(755,root,root) %{_libdir}/mc/extfs.d/changesetfs
333 %attr(755,root,root) %{_libdir}/mc/extfs.d/gitfs+
334 %attr(755,root,root) %{_libdir}/mc/extfs.d/hp48+
335 %attr(755,root,root) %{_libdir}/mc/extfs.d/iso9660
336 %attr(755,root,root) %{_libdir}/mc/extfs.d/lslR
337 %attr(755,root,root) %{_libdir}/mc/extfs.d/patchsetfs
338 %attr(755,root,root) %{_libdir}/mc/extfs.d/rpm
339 %attr(755,root,root) %{_libdir}/mc/extfs.d/s3+
340 %attr(755,root,root) %{_libdir}/mc/extfs.d/trpm
341 %attr(755,root,root) %{_libdir}/mc/extfs.d/u7z
342 %attr(755,root,root) %{_libdir}/mc/extfs.d/uace
343 %attr(755,root,root) %{_libdir}/mc/extfs.d/ualz
344 %attr(755,root,root) %{_libdir}/mc/extfs.d/uar*
345 %attr(755,root,root) %{_libdir}/mc/extfs.d/uc1541
346 %attr(755,root,root) %{_libdir}/mc/extfs.d/ucab
347 %attr(755,root,root) %{_libdir}/mc/extfs.d/uha
348 %attr(755,root,root) %{_libdir}/mc/extfs.d/ulha
349 %attr(755,root,root) %{_libdir}/mc/extfs.d/urar
350 %attr(755,root,root) %{_libdir}/mc/extfs.d/uzoo
351 %dir %{_libdir}/mc/fish
352 %{_libdir}/mc/fish/README.fish
353 %attr(755,root,root) %{_libdir}/mc/fish/[a-z]*
354 %{_desktopdir}/mc.desktop
355 %{_pixmapsdir}/mc.png
356
357 %{_mandir}/man1/mc.1*
358 %{_mandir}/man1/mcedit.1*
359 %{_mandir}/man1/mcview.1*
360 %lang(es) %{_mandir}/es/man1/*
361 %lang(hu) %{_mandir}/hu/man1/*
362 %lang(it) %{_mandir}/it/man1/*
363 %lang(pl) %{_mandir}/pl/man1/*
364 %lang(ru) %{_mandir}/ru/man1/*
365 %lang(sr) %{_mandir}/sr/man1/*
366
367 %dir %{_sysconfdir}/mc
368 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mc/*.*