wok-current annotate gvim/receipt @ rev 24614
Update some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Mar 06 21:04:14 2022 +0000 (2022-03-06) |
parents | 241fb98cab1c |
children | 5cb11e361a0a |
rev | line source |
---|---|
erjo@2928 | 1 # SliTaz package receipt. |
erjo@2928 | 2 |
erjo@2928 | 3 PACKAGE="gvim" |
Hans-G?nter@22921 | 4 VERSION="8.2" |
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" |
pascal@24614 | 14 WGET_URL="https://ftp.nluug.nl/pub/vim/unix/$TARBALL" |
Hans-G?nter@21019 | 15 |
Hans-G?nter@22921 | 16 PROVIDES="xxd" |
Hans-G?nter@21019 | 17 DEPENDS="gtk+ ncurses xorg-libXau xorg-libXdmcp xorg-libXt" |
Hans-G?nter@21019 | 18 BUILD_DEPENDS="gtk+-dev" |
gokhlayeh@9147 | 19 CONFIG_FILES="/etc/vim/vimrc" |
pascal@15600 | 20 |
pascal@24445 | 21 # What is the latest version available today? |
pascal@24445 | 22 current_version() |
pascal@24445 | 23 { |
pascal@24453 | 24 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \ |
pascal@24445 | 25 sed '/vim-[0-9]/!d;/tar/!d;s|.*vim-||;s|.tar.*||' | sort -Vr | sed q |
pascal@24445 | 26 } |
pascal@24445 | 27 |
gokhlayeh@9131 | 28 # Rules to configure and make the package. |
gokhlayeh@9131 | 29 compile_rules() |
gokhlayeh@9131 | 30 { |
pascal@17751 | 31 export LDFLAGS="$LDFLAGS -ltinfo" |
manuelfloresv@9417 | 32 |
manuelfloresv@9417 | 33 # define the place for the global vimrc file (set to /etc/vim/vimrc) |
manuelfloresv@9417 | 34 # (patch from Arch Linux PKGBUILD) |
Hans-G?nter@21019 | 35 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' \ |
Hans-G?nter@21019 | 36 $src/src/feature.h |
manuelfloresv@9417 | 37 # and global gvimrc file (set to /etc/vim/gvimrc) |
Hans-G?nter@21019 | 38 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' \ |
Hans-G?nter@21019 | 39 $src/src/feature.h |
al@18303 | 40 |
Hans-G?nter@21019 | 41 ./configure \ |
Hans-G?nter@21019 | 42 --prefix=/usr \ |
Hans-G?nter@21019 | 43 --cache-file=$PWD/config.cache \ |
Hans-G?nter@21019 | 44 --infodir=/usr/share/info \ |
Hans-G?nter@21019 | 45 --mandir=/usr/share/man \ |
Hans-G?nter@21019 | 46 --with-features=normal \ |
Hans-G?nter@21019 | 47 --with-x=yes \ |
Hans-G?nter@21019 | 48 --enable-gui=gtk2 \ |
Hans-G?nter@21019 | 49 --enable-multibyte \ |
Hans-G?nter@21019 | 50 --disable-athena-check \ |
Hans-G?nter@21019 | 51 --disable-motif-check \ |
al@18303 | 52 $CONFIGURE_ARGS && |
al@18303 | 53 |
Hans-G?nter@22921 | 54 make \ |
Hans-G?nter@22921 | 55 VIMRCLOC=/etc/vim \ |
Hans-G?nter@22921 | 56 VIMRUNTIMEDIR=/usr/share/vim/vim82 \ |
Hans-G?nter@22921 | 57 MAKE="make -e" && |
gokhlayeh@9131 | 58 make DESTDIR=$DESTDIR install |
Hans-G?nter@21019 | 59 |
gokhlayeh@9131 | 60 mkdir -p $DESTDIR/etc/vim |
Hans-G?nter@21019 | 61 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc |
gokhlayeh@9131 | 62 } |
gokhlayeh@9131 | 63 |
erjo@2928 | 64 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@2928 | 65 genpkg_rules() |
erjo@2928 | 66 { |
Hans-G?nter@22921 | 67 mkdir -p $fs/usr/share/icons/hicolor/16x16/apps |
Hans-G?nter@22921 | 68 mkdir -p $fs/usr/share/applications |
Hans-G?nter@22921 | 69 mkdir -p $fs/etc |
gokhlayeh@9131 | 70 |
Hans-G?nter@21019 | 71 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@21019 | 72 cp -a $install/usr/share/vim $fs/usr/share |
Hans-G?nter@21019 | 73 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png |
Hans-G?nter@21019 | 74 cp -a stuff/gvim.desktop $fs/usr/share/applications |
Hans-G?nter@21019 | 75 cp -a $install/etc/vim $fs/etc |
erjo@2928 | 76 } |
erjo@2928 | 77 |
manuelfloresv@9417 | 78 post_install() |
manuelfloresv@9417 | 79 { |
pascal@18730 | 80 cmd=$(readlink "$1/bin/vi") |
Hans-G?nter@22921 | 81 if [ ! "$cmd" = '/usr/bin/vim' ] |
Hans-G?nter@22921 | 82 then |
al@18303 | 83 echo "" |
al@18303 | 84 echo "**** Actual VI link : $cmd" |
al@18303 | 85 echo "" |
al@18303 | 86 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 answer |
Hans-G?nter@22921 | 87 if [ "$answer" = 'y' ] |
Hans-G?nter@22921 | 88 then |
al@18303 | 89 echo "" |
al@18303 | 90 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..." |
pascal@18730 | 91 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi" |
al@18303 | 92 status |
Hans-G?nter@22921 | 93 else |
al@18303 | 94 echo "" |
al@18303 | 95 echo "Leaving /bin/vi to : $cmd" |
al@18303 | 96 fi |
al@18303 | 97 fi |
manuelfloresv@9417 | 98 } |
erjo@2928 | 99 |
manuelfloresv@9417 | 100 post_remove() |
manuelfloresv@9417 | 101 { |
al@18303 | 102 # restore previous symlink |
pascal@18730 | 103 ln -sf busybox "$1/bin/vi" |
manuelfloresv@9417 | 104 } |