wok annotate vim/receipt @ rev 21414

updated make (4.1 -> 4.2.1)
author Hans-G?nter Theisgen
date Tue Apr 23 17:27:39 2019 +0100 (2019-04-23)
parents 6fab3264ba87
children c16b1e0dda38
rev   line source
erjo@250 1 # SliTaz package receipt.
erjo@250 2
erjo@250 3 PACKAGE="vim"
manuelfloresv@9417 4 VERSION="7.3"
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 TARBALL="$PACKAGE-$VERSION.tar.bz2"
erjo@250 10 WEB_SITE="http://www.vim.org/"
erjo@250 11 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
mallory@6286 12 CONFIG_FILES="/etc/vim/vimrc"
jozee@4975 13 TAGS="text-editor"
erjo@250 14
pascal@13276 15 DEPENDS="ncurses acl diffutils"
pascal@17716 16 BUILD_DEPENDS="ncurses-dev acl-dev diffutils"
pascal@13276 17
erjo@250 18 # Rules to configure and make the package.
erjo@250 19 compile_rules()
erjo@250 20 {
pascal@17716 21 export LDFLAGS="$LDFLAGS -ltinfo"
manuelfloresv@9417 22
manuelfloresv@9417 23 # define the place for the global vimrc file (set to /etc/vim/vimrc)
manuelfloresv@9417 24 # (patch from Arch Linux PKGBUILD)
manuelfloresv@9417 25 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
al@18741 26
al@18741 27 ./configure \
al@18741 28 --prefix=/usr \
al@18741 29 --cache-file=$PWD/config.cache \
al@18741 30 --infodir=/usr/share/info \
al@18741 31 --with-features=normal \
al@18741 32 --with-x=no \
al@18741 33 --disable-gui \
al@18741 34 --enable-multibyte \
al@18741 35 --disable-motif-check \
al@18741 36 --disable-athena-check \
al@18741 37 --mandir=/usr/share/man $CONFIGURE_ARGS &&
al@18741 38
manuelfloresv@9417 39 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
slaxemulator@8751 40 make DESTDIR=$DESTDIR install
slaxemulator@8751 41 mkdir -p $DESTDIR/etc/vim
slaxemulator@8751 42 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
erjo@250 43 }
erjo@250 44
erjo@250 45 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@250 46 genpkg_rules()
erjo@250 47 {
manuelfloresv@9417 48 mkdir -p $fs/usr/share $fs/etc
erjo@2927 49
pascal@15363 50 cp -a $install/usr/bin $fs/usr
pascal@15363 51 cp -a $install/usr/share/vim $fs/usr/share
pascal@15363 52 cp -a $install/etc/vim $fs/etc
erjo@2927 53 }
erjo@250 54
erjo@250 55 post_install()
erjo@250 56 {
al@18741 57 cmd=$(readlink "$1/bin/vi")
al@18741 58 if [ "$cmd" != '/usr/bin/vim' ]; then
al@18741 59 echo ''
al@18741 60 echo "**** Actual VI link : $cmd"
al@18741 61 echo ''
al@18741 62 echo -n 'Do you want vim for /bin/vi (y/N) ? : '; read -t 30 anser
pascal@20892 63 if [ "$anser" = 'y' ]; then
al@18741 64 echo ''
al@18741 65 echo -n 'Removing vi link to make a new one pointing on /usr/bin/vim...'
al@18741 66 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
al@18741 67 status
al@18741 68 else
al@18741 69 echo ''
al@18741 70 echo "Leaving /bin/vi to : $cmd"
al@18741 71 fi
al@18741 72 fi
erjo@250 73 }
erjo@250 74
erjo@2531 75 post_remove()
erjo@2531 76 {
erjo@2531 77 # restore previous symlink
pascal@18730 78 ln -sf /bin/busybox "$1/bin/vi"
erjo@2531 79 }