wok-next annotate gvim/receipt @ rev 21402
updated php (7.4.4 -> 7.4.5)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Apr 21 07:47:41 2020 +0100 (2020-04-21) |
parents | d5aab818505e |
children |
rev | line source |
---|---|
al@21017 | 1 # SliTaz package receipt v2. |
erjo@2928 | 2 |
erjo@2928 | 3 PACKAGE="gvim" |
manuelfloresv@9417 | 4 VERSION="7.3" |
pascal@18559 | 5 CATEGORY="editors" |
al@21017 | 6 SHORT_DESC="Advanced text editor with GTK+ GUI" |
al@21020 | 7 MAINTAINER="devel@slitaz.org" |
pascal@15600 | 8 LICENSE="other" |
al@21020 | 9 WEB_SITE="https://www.vim.org/" |
al@20882 | 10 REPOLOGY="vim" |
al@20882 | 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" |
erjo@2928 | 15 |
al@21017 | 16 BUILD_DEPENDS="gtk2-dev" |
pascal@15600 | 17 |
al@21017 | 18 compile_rules() { |
manuelfloresv@9417 | 19 # define the place for the global vimrc file (set to /etc/vim/vimrc) |
manuelfloresv@9417 | 20 # (patch from Arch Linux PKGBUILD) |
manuelfloresv@9417 | 21 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h |
manuelfloresv@9417 | 22 # and global gvimrc file (set to /etc/vim/gvimrc) |
manuelfloresv@9417 | 23 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' $src/src/feature.h |
al@18303 | 24 |
al@18303 | 25 ./configure \ |
al@18303 | 26 --prefix=/usr \ |
al@18303 | 27 --cache-file=$PWD/config.cache \ |
al@18303 | 28 --infodir=/usr/share/info \ |
al@18303 | 29 --with-features=normal \ |
al@18303 | 30 --with-x=yes \ |
al@18303 | 31 --enable-gui=gtk2 \ |
al@18303 | 32 --enable-multibyte \ |
al@18303 | 33 --disable-motif-check \ |
al@18303 | 34 --disable-athena-check \ |
al@18303 | 35 --mandir=/usr/share/man \ |
al@18303 | 36 $CONFIGURE_ARGS && |
al@21017 | 37 make \ |
al@21017 | 38 VIMRCLOC=/etc/vim \ |
al@21017 | 39 VIMRUNTIMEDIR=/usr/share/vim/vim73 \ |
al@21017 | 40 MAKE="make -e" && |
al@21020 | 41 make DESTDIR=$install install || return 1 |
al@18303 | 42 |
al@21020 | 43 mkdir -p $install/etc/vim |
al@21020 | 44 cp -a $src/runtime/vimrc_example.vim $install/etc/vim/vimrc |
gokhlayeh@9131 | 45 } |
gokhlayeh@9131 | 46 |
al@21017 | 47 genpkg_rules() { |
al@18303 | 48 mkdir -p $fs/usr/share/icons/hicolor/16x16/apps $fs/usr/share/applications $fs/etc |
gokhlayeh@9131 | 49 |
pascal@15600 | 50 cp -a $install/usr/bin $fs/usr |
pascal@15600 | 51 cp -a $install/usr/share/vim $fs/usr/share |
al@18303 | 52 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png |
al@21020 | 53 cp -a $stuff/gvim.desktop $fs/usr/share/applications |
pascal@15600 | 54 cp -a $install/etc/vim $fs/etc |
al@21078 | 55 DEPENDS="ncurses gtk2 libxt libxau libxdmcp" |
al@21017 | 56 CONFIG_FILES="/etc/vim/vimrc" |
al@21017 | 57 TAGS="text-editor" |
erjo@2928 | 58 } |
erjo@2928 | 59 |
al@21017 | 60 post_install() { |
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 |
al@21017 | 79 post_remove() { |
al@18303 | 80 # restore previous symlink |
pascal@18730 | 81 ln -sf busybox "$1/bin/vi" |
manuelfloresv@9417 | 82 } |