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