2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_URL
:=ftp
://ftp.vim.org
/pub
/vim
/unix
/
17 PKG_MD5SUM
:=44c6b4914f38d6f9aa959640b89da329
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)71
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/vim
/Default
27 TITLE
:=Vi IMproved
- enhanced vi editor
28 URL
:=http
://www.vim.org
/
33 $(call Packages
/vim
/Default
)
37 define Package
/vim-full
38 $(call Packages
/vim
/Default
)
42 define Package
/vim-runtime
43 $(call Packages
/vim
/Default
)
44 TITLE
+= (runtime files
)
47 define Package
/vim-help
48 $(call Packages
/vim
/Default
)
52 define Package
/vim-full
/conffiles
56 define Package
/vim
/conffiles
60 define Package
/vim
/description
61 Vim is an almost compatible version of the UNIX editor Vi.
65 define Package
/vim-full
/description
66 Vim is an almost compatible version of the UNIX editor Vi.
70 define Package
/vim-runtime
/description
71 Vim is an almost compatible version of the UNIX editor Vi.
75 define Package
/vim-help
/description
76 Vim is an almost compatible version of the UNIX editor Vi.
92 ifneq ($(CONFIG_PACKAGE_vim
),)
93 define Build
/Compile
/vim
94 $(call Build
/Configure
/Default
, \
95 --with-features
=tiny \
97 $(MAKE
) -C
$(PKG_BUILD_DIR
) clean
98 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
99 DESTDIR
="$(PKG_INSTALL_DIR)" \
101 $(CP
) $(PKG_BUILD_DIR
)/src
/$(PKG_NAME
) $(PKG_BUILD_DIR
)/vim_tiny
105 ifneq ($(CONFIG_PACKAGE_vim-full
),)
106 define Build
/Compile
/vim-full
107 $(call Build
/Configure
/Default
, \
108 --with-features
=normal \
110 $(MAKE
) -C
$(PKG_BUILD_DIR
) clean
111 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
112 DESTDIR
="$(PKG_INSTALL_DIR)" \
114 $(CP
) $(PKG_BUILD_DIR
)/src
/$(PKG_NAME
) $(PKG_BUILD_DIR
)/vim_normal
118 define Build
/Compile
/vim-runtime
119 $(MAKE
) -C
$(PKG_BUILD_DIR
)/src DESTDIR
="$(PKG_INSTALL_DIR)" installrtbase
120 tar -czf
$(PKG_BUILD_DIR
)/docs.tgz
$(PKG_INSTALL_DIR
)/usr
/share
/vim
/vim
*/doc
121 rm -rf
$(PKG_INSTALL_DIR
)/usr
/share
/vim
/vim
*/doc
122 rm -rf
$(PKG_INSTALL_DIR
)/usr
/man
125 define Build
/Configure
129 $(call Build
/Compile
/vim
)
130 $(call Build
/Compile
/vim-full
)
131 $(call Build
/Compile
/vim-runtime
)
134 define Package
/vim
/install
135 $(INSTALL_DIR
) $(1)/usr
/bin
136 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/vim_tiny
$(1)/usr
/bin
/vim
137 $(INSTALL_DIR
) $(1)/usr
/share
/vim
138 $(INSTALL_CONF
) .
/files
/vimrc
$(1)/usr
/share
/vim
/
142 define Package
/vim-full
/install
143 $(INSTALL_DIR
) $(1)/usr
/bin
144 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/vim_normal
$(1)/usr
/bin
/vim
145 $(INSTALL_DIR
) $(1)/usr
/share
/vim
146 $(INSTALL_CONF
) .
/files
/vimrc.full
$(1)/usr
/share
/vim
/vimrc
149 define Package
/vim-runtime
/install
150 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)
151 rm -rf
$(1)/usr
/share
/vim
/vim
*/doc
154 define Package
/vim-help
/install
155 tar -C
$(1) -xzf
$(PKG_BUILD_DIR
)/docs.tgz
158 define Package
/vim-full
/postinst
160 if
[ $${IPKG_INSTROOT} != / ]
162 if
[ -d
/usr
/share
/ ]
163 ln
-s
$${IPKG_INSTROOT}/usr
/share
/vim
/ /usr
/share
/
168 define Package
/vim
/postinst
170 if
[ $${IPKG_INSTROOT} != / ]
172 if
[ -d
/usr
/share
/ ]
173 ln
-s
$${IPKG_INSTROOT}/usr
/share
/vim
/vimrc
/usr
/share
/vim
/vimrc
178 $(eval
$(call BuildPackage
,vim
))
179 $(eval
$(call BuildPackage
,vim-full
))
180 $(eval
$(call BuildPackage
,vim-runtime
))
181 $(eval
$(call BuildPackage
,vim-help
))