wok view vim/receipt @ rev 24556

updated flatpress (0.1010.2 -> 1.2.1)
author Hans-G?nter Theisgen
date Fri Feb 25 14:05:00 2022 +0100 (2022-02-25)
parents 5ea0ce1cecc0
children 9aa1f88b45db
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
57 }
59 # Rules to gen a SliTaz package suitable for Tazpkg.
60 genpkg_rules()
61 {
62 mkdir -p $fs/usr/share
63 mkdir -p $fs/etc
65 cp -a $install/usr/bin $fs/usr
66 cp -a $install/usr/share/vim $fs/usr/share
67 cp -a $install/etc/vim $fs/etc
68 }
70 post_install()
71 {
72 cmd=$(readlink "$1/bin/vi")
73 if [ "$cmd" != '/usr/bin/vim' ]
74 then
75 echo ''
76 echo "**** Actual VI link : $cmd"
77 echo ''
78 echo -n 'Do you want vim for /bin/vi (y/N) ? : '; read -t 30 anser
79 if [ "$anser" = 'y' ]
80 then
81 echo ''
82 echo -n 'Removing vi link to make a new one pointing on /usr/bin/vim...'
83 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
84 status
85 else
86 echo ''
87 echo "Leaving /bin/vi to : $cmd"
88 fi
89 fi
90 }
92 post_remove()
93 {
94 # restore previous symlink
95 ln -sf /bin/busybox "$1/bin/vi"
96 }