pantry/projects/midnight-commander.org/package.yml

61 lines
1.3 KiB
YAML
Raw Permalink Normal View History

distributable:
url: http://ftp.midnight-commander.org/mc-{{ version }}.tar.xz
strip-components: 1
display-name: Midnight Commander
versions:
github: MidnightCommander/mc/tags
provides:
- bin/mc
- bin/mcdiff
- bin/mcedit
- bin/mcview
dependencies:
invisible-island.net/ncurses: '*'
gnome.org/glib: '>=2.30'
gnu.org/gettext: '>=0.18.2'
2022-12-13 18:47:55 +03:00
runtime:
env:
#FIXME we prefer to fix this in the binary
MC_DATADIR: '{{prefix}}/etc/mc/'
build:
dependencies:
gnu.org/autoconf: '>=2.64'
gnu.org/automake: '>=1.12'
gnu.org/libtool: '*'
2023-03-21 17:36:29 +03:00
freedesktop.org/pkg-config: ~0.29
script: |
./configure $ARGS
make -j {{hw.concurrency}}
make install
2022-12-13 18:47:55 +03:00
cd "{{prefix}}"
fix-shebangs.ts libexec/mc/extfs.d/*
for x in $(find libexec/mc -name \*sh -type f -depth 1) libexec/mc/ext.d/misc.sh; do
sed -i.bak "s|$PKGX_DIR|\$PKGX_DIR|g" $x
2022-12-13 18:47:55 +03:00
rm $x.bak
done
sed -i.bak "s|$PKGX_DIR|%p/../|g" etc/mc/mc.ext*
2023-03-21 17:36:29 +03:00
rm etc/mc/mc.ext*.bak
2022-12-13 18:47:55 +03:00
env:
ARGS:
- --prefix={{prefix}}
- --with-screen=ncurses
2022-12-13 18:47:55 +03:00
# FIXME: hard to test interactive tools
2024-01-28 08:50:37 +03:00
test:
env:
TERM: vt100 # needs $TERM set to run
script:
- mc --datadir
- test "$(mc --datadir | cut -d ' ' -f1 | cut -d':' -f1)" = "{{prefix}}/etc/mc/"
2022-12-13 18:47:55 +03:00
# ^^ tests relocatability