wok view vim-tiny/receipt @ rev 24020

linld: fix iso9660/64
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Mar 06 18:15:05 2021 +0000 (2021-03-06)
parents b0dc64f8462f
children 5ea0ce1cecc0
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 # Rules to configure and make the package.
22 compile_rules()
23 {
24 export LDFLAGS="$LDFLAGS -ltinfo"
26 # define the place for the global vimrc file (set to /etc/vim/vimrc)
27 # (patch from Arch Linux PKGBUILD)
28 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' \
29 $src/src/feature.h
31 ./configure \
32 --prefix=/usr \
33 --cache-file=$PWD/config.cache \
34 --infodir=/usr/share/info \
35 --with-features=tiny \
36 --with-x=no \
37 --disable-gui \
38 --enable-multibyte \
39 --with-vim-name=$PACKAGE \
40 --disable-acl \
41 --disable-motif-check \
42 --disable-athena-check \
43 --mandir=/usr/share/man \
44 $CONFIGURE_ARGS &&
45 make \
46 VIMRCLOC=/etc/vim \
47 VIMRUNTIMEDIR=/usr/share/vim/vim82 \
48 MAKE="make -e" &&
49 make DESTDIR=$DESTDIR install
51 mkdir -p $DESTDIR/etc/vim
52 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
53 }
55 # Rules to gen a SliTaz package suitable for Tazpkg.
56 genpkg_rules()
57 {
58 mkdir -p $fs/usr/share
59 mkdir -p $fs/etc
61 cp -a $install/usr/bin $fs/usr
62 cp -a $install/usr/share/vim $fs/usr/share
63 cp -a $install/etc/vim $fs/etc
65 rm -f $fs/usr/bin/*tutor
66 }
68 post_install()
69 {
70 cmd=$(readlink "$1/bin/vi")
71 if [ "$cmd" != '/usr/bin/vim' ]
72 then
73 echo ''
74 echo "**** Actual VI link : $cmd"
75 echo ''
76 echo -n 'Do you want vim for /bin/vi (y/N) ? : '; read -t 30 anser
77 if [ "$anser" = 'y' ]
78 then
79 echo ''
80 action 'Removing vi link to make a new one pointing on /usr/bin/vim...'
81 rm "$1/bin/vi" && ln -sf /usr/bin/vim-tiny "$1/bin/vi"
82 status
83 else
84 echo ''
85 echo "Leaving /bin/vi to : $cmd"
86 fi
87 fi
88 }
90 post_remove()
91 {
92 # restore previous symlink
93 ln -sf /bin/busybox "$1/bin/vi"
94 }