wok-6.x annotate vim-tiny/receipt @ rev 23848
inkscape: update build_depends
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Sun Jun 14 23:18:03 2020 -0400 (2020-06-14) |
parents | b0dc64f8462f |
children | 5ea0ce1cecc0 |
rev | line source |
---|---|
erjo@4784 | 1 # SliTaz package receipt. |
erjo@4784 | 2 |
erjo@4784 | 3 PACKAGE="vim-tiny" |
Hans-G?nter@23724 | 4 VERSION="8.2.0664" |
pascal@18559 | 5 CATEGORY="editors" |
Hans-G?nter@22106 | 6 TAGS="text-editor" |
Hans-G?nter@22106 | 7 SHORT_DESC="Advanced text editor without GUI." |
erjo@4784 | 8 MAINTAINER="erjo@slitaz.org" |
pascal@15363 | 9 LICENSE="other" |
Hans-G?nter@22106 | 10 WEB_SITE="https://www.vim.org/" |
Hans-G?nter@22106 | 11 |
erjo@4784 | 12 SOURCE="vim" |
Hans-G?nter@22108 | 13 TARBALL="$SOURCE-$VERSION.tar.gz" |
Hans-G?nter@22106 | 14 WGET_URL="https://github.com/$SOURCE/$SOURCE/archive/v$VERSION.tar.gz" |
erjo@4784 | 15 |
pascal@15363 | 16 DEPENDS="ncurses" |
pascal@17716 | 17 BUILD_DEPENDS="ncurses-dev" |
pascal@15363 | 18 |
Hans-G?nter@22106 | 19 CONFIG_FILES="/etc/vim/vimrc" |
Hans-G?nter@22106 | 20 |
erjo@4784 | 21 # Rules to configure and make the package. |
erjo@4784 | 22 compile_rules() |
erjo@4784 | 23 { |
pascal@17716 | 24 export LDFLAGS="$LDFLAGS -ltinfo" |
manuelfloresv@9417 | 25 |
manuelfloresv@9417 | 26 # define the place for the global vimrc file (set to /etc/vim/vimrc) |
manuelfloresv@9417 | 27 # (patch from Arch Linux PKGBUILD) |
Hans-G?nter@23724 | 28 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' \ |
Hans-G?nter@23724 | 29 $src/src/feature.h |
al@18741 | 30 |
Hans-G?nter@22106 | 31 ./configure \ |
Hans-G?nter@22106 | 32 --prefix=/usr \ |
Hans-G?nter@22106 | 33 --cache-file=$PWD/config.cache \ |
Hans-G?nter@22106 | 34 --infodir=/usr/share/info \ |
Hans-G?nter@22106 | 35 --with-features=tiny \ |
Hans-G?nter@22106 | 36 --with-x=no \ |
Hans-G?nter@22106 | 37 --disable-gui \ |
Hans-G?nter@22106 | 38 --enable-multibyte \ |
Hans-G?nter@22106 | 39 --with-vim-name=$PACKAGE \ |
Hans-G?nter@22106 | 40 --disable-acl \ |
Hans-G?nter@22106 | 41 --disable-motif-check \ |
Hans-G?nter@22106 | 42 --disable-athena-check \ |
Hans-G?nter@22106 | 43 --mandir=/usr/share/man \ |
Hans-G?nter@22106 | 44 $CONFIGURE_ARGS && |
Hans-G?nter@22106 | 45 make \ |
Hans-G?nter@22106 | 46 VIMRCLOC=/etc/vim \ |
Hans-G?nter@23724 | 47 VIMRUNTIMEDIR=/usr/share/vim/vim82 \ |
Hans-G?nter@22106 | 48 MAKE="make -e" && |
Hans-G?nter@22106 | 49 make DESTDIR=$DESTDIR install |
al@18741 | 50 |
slaxemulator@8751 | 51 mkdir -p $DESTDIR/etc/vim |
Hans-G?nter@23724 | 52 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc |
erjo@4784 | 53 } |
erjo@4784 | 54 |
erjo@4784 | 55 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@4784 | 56 genpkg_rules() |
erjo@4784 | 57 { |
Hans-G?nter@22106 | 58 mkdir -p $fs/usr/share |
Hans-G?nter@22106 | 59 mkdir -p $fs/etc |
al@18741 | 60 |
Hans-G?nter@22106 | 61 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@22106 | 62 cp -a $install/usr/share/vim $fs/usr/share |
Hans-G?nter@22106 | 63 cp -a $install/etc/vim $fs/etc |
Hans-G?nter@22106 | 64 |
erjo@4784 | 65 rm -f $fs/usr/bin/*tutor |
erjo@4784 | 66 } |
erjo@4784 | 67 |
erjo@4784 | 68 post_install() |
erjo@4784 | 69 { |
al@18741 | 70 cmd=$(readlink "$1/bin/vi") |
Hans-G?nter@22106 | 71 if [ "$cmd" != '/usr/bin/vim' ] |
Hans-G?nter@22106 | 72 then |
al@18741 | 73 echo '' |
al@18741 | 74 echo "**** Actual VI link : $cmd" |
al@18741 | 75 echo '' |
al@18741 | 76 echo -n 'Do you want vim for /bin/vi (y/N) ? : '; read -t 30 anser |
Hans-G?nter@22106 | 77 if [ "$anser" = 'y' ] |
Hans-G?nter@22106 | 78 then |
al@18741 | 79 echo '' |
al@18741 | 80 action 'Removing vi link to make a new one pointing on /usr/bin/vim...' |
al@18741 | 81 rm "$1/bin/vi" && ln -sf /usr/bin/vim-tiny "$1/bin/vi" |
al@18741 | 82 status |
Hans-G?nter@22106 | 83 else |
al@18741 | 84 echo '' |
al@18741 | 85 echo "Leaving /bin/vi to : $cmd" |
al@18741 | 86 fi |
al@18741 | 87 fi |
erjo@4784 | 88 } |
erjo@4784 | 89 |
erjo@4784 | 90 post_remove() |
erjo@4784 | 91 { |
erjo@4784 | 92 # restore previous symlink |
pascal@18730 | 93 ln -sf /bin/busybox "$1/bin/vi" |
erjo@4784 | 94 } |