wok-current view mc/receipt @ rev 24727

cookutils: add repo-cooking (used by tank)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Mar 15 10:59:31 2022 +0000 (2022-03-15)
parents b7a8bcb5d575
children 2c7fdf85178f
line source
1 # SliTaz package receipt.
3 PACKAGE="mc"
4 VERSION="4.8.24"
5 CATEGORY="system-tools"
6 TAGS="file-manager text-editor"
7 SHORT_DESC="Midnight Commander - ncurses based file manager."
8 MAINTAINER="erjo@slitaz.org"
9 LICENSE="GPL3"
10 WEB_SITE="https://www.midnight-commander.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="http://ftp.midnight-commander.org/$TARBALL"
15 SUGGESTED="cdrkit-isoinfo file gpm lynx poppler-apps w3m wv xz"
16 DEPENDS="e2fsprogs glib ncursesw util-linux-blkid"
17 BUILD_DEPENDS="glib-dev gpm-dev ncursesw-dev ncurses-extra
18 util-linux-blkid-dev util-linux-mount-dev util-linux-uuid-dev "
20 GENERIC_MENUS="no"
22 HOST_ARCH="i486 arm"
24 # What is the latest version available today?
25 current_version()
26 {
27 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
28 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
29 }
31 # Rules to configure and make the package.
32 compile_rules()
33 {
34 sed -i 's/lzma -cd/lzcat/' $src/src/editor/edit.c
36 ./configure \
37 --prefix=/usr \
38 --with-gpm-mouse \
39 --with-screen=ncurses \
40 --without-subshell \
41 --libexecdir=/usr/lib \
42 --sysconfdir=/etc \
43 $CONFIGURE_ARGS &&
44 make -j 1 &&
45 make install
47 mkdir -p $install/usr/share/terminfo/s
48 cp -a /usr/share/terminfo/s/screen-256color \
49 $install/usr/share/terminfo/s
50 }
52 # Rules to gen a SliTaz package suitable for Tazpkg.
53 genpkg_rules()
54 {
55 mkdir -p $fs/usr/share/applications
57 cp -a $install/etc $fs/
58 cp -a $install/usr/bin $fs/usr
59 cp -a $install/usr/lib $fs/usr
60 cp -a $install/usr/share/mc $fs/usr/share
61 cp -a $install/usr/share/terminfo $fs/usr/share
63 sed -i 's#&) ||#) ||#' \
64 $fs/usr/lib/mc/ext.d/*.sh
65 sed -i 's#|profile|#&receipt|#' \
66 $fs/usr/share/mc/syntax/Syntax
67 sed -i 's/lzma -dc/lzcat/g' \
68 $fs/usr/lib/mc/ext.d/archive.sh
70 cp -a $stuff/*.desktop $fs/usr/share/applications
72 cat > $fs/usr/bin/mc.sh <<EOF
73 case \$TERM in
74 linux*)
75 {
76 cat <<EOT
77 shift keycode 59 = F11
78 shift keycode 60 = F12
79 shift keycode 61 = F13
80 shift keycode 62 = F14
81 shift keycode 63 = F15
82 shift keycode 64 = F16
83 shift keycode 65 = F17
84 shift keycode 66 = F18
85 shift keycode 67 = F19
86 shift keycode 68 = F20
87 EOT
88 } | loadkeys -uv ; sleep 1 ;;
89 xterm*)
90 export TERM='xterm-color'
91 [ -f '/usr/share/terminfo/s/screen-256color' ] && \\
92 export TERM='screen-256color' ;;
93 esac
94 mc \$@
96 EOF
98 chmod 755 $fs/usr/bin/mc.sh
99 chown -R root:root $fs
100 }