wok-current view vim/receipt @ rev 24894

Update some web_site
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Apr 08 10:34:41 2022 +0000 (2022-04-08)
parents ac8ca9758df1
children 5fb9c98c2c90
line source
1 # SliTaz package receipt.
3 PACKAGE="vim"
4 VERSION="8.2.0664"
5 CATEGORY="editors"
6 TAGS="text-editor"
7 SHORT_DESC="Advanced text editor."
8 MAINTAINER="erjo@slitaz.org"
9 LICENSE="other"
10 WEB_SITE="https://www.vim.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://github.com/$PACKAGE/$PACKAGE/archive/v$VERSION.tar.gz"
15 DEPENDS="acl diffutils ncurses"
16 BUILD_DEPENDS="acl-dev diffutils ncurses-dev"
18 CONFIG_FILES="/etc/vim/vimrc"
20 current_version()
21 {
22 wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \
23 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
24 }
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 export LDFLAGS="$LDFLAGS -ltinfo"
31 # define the place for the global vimrc file (set to /etc/vim/vimrc)
32 # (patch from Arch Linux PKGBUILD)
33 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' \
34 $src/src/feature.h
36 ./configure \
37 --prefix=/usr \
38 --cache-file=$PWD/config.cache \
39 --infodir=/usr/share/info \
40 --with-features=normal \
41 --with-x=no \
42 --disable-gui \
43 --enable-multibyte \
44 --disable-motif-check \
45 --disable-athena-check \
46 --mandir=/usr/share/man \
47 $CONFIGURE_ARGS &&
49 make \
50 VIMRCLOC=/etc/vim \
51 VIMRUNTIMEDIR=/usr/share/vim/vim82 \
52 MAKE="make -e" &&
53 make DESTDIR=$DESTDIR install
55 mkdir -p $DESTDIR/etc/vim
56 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
58 for i in GenericName Keywords ; do
59 l="$(grep $i= $DESTDIR/usr/share/applications/vim.desktop)"
60 sed -i "/$i=/d;s|$i\[de].*|$l\n&|" $DESTDIR/usr/share/applications/vim.desktop
61 done
62 }
64 # Rules to gen a SliTaz package suitable for Tazpkg.
65 genpkg_rules()
66 {
67 mkdir -p $fs/usr/share
68 mkdir -p $fs/etc
70 cp -a $install/usr/bin $fs/usr
71 cp -a $install/usr/share/vim $fs/usr/share
72 cp -a $install/etc/vim $fs/etc
73 }
75 post_install()
76 {
77 cmd=$(readlink "$1/bin/vi")
78 if [ "$cmd" != '/usr/bin/vim' ]
79 then
80 echo ''
81 echo "**** Actual VI link : $cmd"
82 echo ''
83 echo -n 'Do you want vim for /bin/vi (y/N) ? : '; read -t 30 anser
84 if [ "$anser" = 'y' ]
85 then
86 echo ''
87 echo -n 'Removing vi link to make a new one pointing on /usr/bin/vim...'
88 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
89 status
90 else
91 echo ''
92 echo "Leaving /bin/vi to : $cmd"
93 fi
94 fi
95 }
97 post_remove()
98 {
99 # restore previous symlink
100 ln -sf /bin/busybox "$1/bin/vi"
101 }