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