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