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