wok annotate vim/receipt @ rev 22143
updated x11vnc (0.9.13 -> 0.9.16)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Nov 06 13:57:20 2019 +0100 (2019-11-06) |
parents | 02c70d036ea0 |
children | e77ae4711268 |
rev | line source |
---|---|
erjo@250 | 1 # SliTaz package receipt. |
erjo@250 | 2 |
erjo@250 | 3 PACKAGE="vim" |
Hans-G?nter@22104 | 4 VERSION="8.1.2237" |
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 |
erjo@250 | 20 # Rules to configure and make the package. |
erjo@250 | 21 compile_rules() |
erjo@250 | 22 { |
pascal@17716 | 23 export LDFLAGS="$LDFLAGS -ltinfo" |
manuelfloresv@9417 | 24 |
manuelfloresv@9417 | 25 # define the place for the global vimrc file (set to /etc/vim/vimrc) |
manuelfloresv@9417 | 26 # (patch from Arch Linux PKGBUILD) |
manuelfloresv@9417 | 27 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h |
al@18741 | 28 |
Hans-G?nter@22104 | 29 ./configure \ |
Hans-G?nter@22104 | 30 --prefix=/usr \ |
Hans-G?nter@22104 | 31 --cache-file=$PWD/config.cache \ |
Hans-G?nter@22104 | 32 --infodir=/usr/share/info \ |
Hans-G?nter@22104 | 33 --with-features=normal \ |
Hans-G?nter@22104 | 34 --with-x=no \ |
Hans-G?nter@22104 | 35 --disable-gui \ |
Hans-G?nter@22104 | 36 --enable-multibyte \ |
Hans-G?nter@22104 | 37 --disable-motif-check \ |
Hans-G?nter@22104 | 38 --disable-athena-check \ |
Hans-G?nter@22104 | 39 --mandir=/usr/share/man \ |
Hans-G?nter@22104 | 40 $CONFIGURE_ARGS && |
al@18741 | 41 |
Hans-G?nter@22104 | 42 make \ |
Hans-G?nter@22104 | 43 VIMRCLOC=/etc/vim \ |
Hans-G?nter@22104 | 44 VIMRUNTIMEDIR=/usr/share/vim/vim81 \ |
Hans-G?nter@22104 | 45 MAKE="make -e" && |
slaxemulator@8751 | 46 make DESTDIR=$DESTDIR install |
Hans-G?nter@22104 | 47 |
slaxemulator@8751 | 48 mkdir -p $DESTDIR/etc/vim |
slaxemulator@8751 | 49 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc |
erjo@250 | 50 } |
erjo@250 | 51 |
erjo@250 | 52 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@250 | 53 genpkg_rules() |
erjo@250 | 54 { |
Hans-G?nter@22104 | 55 mkdir -p $fs/usr/share |
Hans-G?nter@22104 | 56 mkdir -p $fs/etc |
Hans-G?nter@22104 | 57 |
Hans-G?nter@22104 | 58 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@22104 | 59 cp -a $install/usr/share/vim $fs/usr/share |
Hans-G?nter@22104 | 60 cp -a $install/etc/vim $fs/etc |
erjo@2927 | 61 } |
erjo@250 | 62 |
erjo@250 | 63 post_install() |
erjo@250 | 64 { |
al@18741 | 65 cmd=$(readlink "$1/bin/vi") |
Hans-G?nter@22104 | 66 if [ "$cmd" != '/usr/bin/vim' ] |
Hans-G?nter@22104 | 67 then |
al@18741 | 68 echo '' |
al@18741 | 69 echo "**** Actual VI link : $cmd" |
al@18741 | 70 echo '' |
al@18741 | 71 echo -n 'Do you want vim for /bin/vi (y/N) ? : '; read -t 30 anser |
Hans-G?nter@22104 | 72 if [ "$anser" = 'y' ] |
Hans-G?nter@22104 | 73 then |
al@18741 | 74 echo '' |
al@18741 | 75 echo -n 'Removing vi link to make a new one pointing on /usr/bin/vim...' |
al@18741 | 76 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi" |
al@18741 | 77 status |
Hans-G?nter@22104 | 78 else |
al@18741 | 79 echo '' |
al@18741 | 80 echo "Leaving /bin/vi to : $cmd" |
al@18741 | 81 fi |
al@18741 | 82 fi |
erjo@250 | 83 } |
erjo@250 | 84 |
erjo@2531 | 85 post_remove() |
erjo@2531 | 86 { |
erjo@2531 | 87 # restore previous symlink |
pascal@18730 | 88 ln -sf /bin/busybox "$1/bin/vi" |
erjo@2531 | 89 } |