wok view vim-tiny/receipt @ rev 25399

updated vim and vim-tiny (8.2.0664 -> 9.0.0133)
author Hans-G?nter Theisgen
date Tue Aug 02 14:18:25 2022 +0100 (21 months ago)
parents ac8ca9758df1
children 54dc13c9ffd0
line source
1 # SliTaz package receipt.
3 PACKAGE="vim-tiny"
4 VERSION="9.0.0133"
5 basever=${VERSION%.*}
6 basever=${basever/./}
7 CATEGORY="editors"
8 TAGS="text-editor"
9 SHORT_DESC="Advanced text editor without GUI."
10 MAINTAINER="erjo@slitaz.org"
11 LICENSE="other"
12 WEB_SITE="https://www.vim.org/"
14 SOURCE="vim"
15 TARBALL="$SOURCE-$VERSION.tar.gz"
16 WGET_URL="https://github.com/$SOURCE/$SOURCE/archive/v$VERSION.tar.gz"
18 DEPENDS="ncurses"
19 BUILD_DEPENDS="ncurses-dev"
21 CONFIG_FILES="/etc/vim/vimrc"
23 current_version()
24 {
25 wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \
26 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
27 }
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 export LDFLAGS="$LDFLAGS -ltinfo"
34 # define the place for the global vimrc file (set to /etc/vim/vimrc)
35 # (patch from Arch Linux PKGBUILD)
36 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' \
37 $src/src/feature.h
39 # 9.0.0133 unrecognised:
40 # --disable-athena-check
42 ./configure \
43 --prefix=/usr \
44 --cache-file=$PWD/config.cache \
45 --infodir=/usr/share/info \
46 --with-features=tiny \
47 --with-x=no \
48 --disable-gui \
49 --enable-multibyte \
50 --with-vim-name=$PACKAGE \
51 --disable-acl \
52 --disable-motif-check \
53 --mandir=/usr/share/man \
54 $CONFIGURE_ARGS &&
55 make \
56 VIMRCLOC=/etc/vim \
57 VIMRUNTIMEDIR=/usr/share/vim/vim$basever\
58 MAKE="make -e" &&
59 make DESTDIR=$DESTDIR install
61 mkdir -p $DESTDIR/etc/vim
62 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
63 }
65 # Rules to gen a SliTaz package suitable for Tazpkg.
66 genpkg_rules()
67 {
68 mkdir -p $fs/usr/share
69 mkdir -p $fs/etc
71 cp -a $install/usr/bin $fs/usr
72 cp -a $install/usr/share/vim $fs/usr/share
73 cp -a $install/etc/vim $fs/etc
75 rm -f $fs/usr/share/vim/vim$basedir/tutor/*
76 }
78 post_install()
79 {
80 cmd=$(readlink "$1/bin/vi")
81 if [ "$cmd" != '/usr/bin/vim' ]
82 then
83 echo ''
84 echo "**** Actual VI link : $cmd"
85 echo ''
86 echo -n 'Do you want vim for /bin/vi (y/N) ? : '
87 read -t 30 anser
88 if [ "$anser" = 'y' ]
89 then
90 echo ''
91 action 'Removing vi link to make a new one pointing on /usr/bin/vim...'
92 rm "$1/bin/vi" &&
93 ln -sf /usr/bin/vim-tiny "$1/bin/vi"
94 status
95 else
96 echo ''
97 echo "Leaving /bin/vi to : $cmd"
98 fi
99 fi
100 }
102 post_remove()
103 {
104 # restore previous symbolic link
105 ln -sf /bin/busybox "$1/bin/vi"
106 }