wok annotate vim/receipt @ rev 25044

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