wok-next annotate vim/receipt @ rev 21274

gejengel: inserted modification of configure files from cooking
author Hans-G?nter Theisgen
date Sat Dec 07 15:42:09 2019 +0100 (2019-12-07)
parents 2949147cd6ec
children
rev   line source
al@19748 1 # SliTaz package receipt v2.
erjo@250 2
erjo@250 3 PACKAGE="vim"
al@20978 4 VERSION="8.1.0436"
pascal@18559 5 CATEGORY="editors"
erjo@250 6 SHORT_DESC="Advanced text editor"
al@21020 7 MAINTAINER="devel@slitaz.org"
pascal@15363 8 LICENSE="other"
al@20978 9 WEB_SITE="https://www.vim.org/"
erjo@250 10
al@20978 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@20978 12 WGET_URL="https://github.com/vim/vim/archive/v$VERSION.tar.gz"
al@19582 13
al@21020 14 BUILD_DEPENDS="python ncurses-dev acl-dev diffutils gettext-dev"
al@21020 15 SPLIT="$PACKAGE-tiny:tiny"
pascal@13276 16
al@20905 17 compile_rules() {
al@19582 18 echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
al@18741 19
al@20905 20 case $SET in
al@20905 21 '') SET_ARGS='';;
al@20905 22 tiny) SET_ARGS='--with-features=tiny --with-vim-name=vim-tiny --disable-acl';;
al@20905 23 esac
al@20905 24
al@18741 25 ./configure \
al@19582 26 --without-x \
al@18741 27 --disable-gui \
al@18741 28 --enable-multibyte \
al@20905 29 $SET_ARGS \
al@19582 30 $CONFIGURE_ARGS &&
al@20905 31 make &&
al@20905 32 make install || return 1
al@18741 33
al@20905 34 install -Dm644 runtime/vimrc_example.vim $install/etc/vim/vimrc
al@19582 35
al@19582 36 mkdir -p $install/usr/share/doc
al@20905 37 ln -s ../vim/vim${VERSION//./}/doc $install/usr/share/doc/vim-$VERSION
erjo@250 38 }
erjo@250 39
al@20905 40 # TODO: put common files to vim-common package; maybe compile in the single set
al@20905 41
al@20905 42 genpkg_rules() {
al@20905 43 case $PACKAGE in
al@20905 44 vim)
al@20905 45 copy @std
al@20905 46 DEPENDS="ncurses acl attr diffutils"
al@20905 47 ;;
al@20905 48 vim-tiny)
al@20905 49 copy @std
al@20905 50 rm -f $fs/usr/bin/*tutor
al@20905 51 rm -rf $fs/usr/share/vim/vim*/tutor
al@20905 52 DEPENDS="ncurses"
al@20905 53 ;;
al@20905 54 esac
al@19748 55 CONFIG_FILES="/etc/vim/vimrc"
al@19748 56 TAGS="text-editor"
erjo@2927 57 }
erjo@250 58
al@20905 59 # common post-install for vim and vim-tiny
al@20905 60 post_install() {
al@20978 61 if [ -n "$quiet" ]; then return; fi
al@20978 62
al@18741 63 cmd=$(readlink "$1/bin/vi")
al@20905 64 [ "$cmd" != '/usr/bin/vim' ] || return
al@20978 65
al@20905 66 echo
al@20905 67 echo "**** Actual VI link : $cmd"
al@20905 68 echo
al@20905 69 echo -n 'Do you want vim for /bin/vi (y/N)? : '; read -t 30 anser
al@20905 70 if [ "$anser" == 'y' ]; then
al@19582 71 echo
al@20905 72 action 'Removing vi link to make a new one pointing on /usr/bin/vim...'
al@20905 73 rm "$1/bin/vi"; ln -sf ../usr/bin/vim "$1/bin/vi"
al@20905 74 status
al@20905 75 else
al@19582 76 echo
al@20905 77 echo "Leaving /bin/vi to $cmd"
al@18741 78 fi
erjo@250 79 }