wok annotate vim-tiny/receipt @ rev 25783

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