wok annotate gvim/receipt @ rev 21415

updated make (4.1 -> 4.2.1)
author Hans-G?nter Theisgen
date Tue Apr 23 17:28:22 2019 +0100 (2019-04-23)
parents 02c70d036ea0
children da0a38e4800e
rev   line source
erjo@2928 1 # SliTaz package receipt.
erjo@2928 2
erjo@2928 3 PACKAGE="gvim"
Hans-G?nter@21019 4 VERSION="8.1"
pascal@18559 5 CATEGORY="editors"
Hans-G?nter@21019 6 TAGS="text-editor"
Hans-G?nter@21019 7 SHORT_DESC="Advanced text editor, with gtk+ GUI."
erjo@2928 8 MAINTAINER="erjo@slitaz.org"
pascal@15600 9 LICENSE="other"
Hans-G?nter@21019 10 WEB_SITE="https://www.vim.org/"
Hans-G?nter@21019 11
gokhlayeh@9147 12 SOURCE="vim"
gokhlayeh@9147 13 TARBALL="$SOURCE-$VERSION.tar.bz2"
gokhlayeh@9147 14 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
Hans-G?nter@21019 15
Hans-G?nter@21019 16 DEPENDS="gtk+ ncurses xorg-libXau xorg-libXdmcp xorg-libXt"
Hans-G?nter@21019 17 BUILD_DEPENDS="gtk+-dev"
gokhlayeh@9147 18 CONFIG_FILES="/etc/vim/vimrc"
pascal@15600 19
gokhlayeh@9131 20 # Rules to configure and make the package.
gokhlayeh@9131 21 compile_rules()
gokhlayeh@9131 22 {
pascal@17751 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)
Hans-G?nter@21019 27 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' \
Hans-G?nter@21019 28 $src/src/feature.h
manuelfloresv@9417 29 # and global gvimrc file (set to /etc/vim/gvimrc)
Hans-G?nter@21019 30 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' \
Hans-G?nter@21019 31 $src/src/feature.h
al@18303 32
Hans-G?nter@21019 33 ./configure \
Hans-G?nter@21019 34 --prefix=/usr \
Hans-G?nter@21019 35 --cache-file=$PWD/config.cache \
Hans-G?nter@21019 36 --infodir=/usr/share/info \
Hans-G?nter@21019 37 --mandir=/usr/share/man \
Hans-G?nter@21019 38 --with-features=normal \
Hans-G?nter@21019 39 --with-x=yes \
Hans-G?nter@21019 40 --enable-gui=gtk2 \
Hans-G?nter@21019 41 --enable-multibyte \
Hans-G?nter@21019 42 --disable-athena-check \
Hans-G?nter@21019 43 --disable-motif-check \
al@18303 44 $CONFIGURE_ARGS &&
al@18303 45
Hans-G?nter@21019 46 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim81 MAKE="make -e" &&
gokhlayeh@9131 47 make DESTDIR=$DESTDIR install
Hans-G?nter@21019 48
gokhlayeh@9131 49 mkdir -p $DESTDIR/etc/vim
Hans-G?nter@21019 50 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
gokhlayeh@9131 51 }
gokhlayeh@9131 52
erjo@2928 53 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@2928 54 genpkg_rules()
erjo@2928 55 {
Hans-G?nter@21019 56 mkdir -p \
Hans-G?nter@21019 57 $fs/usr/share/icons/hicolor/16x16/apps \
Hans-G?nter@21019 58 $fs/usr/share/applications \
Hans-G?nter@21019 59 $fs/etc
gokhlayeh@9131 60
Hans-G?nter@21019 61 cp -a $install/usr/bin $fs/usr
Hans-G?nter@21019 62 cp -a $install/usr/share/vim $fs/usr/share
Hans-G?nter@21019 63 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png
Hans-G?nter@21019 64 cp -a stuff/gvim.desktop $fs/usr/share/applications
Hans-G?nter@21019 65 cp -a $install/etc/vim $fs/etc
erjo@2928 66 }
erjo@2928 67
manuelfloresv@9417 68 post_install()
manuelfloresv@9417 69 {
pascal@18730 70 cmd=$(readlink "$1/bin/vi")
pascal@20892 71 if [ ! "$cmd" = '/usr/bin/vim' ]; then
al@18303 72 echo ""
al@18303 73 echo "**** Actual VI link : $cmd"
al@18303 74 echo ""
al@18303 75 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 answer
pascal@20892 76 if [ "$answer" = 'y' ]; then
al@18303 77 echo ""
al@18303 78 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
pascal@18730 79 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
al@18303 80 status
al@18303 81 else
al@18303 82 echo ""
al@18303 83 echo "Leaving /bin/vi to : $cmd"
al@18303 84 fi
al@18303 85 fi
manuelfloresv@9417 86 }
erjo@2928 87
manuelfloresv@9417 88 post_remove()
manuelfloresv@9417 89 {
al@18303 90 # restore previous symlink
pascal@18730 91 ln -sf busybox "$1/bin/vi"
manuelfloresv@9417 92 }