wok-next annotate vim/receipt @ rev 20452
liblzma-dev is absent -> xz-dev
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Feb 28 14:43:56 2018 +0200 (2018-02-28) |
parents | f1752c8b2a2a |
children | e7a485521d6a |
rev | line source |
---|---|
al@19748 | 1 # SliTaz package receipt v2. |
erjo@250 | 2 |
erjo@250 | 3 PACKAGE="vim" |
al@19748 | 4 VERSION="8.0.069" |
pascal@18559 | 5 CATEGORY="editors" |
erjo@250 | 6 SHORT_DESC="Advanced text editor" |
erjo@784 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15363 | 8 LICENSE="other" |
erjo@250 | 9 WEB_SITE="http://www.vim.org/" |
erjo@250 | 10 |
al@19582 | 11 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
al@19582 | 12 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL" |
al@19582 | 13 |
al@19582 | 14 # python may be removed after "ncursesw problem" solved |
al@19582 | 15 BUILD_DEPENDS="python ncurses-dev acl-dev diffutils gettext" |
al@19582 | 16 SIBLINGS="vim-tiny" |
pascal@13276 | 17 |
erjo@250 | 18 # Rules to configure and make the package. |
erjo@250 | 19 compile_rules() |
erjo@250 | 20 { |
al@19582 | 21 echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h |
al@18741 | 22 |
al@18741 | 23 ./configure \ |
al@19582 | 24 --without-x \ |
al@18741 | 25 --disable-gui \ |
al@18741 | 26 --enable-multibyte \ |
al@19582 | 27 $CONFIGURE_ARGS && |
al@19582 | 28 make && make install |
al@18741 | 29 |
al@19582 | 30 mkdir -p $install/etc/vim |
al@19748 | 31 cp $src/runtime/vimrc_example.vim $install/etc/vim/vimrc |
al@19582 | 32 |
al@19582 | 33 mkdir -p $install/usr/share/doc |
al@19582 | 34 ln -s ../vim/vim*/doc $install/usr/share/doc/vim-$VERSION |
erjo@250 | 35 } |
erjo@250 | 36 |
erjo@250 | 37 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@250 | 38 genpkg_rules() |
erjo@250 | 39 { |
al@19748 | 40 copy @std |
al@19748 | 41 CONFIG_FILES="/etc/vim/vimrc" |
al@19748 | 42 TAGS="text-editor" |
al@19748 | 43 DEPENDS="ncurses acl attr diffutils" |
erjo@2927 | 44 } |
erjo@250 | 45 |
al@19748 | 46 post_install_vim() |
erjo@250 | 47 { |
al@18741 | 48 cmd=$(readlink "$1/bin/vi") |
al@18741 | 49 if [ "$cmd" != '/usr/bin/vim' ]; then |
al@19582 | 50 echo |
al@18741 | 51 echo "**** Actual VI link : $cmd" |
al@19582 | 52 echo |
al@19582 | 53 echo -n 'Do you want vim for /bin/vi (y/N)? : '; read -t 30 anser |
al@18741 | 54 if [ "$anser" == 'y' ]; then |
al@19582 | 55 echo |
al@18741 | 56 echo -n 'Removing vi link to make a new one pointing on /usr/bin/vim...' |
al@18741 | 57 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi" |
al@18741 | 58 status |
al@18741 | 59 else |
al@19582 | 60 echo |
al@18741 | 61 echo "Leaving /bin/vi to : $cmd" |
al@18741 | 62 fi |
al@18741 | 63 fi |
erjo@250 | 64 } |