Репозиторий Sisyphus
Последнее обновление: 26 января 2022 | Пакетов: 17491 | Посещений: 22846984
en ru br
Репозитории ALT
5.1: 4.8.11-alt0.M51.1
4.1: 4.6.2-alt7.pre1
4.0: 4.6.1r-alt9
3.0: 4.6.1r-alt3

Группа :: Работа с файлами
Пакет: mc

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define basever 4.6.2
%def_enable slang2

%ifdef cvsver
%define ver %basever-%cvsver
%define ver %basever

Name: mc
Version: %ver
Release: alt7.pre1

License: %gpllgpl2plus
Summary: A user-friendly file manager and visual shell
Group: File tools
Url: http://www.ibiblio.org/mc/

Packager: Andrey Rahmatullin <wrar at altlinux.ru>

Source: ftp://ftp.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-%ver.tar.bz2
Source1: synce-mcfs.tar.gz
Source5: mc-dnlike.color
Source6: mc-dark.color
Source11: mc-16.png
Source12: mc-32.png

# from http://nemerle.org/svn/nemerle/trunk/misc/nemerle.syntax

Source20: nemerle.syntax
Source21: ebuild.syntax

Patch: mc-4.6.2-alt-Eterm.patch
Patch1: mc-4.6.1-alt-charsets.patch
Patch2: mc-4.6.1-alt-wrapper.patch
Patch3: mc-4.5.55-language.patch
Patch4: mc-4.6.1-alt-m4_configure.patch
Patch5: mc-4.6.2-alt-extfs.patch
Patch6: mc-4.6.2-alt-slang2.patch
Patch7: mc-4.6.1-alt-vfs.patch
Patch8: mc-4.6.2-alt-filetypes.patch
Patch9: mc-4.6.2-alt-forceexec.patch
Patch10: mc-4.6.1a-alt-po.patch
Patch11: mc-4.6.2-alt-system-libpopt.patch
Patch12: mc-4.6.1-alt-add-nemerle-syntax.patch
Patch14: mc-4.6.2-alt-defaults.patch
Patch15: mc-4.6.1-alt-menu.patch

# UTF8

Patch90: mc-4.6.2-debian-utf8-slang2.patch

# RH

Patch101: mc-4.6.2-rh-64bit.patch
Patch102: mc-4.6.2-rh-delcheck.patch
Patch103: mc-4.6.2-rh-exit.patch
Patch104: mc-4.6.2-rh-newlinedir.patch
Patch106: mc-4.6.2-rh-refresh.patch
Patch107: mc-4.6.2-rh-showfree.patch
Patch108: mc-4.6.2-rh-utf8-8bit-hex.patch
Patch109: mc-4.6.2-rh-utf8-look-and-feel.patch
Patch110: mc-4.6.2-rh-utf8-slang2-view-fix.patch
Patch111: mc-4.6.2-rh-hint-crash-fix.patch


Patch151: mc-4.6.2-pld-syntax-spec.patch
Patch152: mc-4.6.2-pld-syntax-vhdl.patch

# Mandriva

Patch201: mc-4.6.1-mdv-lzma.patch

# Gentoo

Patch251: mc-4.6.0-gentoo-ebuild-syntax.patch
Patch252: mc-4.6.1-gentoo-invalid-mtime.patch

# Debian

Patch301: mc-4.6.2-debian-syntax-cxx-1.patch
Patch302: mc-4.6.2-debian-syntax-cxx-2.patch
Patch303: mc-4.6.2-debian-syntax-debian.patch
Patch304: mc-4.6.2-debian-syntax-debian-dsc.patch
Patch305: mc-4.6.2-debian-syntax-html.patch
Patch306: mc-4.6.2-debian-syntax-named.patch
Patch307: mc-4.6.2-debian-syntax-sh.patch
Patch308: mc-4.6.2-debian-syntax-strace.patch
Patch309: mc-4.6.2-debian-utf8-nlink.patch
Patch310: mc-4.6.2-debian-visible_tabs.patch
Patch311: mc-4.6.2-debian-filename-escaping.patch
Patch312: mc-4.6.2-debian-recode.patch
Patch313: mc-4.6.2-debian-syntax-man.patch

# UHU-Linux

Patch351: mc-4.6.2-uhu-utf8-common.patch
Patch352: mc-4.6.2-uhu-suse-utf8-bottom-buttons-width.patch
Patch353: mc-4.6.2-uhu-suse-utf8-hotlist-highlight.patch
Patch354: mc-4.6.2-uhu-utf8-filename-search-highlight.patch
Patch355: mc-4.6.2-uhu-utf8-backward-word-off-by-one.patch
Patch356: mc-4.6.2-uhu-utf8-shift-enter.patch
Patch357: mc-4.6.2-uhu-default-colors-for-root.patch

# Misc

# contributed
Patch401: mc-4.6.2-xs-file-highlight.patch
# https://savannah.gnu.org/bugs/?16303
Patch402: mc-4.6.2-u7z.patch

BuildPreReq: rpm-build-licenses

BuildPreReq: glib2-devel libe2fs-devel libgpm-devel
BuildPreReq: pkg-config groff-base cvs libpopt-devel
%if_enabled slang2
BuildPreReq: libslang2-devel
BuildPreReq: libslang-devel

%add_findreq_skiplist %_datadir/mc/edit.indent.rc
%add_findreq_skiplist %_datadir/mc/edit.spell.rc

Midnight Commander is a visual shell much like a file manager, only with way
more features.  It is text mode, but also includes mouse support if you are
running GPM.  Its coolest feature is the ability to ftp, view tar, zip
files, and poke into RPMs for specific files.  :-)

