2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 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:=5b9510a17074e2b37d8bb38ae09edbf2
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(VIMVER)
22 include $(INCLUDE_DIR)/package.mk
24 define Package/vim/Default
28 TITLE:=Vi IMproved - enhanced vi editor
29 URL:=http://www.vim.org/
34 $(call Package/vim/Default)
38 define Package/vim-full
39 $(call Package/vim/Default)
43 define Package/vim-runtime
44 $(call Package/vim/Default)
45 TITLE+= (runtime files)
48 define Package/vim-help
49 $(call Package/vim/Default)
53 define Package/vim-full/conffiles
57 define Package/vim/conffiles
61 define Package/vim/description
62 Vim is an almost compatible version of the UNIX editor Vi.
66 define Package/vim-full/description
67 Vim is an almost compatible version of the UNIX editor Vi.
71 define Package/vim-runtime/description
72 Vim is an almost compatible version of the UNIX editor Vi.
76 define Package/vim-help/description
77 Vim is an almost compatible version of the UNIX editor Vi.
93 vim_cv_getcwd_broken=no \
94 vim_cv_memmove_handles_overlap=yes \
95 vim_cv_stat_ignores_slash=yes \
98 vim_cv_toupper_broken=no \
99 vim_cv_tty_group=root \
102 ifneq ($(CONFIG_PACKAGE_vim),)
103 define Build/Compile/vim
104 $(call Build/Configure/Default, \
105 --with-features=tiny \
106 --disable-multibyte \
108 $(MAKE) -C $(PKG_BUILD_DIR) clean
109 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
110 DESTDIR="$(PKG_INSTALL_DIR)" \
112 $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_tiny
116 ifneq ($(CONFIG_PACKAGE_vim-full),)
117 define Build/Compile/vim-full
118 $(call Build/Configure/Default, \
119 --with-features=normal \
122 $(MAKE) -C $(PKG_BUILD_DIR) clean
123 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
124 DESTDIR="$(PKG_INSTALL_DIR)" \
126 $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_normal
130 define Build/Compile/vim-runtime
131 $(MAKE) -C $(PKG_BUILD_DIR)/src DESTDIR="$(PKG_INSTALL_DIR)" installrtbase
132 (cd $(PKG_INSTALL_DIR) && tar -cf $(PKG_BUILD_DIR)/docs.tar ./usr/share/vim/vim$(VIMVER)/doc)
133 rm -rf $(PKG_INSTALL_DIR)/usr/share/vim/vim$(VIMVER)/doc
134 rm -rf $(PKG_INSTALL_DIR)/usr/man
137 define Build/Configure
141 $(call Build/Compile/vim)
142 $(call Build/Compile/vim-full)
143 $(call Build/Compile/vim-runtime)
146 define Package/vim/install
147 $(INSTALL_DIR) $(1)/usr/bin
148 $(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_tiny $(1)/usr/bin/vim
149 $(INSTALL_DIR) $(1)/usr/share/vim
150 $(INSTALL_CONF) ./files/vimrc $(1)/usr/share/vim/
154 define Package/vim-full/install
155 $(INSTALL_DIR) $(1)/usr/bin
156 $(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_normal $(1)/usr/bin/vim
157 $(INSTALL_DIR) $(1)/usr/share/vim
158 $(INSTALL_CONF) ./files/vimrc.full $(1)/usr/share/vim/vimrc
161 define Package/vim-runtime/install
162 $(CP) $(PKG_INSTALL_DIR)/* $(1)
163 rm -rf $(1)/usr/share/vim/vim$(VIMVER)/doc
166 define Package/vim-help/install
167 tar -C $(1) -xf $(PKG_BUILD_DIR)/docs.tar
170 $(eval $(call BuildPackage,vim))
171 $(eval $(call BuildPackage,vim-full))
172 $(eval $(call BuildPackage,vim-runtime))
173 $(eval $(call BuildPackage,vim-help))