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

updated grsync (1.2.6 -> 1.3.0)
author Hans-G?nter Theisgen
date Mon Mar 07 17:46:25 2022 +0100 (2022-03-07)
parents 5ea0ce1cecc0
children 5fb9c98c2c90
rev   line source
erjo@4784 1 # SliTaz package receipt.
erjo@4784 2
erjo@4784 3 PACKAGE="vim-tiny"
Hans-G?nter@23724 4 VERSION="8.2.0664"
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
pascal@24055 21 current_version()
pascal@24055 22 {
pascal@24299 23 wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \
pascal@24055 24 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
pascal@24055 25 }
pascal@24055 26
erjo@4784 27 # Rules to configure and make the package.
erjo@4784 28 compile_rules()
erjo@4784 29 {
pascal@17716 30 export LDFLAGS="$LDFLAGS -ltinfo"
manuelfloresv@9417 31
manuelfloresv@9417 32 # define the place for the global vimrc file (set to /etc/vim/vimrc)
manuelfloresv@9417 33 # (patch from Arch Linux PKGBUILD)
Hans-G?nter@23724 34 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' \
Hans-G?nter@23724 35 $src/src/feature.h
al@18741 36
Hans-G?nter@22106 37 ./configure \
Hans-G?nter@22106 38 --prefix=/usr \
Hans-G?nter@22106 39 --cache-file=$PWD/config.cache \
Hans-G?nter@22106 40 --infodir=/usr/share/info \
Hans-G?nter@22106 41 --with-features=tiny \
Hans-G?nter@22106 42 --with-x=no \
Hans-G?nter@22106 43 --disable-gui \
Hans-G?nter@22106 44 --enable-multibyte \
Hans-G?nter@22106 45 --with-vim-name=$PACKAGE \
Hans-G?nter@22106 46 --disable-acl \
Hans-G?nter@22106 47 --disable-motif-check \
Hans-G?nter@22106 48 --disable-athena-check \
Hans-G?nter@22106 49 --mandir=/usr/share/man \
Hans-G?nter@22106 50 $CONFIGURE_ARGS &&
Hans-G?nter@22106 51 make \
Hans-G?nter@22106 52 VIMRCLOC=/etc/vim \
Hans-G?nter@23724 53 VIMRUNTIMEDIR=/usr/share/vim/vim82 \
Hans-G?nter@22106 54 MAKE="make -e" &&
Hans-G?nter@22106 55 make DESTDIR=$DESTDIR install
al@18741 56
slaxemulator@8751 57 mkdir -p $DESTDIR/etc/vim
Hans-G?nter@23724 58 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
erjo@4784 59 }
erjo@4784 60
erjo@4784 61 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@4784 62 genpkg_rules()
erjo@4784 63 {
Hans-G?nter@22106 64 mkdir -p $fs/usr/share
Hans-G?nter@22106 65 mkdir -p $fs/etc
al@18741 66
Hans-G?nter@22106 67 cp -a $install/usr/bin $fs/usr
Hans-G?nter@22106 68 cp -a $install/usr/share/vim $fs/usr/share
Hans-G?nter@22106 69 cp -a $install/etc/vim $fs/etc
Hans-G?nter@22106 70
erjo@4784 71 rm -f $fs/usr/bin/*tutor
erjo@4784 72 }
erjo@4784 73
erjo@4784 74 post_install()
erjo@4784 75 {
al@18741 76 cmd=$(readlink "$1/bin/vi")
Hans-G?nter@22106 77 if [ "$cmd" != '/usr/bin/vim' ]
Hans-G?nter@22106 78 then
al@18741 79 echo ''
al@18741 80 echo "**** Actual VI link : $cmd"
al@18741 81 echo ''
al@18741 82 echo -n 'Do you want vim for /bin/vi (y/N) ? : '; read -t 30 anser
Hans-G?nter@22106 83 if [ "$anser" = 'y' ]
Hans-G?nter@22106 84 then
al@18741 85 echo ''
al@18741 86 action 'Removing vi link to make a new one pointing on /usr/bin/vim...'
al@18741 87 rm "$1/bin/vi" && ln -sf /usr/bin/vim-tiny "$1/bin/vi"
al@18741 88 status
Hans-G?nter@22106 89 else
al@18741 90 echo ''
al@18741 91 echo "Leaving /bin/vi to : $cmd"
al@18741 92 fi
al@18741 93 fi
erjo@4784 94 }
erjo@4784 95
erjo@4784 96 post_remove()
erjo@4784 97 {
erjo@4784 98 # restore previous symlink
pascal@18730 99 ln -sf /bin/busybox "$1/bin/vi"
erjo@4784 100 }