wok-6.x annotate vim-tiny/receipt @ rev 22360

libtorrent: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Nov 21 11:46:03 2019 +0100 (2019-11-21)
parents cbff385f6ca4
children e77ae4711268
rev   line source
erjo@4784 1 # SliTaz package receipt.
erjo@4784 2
erjo@4784 3 PACKAGE="vim-tiny"
Hans-G?nter@22106 4 VERSION="8.1.2237"
pascal@18559 5 CATEGORY="editors"
Hans-G?nter@22106 6 TAGS="text-editor"
Hans-G?nter@22106 7 SHORT_DESC="Advanced text editor without GUI."
erjo@4784 8 MAINTAINER="erjo@slitaz.org"
pascal@15363 9 LICENSE="other"
Hans-G?nter@22106 10 WEB_SITE="https://www.vim.org/"
Hans-G?nter@22106 11
erjo@4784 12 SOURCE="vim"
Hans-G?nter@22108 13 TARBALL="$SOURCE-$VERSION.tar.gz"
Hans-G?nter@22106 14 WGET_URL="https://github.com/$SOURCE/$SOURCE/archive/v$VERSION.tar.gz"
erjo@4784 15
pascal@15363 16 DEPENDS="ncurses"
pascal@17716 17 BUILD_DEPENDS="ncurses-dev"
pascal@15363 18
Hans-G?nter@22106 19 CONFIG_FILES="/etc/vim/vimrc"
Hans-G?nter@22106 20
erjo@4784 21 # Rules to configure and make the package.
erjo@4784 22 compile_rules()
erjo@4784 23 {
pascal@17716 24 export LDFLAGS="$LDFLAGS -ltinfo"
manuelfloresv@9417 25
manuelfloresv@9417 26 # define the place for the global vimrc file (set to /etc/vim/vimrc)
manuelfloresv@9417 27 # (patch from Arch Linux PKGBUILD)
manuelfloresv@9417 28 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
al@18741 29
Hans-G?nter@22106 30 ./configure \
Hans-G?nter@22106 31 --prefix=/usr \
Hans-G?nter@22106 32 --cache-file=$PWD/config.cache \
Hans-G?nter@22106 33 --infodir=/usr/share/info \
Hans-G?nter@22106 34 --with-features=tiny \
Hans-G?nter@22106 35 --with-x=no \
Hans-G?nter@22106 36 --disable-gui \
Hans-G?nter@22106 37 --enable-multibyte \
Hans-G?nter@22106 38 --with-vim-name=$PACKAGE \
Hans-G?nter@22106 39 --disable-acl \
Hans-G?nter@22106 40 --disable-motif-check \
Hans-G?nter@22106 41 --disable-athena-check \
Hans-G?nter@22106 42 --mandir=/usr/share/man \
Hans-G?nter@22106 43 $CONFIGURE_ARGS &&
Hans-G?nter@22106 44 make \
Hans-G?nter@22106 45 VIMRCLOC=/etc/vim \
Hans-G?nter@22106 46 VIMRUNTIMEDIR=/usr/share/vim/vim81 \
Hans-G?nter@22106 47 MAKE="make -e" &&
Hans-G?nter@22106 48 make DESTDIR=$DESTDIR install
al@18741 49
slaxemulator@8751 50 mkdir -p $DESTDIR/etc/vim
slaxemulator@8751 51 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
erjo@4784 52 }
erjo@4784 53
erjo@4784 54 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@4784 55 genpkg_rules()
erjo@4784 56 {
Hans-G?nter@22106 57 mkdir -p $fs/usr/share
Hans-G?nter@22106 58 mkdir -p $fs/etc
al@18741 59
Hans-G?nter@22106 60 cp -a $install/usr/bin $fs/usr
Hans-G?nter@22106 61 cp -a $install/usr/share/vim $fs/usr/share
Hans-G?nter@22106 62 cp -a $install/etc/vim $fs/etc
Hans-G?nter@22106 63
erjo@4784 64 rm -f $fs/usr/bin/*tutor
erjo@4784 65 }
erjo@4784 66
erjo@4784 67 post_install()
erjo@4784 68 {
al@18741 69 cmd=$(readlink "$1/bin/vi")
Hans-G?nter@22106 70 if [ "$cmd" != '/usr/bin/vim' ]
Hans-G?nter@22106 71 then
al@18741 72 echo ''
al@18741 73 echo "**** Actual VI link : $cmd"
al@18741 74 echo ''
al@18741 75 echo -n 'Do you want vim for /bin/vi (y/N) ? : '; read -t 30 anser
Hans-G?nter@22106 76 if [ "$anser" = 'y' ]
Hans-G?nter@22106 77 then
al@18741 78 echo ''
al@18741 79 action 'Removing vi link to make a new one pointing on /usr/bin/vim...'
al@18741 80 rm "$1/bin/vi" && ln -sf /usr/bin/vim-tiny "$1/bin/vi"
al@18741 81 status
Hans-G?nter@22106 82 else
al@18741 83 echo ''
al@18741 84 echo "Leaving /bin/vi to : $cmd"
al@18741 85 fi
al@18741 86 fi
erjo@4784 87 }
erjo@4784 88
erjo@4784 89 post_remove()
erjo@4784 90 {
erjo@4784 91 # restore previous symlink
pascal@18730 92 ln -sf /bin/busybox "$1/bin/vi"
erjo@4784 93 }