wok annotate vim-tiny/receipt @ rev 25510
Update some web_site
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 12 20:36:56 2023 +0000 (19 months ago) |
parents | 5fb9c98c2c90 |
children | 96982f54e3dc |
rev | line source |
---|---|
erjo@4784 | 1 # SliTaz package receipt. |
erjo@4784 | 2 |
erjo@4784 | 3 PACKAGE="vim-tiny" |
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@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@24055 | 23 current_version() |
pascal@24055 | 24 { |
pascal@24299 | 25 wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \ |
pascal@24055 | 26 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q' |
pascal@24055 | 27 } |
pascal@24055 | 28 |
erjo@4784 | 29 # Rules to configure and make the package. |
erjo@4784 | 30 compile_rules() |
erjo@4784 | 31 { |
pascal@17716 | 32 export LDFLAGS="$LDFLAGS -ltinfo" |
manuelfloresv@9417 | 33 |
manuelfloresv@9417 | 34 # define the place for the global vimrc file (set to /etc/vim/vimrc) |
manuelfloresv@9417 | 35 # (patch from Arch Linux PKGBUILD) |
Hans-G?nter@23724 | 36 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' \ |
Hans-G?nter@23724 | 37 $src/src/feature.h |
al@18741 | 38 |
Hans-G?nter@25399 | 39 # 9.0.0133 unrecognised: |
Hans-G?nter@25399 | 40 # --disable-athena-check |
Hans-G?nter@25399 | 41 |
Hans-G?nter@22106 | 42 ./configure \ |
Hans-G?nter@22106 | 43 --prefix=/usr \ |
Hans-G?nter@22106 | 44 --cache-file=$PWD/config.cache \ |
Hans-G?nter@22106 | 45 --infodir=/usr/share/info \ |
Hans-G?nter@22106 | 46 --with-features=tiny \ |
Hans-G?nter@22106 | 47 --with-x=no \ |
Hans-G?nter@22106 | 48 --disable-gui \ |
Hans-G?nter@22106 | 49 --enable-multibyte \ |
Hans-G?nter@22106 | 50 --with-vim-name=$PACKAGE \ |
Hans-G?nter@22106 | 51 --disable-acl \ |
Hans-G?nter@22106 | 52 --disable-motif-check \ |
Hans-G?nter@22106 | 53 --mandir=/usr/share/man \ |
Hans-G?nter@22106 | 54 $CONFIGURE_ARGS && |
Hans-G?nter@22106 | 55 make \ |
Hans-G?nter@22106 | 56 VIMRCLOC=/etc/vim \ |
Hans-G?nter@25399 | 57 VIMRUNTIMEDIR=/usr/share/vim/vim$basever\ |
Hans-G?nter@22106 | 58 MAKE="make -e" && |
Hans-G?nter@22106 | 59 make DESTDIR=$DESTDIR install |
al@18741 | 60 |
slaxemulator@8751 | 61 mkdir -p $DESTDIR/etc/vim |
Hans-G?nter@23724 | 62 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc |
Hans-G?nter@25405 | 63 |
Hans-G?nter@25405 | 64 rm -rf $DESTDIR/usr/share/applications |
erjo@4784 | 65 } |
erjo@4784 | 66 |
erjo@4784 | 67 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@4784 | 68 genpkg_rules() |
erjo@4784 | 69 { |
Hans-G?nter@22106 | 70 mkdir -p $fs/etc |
Hans-G?nter@25405 | 71 mkdir -p $fs/usr/bin |
Hans-G?nter@25405 | 72 mkdir -p $fs/usr/share/vim/vim$basever |
al@18741 | 73 |
Hans-G?nter@22106 | 74 cp -a $install/etc/vim $fs/etc |
Hans-G?nter@25405 | 75 cp -a $install/usr/bin/vim-tiny $fs/usr/bin |
Hans-G?nter@25405 | 76 cp -a $install/usr/share/vim/vim$basever/defaults.vim \ |
Hans-G?nter@25405 | 77 $fs/usr/share/vim/vim$basever |
erjo@4784 | 78 } |
erjo@4784 | 79 |
erjo@4784 | 80 post_install() |
erjo@4784 | 81 { |
al@18741 | 82 cmd=$(readlink "$1/bin/vi") |
Hans-G?nter@25405 | 83 if [ "$cmd" != '/usr/bin/vim-tiny' ] |
Hans-G?nter@22106 | 84 then |
al@18741 | 85 echo '' |
al@18741 | 86 echo "**** Actual VI link : $cmd" |
al@18741 | 87 echo '' |
Hans-G?nter@25405 | 88 echo -n 'Do you want vim-tiny for /bin/vi (y/N) ? : ' |
Hans-G?nter@25399 | 89 read -t 30 anser |
Hans-G?nter@22106 | 90 if [ "$anser" = 'y' ] |
Hans-G?nter@22106 | 91 then |
al@18741 | 92 echo '' |
Hans-G?nter@25405 | 93 action 'Removing vi link to make a new one pointing to /usr/bin/vim-tiny...' |
Hans-G?nter@25399 | 94 rm "$1/bin/vi" && |
Hans-G?nter@25399 | 95 ln -sf /usr/bin/vim-tiny "$1/bin/vi" |
al@18741 | 96 status |
Hans-G?nter@22106 | 97 else |
al@18741 | 98 echo '' |
al@18741 | 99 echo "Leaving /bin/vi to : $cmd" |
al@18741 | 100 fi |
al@18741 | 101 fi |
erjo@4784 | 102 } |
erjo@4784 | 103 |
erjo@4784 | 104 post_remove() |
erjo@4784 | 105 { |
Hans-G?nter@25399 | 106 # restore previous symbolic link |
pascal@18730 | 107 ln -sf /bin/busybox "$1/bin/vi" |
erjo@4784 | 108 } |