wok annotate vim/receipt @ rev 23924

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