2007-01-16 00:14:57 +01:00
#
2009-02-12 22:03:01 +01:00
# spec file for package mc (Version 4.6.2)
2007-01-16 00:14:57 +01:00
#
2009-02-12 22:03:01 +01:00
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
2007-01-16 00:14:57 +01:00
#
2008-09-09 22:14:42 +02:00
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2007-01-16 00:14:57 +01:00
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
2008-04-01 12:56:51 +02:00
2007-01-16 00:14:57 +01:00
Name : mc
2008-12-03 16:27:38 +01:00
BuildRequires : audiofile-devel docbook-toys e2fsprogs-devel fdupes glib2-devel gpm indent jpeg libjpeg-devel libpng-devel readline-devel recode slang-devel update-desktop-files xorg-x11-devel
2007-01-16 00:14:57 +01:00
%define _prefix /usr
2007-07-18 22:02:34 +02:00
License : GPL v2 or later
2007-01-16 00:14:57 +01:00
Group : Productivity/File utilities
PreReq : permissions
2007-11-06 00:30:50 +01:00
AutoReqProv : on
2009-02-12 22:03:01 +01:00
Version : 4.6.2
2009-07-14 23:29:47 +02:00
Release : 5
2007-01-16 00:14:57 +01:00
Summary : Midnight Commander
2009-02-12 22:03:01 +01:00
Source : mc-4.6.2.tar.bz2
2007-01-16 00:14:57 +01:00
Source1 : x11_browser
2008-12-03 16:27:38 +01:00
Source2 : %name.desktop
Source3 : %name.png
2007-11-06 00:30:50 +01:00
Patch0 : mc-utf8.patch
Patch1 : 00-70-utf8-common.patch
Patch2 : 00-73-utf8-bottom-buttons-width.patch
Patch3 : 00-75-utf8-cmdline-help.patch
Patch4 : 00-76-utf8-hotlist-highlight.patch
Patch5 : 00-77-utf8-filename-search-highlight.patch
Patch6 : mc-apps.patch
Patch7 : mc-palmsupport.patch
Patch8 : mc-word_docs.patch
Patch9 : mc-x11browser.diff
Patch10 : mc-no-nb.diff
Patch12 : mc-wrapper.patch
Patch14 : mc-syntax-hpp.patch
Patch15 : mc-utf8-nlink.patch
Patch16 : mc-esc-seq.patch
Patch17 : mc-rpm.patch
2008-04-01 12:56:51 +02:00
Patch18 : mc-cursor-appearance.patch
2008-09-09 22:14:42 +02:00
Patch20 : mc-f-keys.patch
#debian fixes for utf8
Patch22 : mc-utf8-look-and-feel.patch
#debian fixes for vfs
Patch23 : 01_ftpfs_symlink.patch
Patch24 : 02_ignore_ftp_chmod_error.patch
2009-03-13 16:04:32 +01:00
Patch28 : 05_add_lzma_xz_support.patch
2008-09-09 22:14:42 +02:00
Patch30 : 06_remove_obsolete_rpm_tags.patch
Patch32 : 08_improved_u7z_support.patch
Patch33 : 09_choose_correct_urar.patch
#other debian fixes
Patch38 : 99b_fix-regex-pattern-lengths.patch
Patch40 : 99_regexp-replace-fixed.patch
2009-02-26 18:05:25 +01:00
# PATCH-FIX-UPSTREAM mc-multi-press-f-keys.patch mc287 sbrabec@suse.cz - Fixed Esc + Numeral F-key emulation.
Patch41 : mc-multi-press-f-keys.patch
# PATCH-FIX-OPENSUSE mc-utf8-slang-codeset.patch sbrabec@suse.cz - Guess UTF-8 locale from codeset, not from locale variables (not needed for openSUSE, valuable for upstream).
Patch42 : mc-utf8-slang-codeset.patch
2009-06-10 15:03:38 +02:00
# PATCH-FIX-OPENSUSE mc-crash-bnc500516.patch nadvornik@suse.cz - fixes a bug in utf-8 patch
Patch43 : mc-crash-bnc500516.patch
# PATCH-FIX-UPSTREAM mc-port-number-bnc483249.patch nadvornik@suse.cz - port number in shell link - midnight-commander.org/ticket/118
Patch44 : mc-port-number-bnc483249.patch
2008-10-09 12:19:06 +02:00
#
2007-01-16 00:14:57 +01:00
BuildRoot : %{_tmppath} /%{name} -%{version} -build
2007-11-06 00:30:50 +01:00
Url : http://www.ibiblio.org/mc/
2009-07-14 23:29:47 +02:00
Recommends: %{name} -lang = %{version}
2007-01-16 00:14:57 +01:00
%description
Midnight Commander is a Norton Commander clone, a program that
manipulates and manages files and directories. It is useful, fast, and
has color display on the Linux console. It also has mouse support if
you run the gpm mouse server. This program requires the terminal
description files in /usr/lib/terminfo, which are found in ncurses.rpm
(the essential ones) or terminfo.rpm (the rest).
You can also use Midnight Commander under the X Window System with your
mouse. If you enter 'mc -c' , colors are used.
In Midnight Commander, the screen is divided into four sections: The
majority of the screen is covered by two directory panels. The second
to last line on the screen is the shell command line. The last line
displays the function key assignments. At the very top, the menu list
is shown. One of the directories displayed is the current working
directory. This is where most of the commands are found. For certain
commands, like copy and move, the second directory is used as the
target directory.
%define INSTALL install -m755 -s
%define INSTALL_DIR install -d -m755
%define INSTALL_DATA install -m644
2007-08-09 20:11:59 +02:00
%lang_package
2008-04-01 12:56:51 +02:00
2007-01-16 00:14:57 +01:00
%prep
2009-02-12 22:03:01 +01:00
%setup -q
2007-11-06 00:30:50 +01:00
%patch0 -p 1
2007-01-16 00:14:57 +01:00
%patch1 -p 1
%patch2 -p 1
%patch3 -p 1
%patch4 -p 1
%patch5 -p 1
2007-11-06 00:30:50 +01:00
%patch6
2007-01-16 00:14:57 +01:00
%patch7 -p 1
2007-11-06 00:30:50 +01:00
%patch8
%patch9
%patch10
%patch12
%patch14
%patch15
2007-01-16 00:14:57 +01:00
%patch16
2007-11-06 00:30:50 +01:00
%patch17
2008-04-01 12:56:51 +02:00
%patch18
2008-09-09 22:14:42 +02:00
%patch20
%patch22 -p1
%patch23 -p1
%patch24 -p1
2009-06-10 15:03:38 +02:00
%patch28 -p1
2008-09-09 22:14:42 +02:00
%patch30 -p1
%patch32 -p1
%patch33 -p1
%patch38 -p1
%patch40 -p1
2009-02-26 18:05:25 +01:00
%patch41 -p1
%patch42 -p1
2009-06-10 15:03:38 +02:00
%patch43
%patch44 -p1
2007-08-12 11:36:56 +02:00
pushd po
2007-01-16 00:14:57 +01:00
rename no nb no.*
2007-08-12 11:36:56 +02:00
popd
pushd lib
2007-01-16 00:14:57 +01:00
iconv -f iso8859-1 -t utf-8 -o mc.hint.tmp mc.hint && mv mc.hint.tmp mc.hint
iconv -f iso8859-1 -t utf-8 -o mc.hint.es.tmp mc.hint.es && mv mc.hint.es.tmp mc.hint.es
iconv -f iso8859-1 -t utf-8 -o mc.hint.it.tmp mc.hint.it && mv mc.hint.it.tmp mc.hint.it
iconv -f iso8859-1 -t utf-8 -o mc.hint.nl.tmp mc.hint.nl && mv mc.hint.nl.tmp mc.hint.nl
iconv -f iso8859-2 -t utf-8 -o mc.hint.cs.tmp mc.hint.cs && mv mc.hint.cs.tmp mc.hint.cs
iconv -f iso8859-2 -t utf-8 -o mc.hint.hu.tmp mc.hint.hu && mv mc.hint.hu.tmp mc.hint.hu
iconv -f iso8859-2 -t utf-8 -o mc.hint.pl.tmp mc.hint.pl && mv mc.hint.pl.tmp mc.hint.pl
2009-02-26 18:05:25 +01:00
iconv -f iso8859-5 -t utf-8 -o mc.hint.sr.tmp mc.hint.sr && mv mc.hint.sr.tmp mc.hint.sr
2007-01-16 00:14:57 +01:00
iconv -f koi8-r -t utf8 -o mc.hint.ru.tmp mc.hint.ru && mv mc.hint.ru.tmp mc.hint.ru
iconv -f koi8-u -t utf8 -o mc.hint.uk.tmp mc.hint.uk && mv mc.hint.uk.tmp mc.hint.uk
iconv -f big5 -t utf8 -o mc.hint.zh.tmp mc.hint.zh && mv mc.hint.zh.tmp mc.hint.zh
2009-02-26 18:05:25 +01:00
iconv -f iso8859-5 -t utf-8 -o mc.menu.sr.tmp mc.menu.sr && mv mc.menu.sr.tmp mc.menu.sr
2007-08-12 11:36:56 +02:00
popd
2007-01-16 00:14:57 +01:00
# convert docs to utf-8
2007-08-12 11:36:56 +02:00
pushd doc
2007-01-16 00:14:57 +01:00
pushd es
iconv -f iso8859-1 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
iconv -f iso8859-1 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
popd
pushd hu
iconv -f iso8859-2 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
iconv -f iso8859-2 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
popd
pushd it
iconv -f iso8859-1 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
iconv -f iso8859-1 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
popd
pushd pl
iconv -f iso8859-2 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
iconv -f iso8859-2 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
popd
pushd ru
iconv -f koi8-r -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
iconv -f koi8-r -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
popd
2009-02-26 18:05:25 +01:00
pushd sr
iconv -f iso8859-5 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
iconv -f iso8859-5 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
iconv -f iso8859-5 -t utf-8 -o mcserv.8.in.tmp mcserv.8.in && mv mcserv.8.in.tmp mcserv.8.in
2007-08-12 11:36:56 +02:00
popd
2009-02-26 18:05:25 +01:00
popd
%build
2007-01-16 00:14:57 +01:00
autoreconf --force --install
%define warn_flags -W -Wall -Wstrict-prototypes -Wpointer-arith -Wformat-security -Wno-unused-parameter
2008-09-09 22:14:42 +02:00
export CFLAGS=" $RPM_OPT_FLAGS %{warn_flags} "
2007-01-16 00:14:57 +01:00
./configure \
--mandir=%{_mandir} \
--prefix=%{_prefix} \
--localstatedir=/var/lib \
2007-11-06 00:30:50 +01:00
--libexecdir=%{_libdir} \
2007-01-16 00:14:57 +01:00
--libdir=%{_libdir} \
--enable-charset \
--with-samba
2007-08-12 11:36:56 +02:00
make %{?jobs:-j%{jobs} }
2007-01-16 00:14:57 +01:00
%install
make DESTDIR=%{buildroot} install
# clean up this setuid problem for now
chmod 755 %{buildroot} /%{_libdir} /mc/cons.saver
# copy Korean mc hint message,
# install -m 0644 %{SOURCE3} %{datadir}/mc/
#install the shell functions for bourne shell and csh
mkdir -p %{buildroot} /etc/profile.d
install -m 0644 lib/mc.sh lib/mc.csh %{buildroot} /etc/profile.d
#support script for calling available GUI webbrosers
install -m 755 %{SOURCE1} %{buildroot} /usr/share/mc/bin
2008-12-03 16:27:38 +01:00
mkdir -p $RPM_BUILD_ROOT /usr/share/pixmaps/
install -m 644 %{S:3} $RPM_BUILD_ROOT /usr/share/pixmaps/%name.png
%suse_update_desktop_file -i %name System FileManager
2007-01-16 00:14:57 +01:00
%{find_lang} %{name}
2007-08-28 19:15:17 +02:00
%fdupes -s $RPM_BUILD_ROOT /usr
2007-08-09 20:11:59 +02:00
2007-01-16 00:14:57 +01:00
%clean
rm -rf %{buildroot}
%post
%run_permissions
%verify script
%verify _permissions -e /usr/lib/mc/cons.saver
2007-08-09 20:11:59 +02:00
%files
2007-01-16 00:14:57 +01:00
%defattr (-, root, root)
%doc ABOUT-NLS COPYING NEWS README
%config /etc/profile.d/*
%{_bindir} /mc*
%dir %{_prefix} /%{_lib}/mc
%verify (not mode) %{_prefix} /%{_lib}/mc/cons.saver
%{_mandir} /man1/*
#%{_mandir}/man3/*
2009-02-26 18:05:25 +01:00
%{_datadir} /mc
%exclude %{_datadir} /mc/mc.hint.*
%exclude %{_datadir} /mc/mc.hlp.*
%exclude %{_datadir} /mc/mc.menu.*
/usr/share/applications/%name.desktop
/usr/share/pixmaps/%name.png
2007-01-16 00:14:57 +01:00
%lang(es) %doc %{_mandir} /es
%lang(hu) %doc %{_mandir} /hu
%lang(it) %doc %{_mandir} /it
%lang(pl) %doc %{_mandir} /pl
%lang(ru) %doc %{_mandir} /ru
%lang(sr) %doc %{_mandir} /sr
2009-02-26 18:05:25 +01:00
%lang(cs) %doc %{_datadir} /mc/mc.*.cs
%lang(es) %doc %{_datadir} /mc/mc.*.es
%lang(hu) %doc %{_datadir} /mc/mc.*.hu
%lang(it) %doc %{_datadir} /mc/mc.*.it
%lang(nl) %doc %{_datadir} /mc/mc.*.nl
%lang(pl) %doc %{_datadir} /mc/mc.*.pl
%lang(sr) %doc %{_datadir} /mc/mc.*.sr
2008-04-01 12:56:51 +02:00
2009-07-14 23:29:47 +02:00
%files lang -f %{name}.lang
2007-04-03 21:42:40 +02:00
%changelog