%setup -n %name-%ver -a1
%patch  -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
#%%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch14 -p1
%patch15 -p1

# UTF8

%patch90 -p1

# RH

%patch101 -p1
#%%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch106 -p1
%patch107 -p1
#%%patch108 -p1
%patch109 -p1
%if_enabled slang2
%patch110 -p1
%patch111 -p1


%patch151 -p1
%patch152 -p1

# Mandriva

%patch201 -p1

# Gentoo

%patch251 -p1
%patch252 -p1

# Debian

%patch301 -p1
%patch302 -p1
%patch303 -p1
%patch304 -p1
#%%patch305 -p1
%patch306 -p1
%patch307 -p1
%patch308 -p1
%patch309 -p0
%patch310 -p0
%patch311 -p0
%patch312 -p1
%patch313 -p1

# UHU-Linux

%patch351 -p1
%patch352 -p1
%patch353 -p1
%patch354 -p1
%patch355 -p1
%patch356 -p1
%patch357 -p1

# Misc

%patch401 -p1
%patch402 -p1

rm -f src/*popt*
rm -fr slang/
%__subst '/^SUBDIRS/s/slang //' Makefile.am
%__subst '/slang\/Makefile/d' configure.ac


bzip2 -9 ChangeLog

%configure --without-gnome \
   --without-debug \
   --with-screen=slang \
   --without-included-gettext \
   --enable-charset \
   --enable-largefile \


install -d %buildroot%_sysconfdir/{profile.d,bashrc.d}


mv %buildroot%_datadir/mc/bin/mc.* %buildroot%_sysconfdir/profile.d
# Install DosNavigator color scheme
install -m644 %SOURCE5 %_builddir/%name-%basever
# Install Dark color scheme
install -m644 %SOURCE6 %_builddir/%name-%basever
# Install SynCE VFS
install -m755 synce-mcfs/src/synce* %buildroot%_datadir/%name/extfs/
cat synce-mcfs/src/extfs.ini.add >> %buildroot%_datadir/%name/extfs/extfs.ini

pushd %buildroot%_datadir/mc/
iconv -f ISO-8859-1 -t UTF-8 mc.hint > tmp && mv tmp mc.hint && \
iconv -f ISO-8859-1 -t UTF-8 mc.hlp > tmp && mv tmp mc.hlp && \
iconv -f ISO-8859-1 -t UTF-8 mc.hint.es > tmp && mv tmp mc.hint.es && \
iconv -f ISO-8859-1 -t UTF-8 mc.hlp.es > tmp && mv tmp mc.hlp.es && \
iconv -f ISO-8859-1 -t UTF-8 mc.hint.it > tmp && mv tmp mc.hint.it && \
iconv -f ISO-8859-1 -t UTF-8 mc.hlp.it > tmp && mv tmp mc.hlp.it && \
iconv -f ISO-8859-1 -t UTF-8 mc.hint.nl > tmp && mv tmp mc.hint.nl && \
iconv -f ISO-8859-2 -t UTF-8 mc.hint.cs > tmp && mv tmp mc.hint.cs && \
iconv -f ISO-8859-2 -t UTF-8 mc.hint.hu > tmp && mv tmp mc.hint.hu && \
iconv -f ISO-8859-2 -t UTF-8 mc.hlp.hu > tmp && mv tmp mc.hlp.hu && \
iconv -f ISO-8859-2 -t UTF-8 mc.hint.pl > tmp && mv tmp mc.hint.pl && \
iconv -f ISO-8859-2 -t UTF-8 mc.hlp.pl > tmp && mv tmp mc.hlp.pl && \
iconv -f ISO-8859-5 -t UTF-8 mc.hint.sr > tmp && mv tmp mc.hint.sr && \
iconv -f ISO-8859-5 -t UTF-8 mc.hlp.sr > tmp && mv tmp mc.hlp.sr && \
iconv -f ISO-8859-5 -t UTF-8 mc.menu.sr > tmp && mv tmp mc.menu.sr && \
iconv -f koi8-r -t UTF-8 mc.hint.ru > tmp && mv tmp mc.hint.ru && \
iconv -f koi8-r -t UTF-8 mc.hlp.ru > tmp && mv tmp mc.hlp.ru && \
iconv -f koi8-u -t UTF-8 mc.hint.uk > tmp && mv tmp mc.hint.uk && \
iconv -f big5 -t UTF-8 mc.hint.zh > tmp && mv tmp mc.hint.zh

# remove bash wrapper

# rm -f %buildroot%_datadir/mc/bin/mc-wrapper.sh

# Move mc.sh to proper path

mkdir -p %buildroot%_sysconfdir/bashrc.d
mv %buildroot%_sysconfdir/profile.d/mc.sh %buildroot%_sysconfdir/bashrc.d

# menu

cat <<__MENU__ >%name.menu
?package(%name): needs="x11" section="Applications/File tools" \
title="Midnight Commander" longtitle="Midnight Commander" \
command="xvt -bg black -fg grey -e %_datadir/mc/bin/mc-wrapper.sh" \
install -pD -m644 %name.menu %buildroot%_menudir/%name
# icons
install -pD -m644 %SOURCE11 %buildroot%_miconsdir/%name.png
install -pD -m644 %SOURCE12 %buildroot%_iconsdir/%name.png

install -pD -m644 %SOURCE20 %buildroot%_datadir/mc/syntax/
install -pD -m644 %SOURCE21 %buildroot%_datadir/mc/syntax/

%find_lang %name


%files -f %name.lang
%doc mc-dnlike.color mc-dark.color
%config(noreplace) %_datadir/mc/mc.ext
%config(noreplace) %_sysconfdir/bashrc.d/*
%config(noreplace) %_sysconfdir/profile.d/*


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin