wok-current annotate vim/receipt @ rev 25727

Add miss stuff folder for libxml++, dbus-c++
author Stanislas Leduc <shann@slitaz.org>
date Tue Nov 05 13:46:37 2024 +0000 (5 weeks ago)
parents 9aa1f88b45db
children
rev   line source
erjo@250 1 # SliTaz package receipt.
erjo@250 2
erjo@250 3 PACKAGE="vim"
Hans-G?nter@25399 4 VERSION="9.0.0133"
Hans-G?nter@25399 5 basever=${VERSION%.*}
Hans-G?nter@25399 6 basever=${basever/./}
pascal@18559 7 CATEGORY="editors"
Hans-G?nter@22104 8 TAGS="text-editor"
Hans-G?nter@22104 9 SHORT_DESC="Advanced text editor."
erjo@784 10 MAINTAINER="erjo@slitaz.org"
pascal@15363 11 LICENSE="other"
Hans-G?nter@22104 12 WEB_SITE="https://www.vim.org/"
Hans-G?nter@22104 13
Hans-G?nter@22104 14 TARBALL="$PACKAGE-$VERSION.tar.gz"
Hans-G?nter@22104 15 WGET_URL="https://github.com/$PACKAGE/$PACKAGE/archive/v$VERSION.tar.gz"
Hans-G?nter@22104 16
Hans-G?nter@22104 17 DEPENDS="acl diffutils ncurses"
Hans-G?nter@22104 18 BUILD_DEPENDS="acl-dev diffutils ncurses-dev"
Hans-G?nter@22104 19
mallory@6286 20 CONFIG_FILES="/etc/vim/vimrc"
pascal@13276 21
pascal@24055 22 current_version()
pascal@24055 23 {
pascal@24299 24 wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \
pascal@24055 25 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
pascal@24055 26 }
pascal@24055 27
erjo@250 28 # Rules to configure and make the package.
erjo@250 29 compile_rules()
erjo@250 30 {
pascal@17716 31 export LDFLAGS="$LDFLAGS -ltinfo"
manuelfloresv@9417 32
manuelfloresv@9417 33 # define the place for the global vimrc file (set to /etc/vim/vimrc)
manuelfloresv@9417 34 # (patch from Arch Linux PKGBUILD)
Hans-G?nter@23724 35 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' \
Hans-G?nter@23724 36 $src/src/feature.h
al@18741 37
Hans-G?nter@25399 38 # 9.0.0133 unrecognised:
Hans-G?nter@25399 39 # --disable-athena-check
Hans-G?nter@25399 40
Hans-G?nter@22104 41 ./configure \
Hans-G?nter@22104 42 --prefix=/usr \
Hans-G?nter@22104 43 --cache-file=$PWD/config.cache \
Hans-G?nter@22104 44 --infodir=/usr/share/info \
Hans-G?nter@22104 45 --with-features=normal \
Hans-G?nter@22104 46 --with-x=no \
Hans-G?nter@22104 47 --disable-gui \
Hans-G?nter@22104 48 --enable-multibyte \
Hans-G?nter@22104 49 --disable-motif-check \
Hans-G?nter@22104 50 --mandir=/usr/share/man \
Hans-G?nter@22104 51 $CONFIGURE_ARGS &&
al@18741 52
Hans-G?nter@22104 53 make \
Hans-G?nter@22104 54 VIMRCLOC=/etc/vim \
Hans-G?nter@25399 55 VIMRUNTIMEDIR=/usr/share/vim/vim$basever\
Hans-G?nter@22104 56 MAKE="make -e" &&
Hans-G?nter@25399 57 make install \
Hans-G?nter@25399 58 DESTDIR=$DESTDIR
Hans-G?nter@22104 59
slaxemulator@8751 60 mkdir -p $DESTDIR/etc/vim
Hans-G?nter@23724 61 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
pascal@24890 62
Hans-G?nter@25399 63 for i in GenericName Keywords
Hans-G?nter@25399 64 do
pascal@24890 65 l="$(grep $i= $DESTDIR/usr/share/applications/vim.desktop)"
pascal@24890 66 sed -i "/$i=/d;s|$i\[de].*|$l\n&|" $DESTDIR/usr/share/applications/vim.desktop
Hans-G?nter@25399 67 done
erjo@250 68 }
erjo@250 69
erjo@250 70 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@250 71 genpkg_rules()
erjo@250 72 {
Hans-G?nter@22104 73 mkdir -p $fs/usr/share
Hans-G?nter@22104 74 mkdir -p $fs/etc
Hans-G?nter@22104 75
Hans-G?nter@22104 76 cp -a $install/usr/bin $fs/usr
Hans-G?nter@22104 77 cp -a $install/usr/share/vim $fs/usr/share
Hans-G?nter@22104 78 cp -a $install/etc/vim $fs/etc
erjo@2927 79 }
erjo@250 80
erjo@250 81 post_install()
erjo@250 82 {
al@18741 83 cmd=$(readlink "$1/bin/vi")
Hans-G?nter@22104 84 if [ "$cmd" != '/usr/bin/vim' ]
Hans-G?nter@22104 85 then
al@18741 86 echo ''
al@18741 87 echo "**** Actual VI link : $cmd"
al@18741 88 echo ''
Hans-G?nter@25399 89 echo -n 'Do you want vim for /bin/vi (y/N) ? : '
Hans-G?nter@25399 90 read -t 30 anser
Hans-G?nter@22104 91 if [ "$anser" = 'y' ]
Hans-G?nter@22104 92 then
al@18741 93 echo ''
Hans-G?nter@25399 94 echo -n 'Removing vi link to make a new one pointing to /usr/bin/vim...'
Hans-G?nter@25399 95 rm "$1/bin/vi" &&
Hans-G?nter@25399 96 ln -sf /usr/bin/vim "$1/bin/vi"
al@18741 97 status
Hans-G?nter@22104 98 else
al@18741 99 echo ''
al@18741 100 echo "Leaving /bin/vi to : $cmd"
al@18741 101 fi
al@18741 102 fi
erjo@250 103 }
erjo@250 104
erjo@2531 105 post_remove()
erjo@2531 106 {
Hans-G?nter@25399 107 # restore previous symbolic link
pascal@18730 108 ln -sf /bin/busybox "$1/bin/vi"
erjo@2531 109 }