# Note that this is NOT a relocatable package %if 0%{?el4} %define _with_screen --with-screen=ncurses %define _with_glib_static --with-glib-static %define glib_version glib-2.12.3 %else %define _with_screen --with-screen=slang %endif Summary: User-friendly text console file manager and visual shell Name: mc Version: @RPM_VERSION@ Release: 1%{?dist} Epoch: 1 License: GPLv2 Group: System Environment/Shells Source0: %{name}-@VERSION@.tar.gz %if 0%{?el4} Source1: http://ftp.gnome.org/pub/gnome/sources/glib/2.12/%{glib_version}.tar.bz2 Patch0: glib2-CVE-2008-4316.patch Patch1: glib-2.11.1-libdir.patch %endif URL: http://www.midnight-commander.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: glib2-devel e2fsprogs-devel gpm-devel %if 0%{?rhel} BuildRequires: pcre-devel %endif %if 0%{?el4} BuildRequires: libtool libtool-libs autoconf gettext pkgconfig >= 0.8 ncurses-devel %else BuildRequires: slang-devel %endif %description GNU Midnight Commander is a visual file manager. It's a feature rich full-screen text mode application that allows you to copy, move and delete files and whole directory trees, search for files and run commands in the subshell. Internal viewer and editor are included. Mouse is supported on Linux console. VFS (Virtual Filesystem) allows you to view archives and files on remote servers (via SAMBA, FTP or SSH). %prep %if 0%{?el4} %setup -q -T -c -a 0 %setup -q -T -D -a 1 cd %{glib_version} %patch0 -p1 -b .CVE-2008-4316 #%patch1 -p1 -b .libdir %else %setup -q -n %{name}-@VERSION@ %endif %build %if 0%{?el4} cd %{glib_version} RESULT_DIR=`pwd`/result # for i in config.guess config.sub ; do # test -f /usr/share/libtool/$i && cp /usr/share/libtool/$i . # done # autoconf CFLAGS="%optflags -fno-strict-aliasing" \ ./configure \ --disable-gtk-doc \ --disable-shared \ --enable-static \ --prefix="$RESULT_DIR" \ --exec-prefix="$RESULT_DIR" \ --libdir="$RESULT_DIR/usr/%{_lib}" # --libdir="%{_lib}" # --libdir="/%{_lib}" make install %{?_smp_mflags} cd ../%{name}-@VERSION@ %endif %if 0%{?el4} PKG_CONFIG_PATH="$RESULT_DIR/usr/lib/pkgconfig:$PKG_CONFIG_PATH" ; export PKG_CONFIG_PATH; %endif %configure \ %{_with_screen} \ %{?_with_glib_static} \ --enable-charset \ --with-samba \ --without-x \ --with-gpm-mouse \ --disable-doxygen-doc #make %{?_smp_mflags} make %install rm -rf $RPM_BUILD_ROOT make install DESTDIR="$RPM_BUILD_ROOT" install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d install contrib/{mc.sh,mc.csh} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d %find_lang %{name} %clean rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(-, root, root) %doc doc/FAQ doc/COPYING doc/NEWS doc/README %{_bindir}/mc %{_bindir}/mcedit %{_bindir}/mcview %{_bindir}/mcmfmt %attr(4711, vcsa, tty) %{_libexecdir}/mc/cons.saver %{_libexecdir}/mc/mc*sh %{_mandir}/man1/* %lang(es) %{_mandir}/es/man1/mc.1* %lang(hu) %{_mandir}/hu/man1/mc.1* %lang(it) %{_mandir}/it/man1/mc.1* %lang(pl) %{_mandir}/pl/man1/mc.1* %lang(ru) %{_mandir}/ru/man1/mc.1* %lang(sr) %{_mandir}/sr/man1/mc.1* %{_sysconfdir}/profile.d/* %config %{_sysconfdir}/mc/Syntax %config %{_sysconfdir}/mc/mc.charsets %config %{_sysconfdir}/mc/mc.lib %config(noreplace) %{_sysconfdir}/mc/*edit* %config(noreplace) %{_sysconfdir}/mc/mc.ext %config(noreplace) %{_sysconfdir}/mc/mc.menu %config(noreplace) %{_sysconfdir}/mc/extfs/extfs.ini %config(noreplace) %{_sysconfdir}/mc/extfs/sfs.ini %dir %{_datadir}/mc %{_datadir}/mc/* %dir %{_libexecdir}/mc %changelog * Sat Jul 04 2009 Yury V. Zaytsev - Fix the issue when wrappers were left unpackaged * Thu May 21 2009 Slava Zanko - Fix install patches: use %%{_sysconfdir}/mc directory * Fri May 8 2009 Slava Zanko - Review spec-file to build on the current distributions - Change build rules - Fix install pathes * Fri Jun 22 2007 Pavel Roskin - Make cons.saver suid vcsa, it's needed for Fedora 7 * Thu Dec 21 2006 Pavel Roskin - Don't rely on brace expansion, it may be disabled * Mon Jan 30 2006 Pavel Roskin - Avoid using %%{_prefix} where more specialized macros are available. * Tue Aug 02 2005 Pavel Roskin - Replace obsolete "Copyright" with "License". * Thu Mar 31 2005 Pavel Roskin - Comment out build dependencies - they are too distribution specific. * Tue Sep 23 2003 Pavel Roskin - Remove term directory, it's obsolete and irrelevant on modern systems. - Include translated menu files. * Sun Feb 16 2003 Pavel Roskin - Remove obsolete dependency on /sbin/chkconfig. * Tue Dec 24 2002 Pavel Roskin - Work around bug in rpm 4.1 that expands defines in comments. - Handle --without-x. * Mon Nov 04 2002 Andrew V. Samoilov - Handle --with ext2undel. * Fri Nov 01 2002 Pavel Roskin - Add wrappers to support setting last directory on exit. Keep all scripts in their original directory, just copy them. * Tue Oct 22 2002 Pavel Roskin - Don't use the included S-Lang, there is a workaround for Red Hat 8.0 S-Lang, and binary compatibility with Red Hat 7.x doesn't work anyway. * Tue Oct 08 2002 Pavel Roskin - Use the included S-Lang again, since we include a better version now. This should avoid incompatibility with Red Hat 7.x. - Add _with_glib2 option. * Mon Oct 07 2002 Pavel Roskin - Remove installed mc.sh and mc.csh from %%{_prefix}/share/mc/bin to suppress a warning about installed but unpackaged files. * Mon Sep 30 2002 Andrew V. Samoilov - Don't require slang-devel if _with_ncurses. - Handle --with samba. * Sun Sep 29 2002 Pavel Roskin - Use --with-screen instead of --with-ncurses and --with-included-slang. * Mon Sep 23 2002 Andrew V. Samoilov - Restore %%config for %%{_prefix}/share/mc/mc.charsets. - Restore %%{_prefix}/share/mc/edit.spell.rc. * Sat Sep 21 2002 Pavel Roskin - Use FHS-compliant paths. - Drop %%config from files under /usr/share - users are not supposed to edit them. Local copies under ~/.mc should be used for that. * Wed Aug 21 2002 Pavel Roskin - Change description, update URLs, allow dash in the version. * Tue Aug 20 2002 Pavel Roskin - Support conditional builds. * Tue Aug 20 2002 Andrew V. Samoilov - Add /usr/lib/mc/mc.charsets. - Add %%{_mandir}/*/man1/*. * Fri Aug 16 2002 Pavel Roskin - Remove mc.global. * Mon Jan 21 2002 Pavel Roskin - Remove --with-gnome and --with-included-slang from configure options. - Add BuildPrereq. * Fri Aug 24 2001 Pavel Roskin - Remove gmc. Reunite mc and mc-common. * Sun Aug 05 2001 Pavel Roskin - Set epoch. * Sun Jul 15 2001 Pavel Roskin - Remove /usr/lib/mc/layout. * Sat Jun 09 2001 Pavel Roskin - Use %%{_prefix} and %%{_mandir}. Specify --mandir to configure. * Fri May 25 2001 Pavel Roskin - Change groups. Don't include locale directories. More config files. * Sun May 20 2001 Pavel Roskin - Don't require stylesheets, since HTML files are now in the tarball. * Thu Apr 19 2001 Pavel Roskin - Remove package mcserv. Drop dependency on PAM. * Mon Feb 26 2001 Pavel Roskin - Remove mc-gnome.ext. * Thu Jan 11 2001 Pavel Roskin - Include mcview. * Mon Oct 23 2000 Pavel Roskin - Allow mcserv.8 to be gzipped. * Sat Sep 30 2000 Pavel Roskin - New package mc-common. - Use DESTDIR instead of misusing prefix. - Don't install old icons - they don't exist * Sat Sep 23 2000 Pavel Roskin - Include translations with mc, not gmc - chkconfig --del in %%preun, not %%postun - --without-debug not needed - /etc/X11/wmconfig not needed - /etc/pam.d/mcserv shouldn't be executable - New files in %%{prefix}/lib/mc/ - translated hints, editor files * Thu Sep 09 1999 Elliot Lee - Include .idl files in the package. * Sat Sep 04 1999 Gregory McLean - Added a build prereq so that rpms get built with documentation ;) * Mon Jul 12 1999 Kjartan Maraas - added help and locale files to %%files * Tue Jun 22 1999 Vladimir Kondratiev - added syntax files to %%files * Wed May 26 1999 Cody Russell - chmod cons.saver at $RPM_BUILD_ROOT%%{prefix}/lib rather than at $RPM_BUILD_ROOT/usr/lib. We can now install to somewhere other than /usr. * Sun Apr 18 1999 Gregory McLean - Updated the specfile, removed some kludges. * Thu Aug 20 1998 Michael Fulbright - rebuilt against gnome-libs 0.27 and gtk+-1.1 * Thu Jul 09 1998 Michael Fulbright - made cons.saver not setuid * Sun Apr 19 1998 Marc Ewing - removed tkmc * Wed Apr 8 1998 Marc Ewing - add /usr/lib/mc/layout to gmc