2 # Copyright (C) 2006-2008 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
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=ftp://ftp.vim.org/pub/vim/unix/
16 PKG_MD5SUM:=44c6b4914f38d6f9aa959640b89da329
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)71
20 include $(INCLUDE_DIR)/package.mk
22 define Package/vim/Default
26 TITLE:=Vi IMproved - enhanced vi editor
27 URL:=http://www.vim.org/
32 $(call Package/vim/Default)
36 define Package/vim-full
37 $(call Package/vim/Default)
41 define Package/vim-runtime
42 $(call Package/vim/Default)
43 TITLE+= (runtime files)
46 define Package/vim-help
47 $(call Package/vim/Default)
51 define Package/vim-full/conffiles
55 define Package/vim/conffiles
59 define Package/vim/description
60 Vim is an almost compatible version of the UNIX editor Vi.
64 define Package/vim-full/description
65 Vim is an almost compatible version of the UNIX editor Vi.
69 define Package/vim-runtime/description
70 Vim is an almost compatible version of the UNIX editor Vi.
74 define Package/vim-help/description
75 Vim is an almost compatible version of the UNIX editor Vi.
91 ifneq ($(CONFIG_PACKAGE_vim),)
92 define Build/Compile/vim
93 $(call Build/Configure/Default, \
94 --with-features=tiny \
96 $(MAKE) -C $(PKG_BUILD_DIR) clean
97 $(MAKE) -C $(PKG_BUILD_DIR) \
98 DESTDIR="$(PKG_INSTALL_DIR)" \
100 $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_tiny
104 ifneq ($(CONFIG_PACKAGE_vim-full),)
105 define Build/Compile/vim-full
106 $(call Build/Configure/Default, \
107 --with-features=normal \
109 $(MAKE) -C $(PKG_BUILD_DIR) clean
110 $(MAKE) -C $(PKG_BUILD_DIR) \
111 DESTDIR="$(PKG_INSTALL_DIR)" \
113 $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_normal
117 define Build/Compile/vim-runtime
118 $(MAKE) -C $(PKG_BUILD_DIR)/src DESTDIR="$(PKG_INSTALL_DIR)" installrtbase
119 tar -czf $(PKG_BUILD_DIR)/docs.tgz $(PKG_INSTALL_DIR)/usr/share/vim/vim*/doc
120 rm -rf $(PKG_INSTALL_DIR)/usr/share/vim/vim*/doc
121 rm -rf $(PKG_INSTALL_DIR)/usr/man
124 define Build/Configure
128 $(call Build/Compile/vim)
129 $(call Build/Compile/vim-full)
130 $(call Build/Compile/vim-runtime)
133 define Package/vim/install
134 $(INSTALL_DIR) $(1)/usr/bin
135 $(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_tiny $(1)/usr/bin/vim
136 $(INSTALL_DIR) $(1)/usr/share/vim
137 $(INSTALL_CONF) ./files/vimrc $(1)/usr/share/vim/
141 define Package/vim-full/install
142 $(INSTALL_DIR) $(1)/usr/bin
143 $(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_normal $(1)/usr/bin/vim
144 $(INSTALL_DIR) $(1)/usr/share/vim
145 $(INSTALL_CONF) ./files/vimrc.full $(1)/usr/share/vim/vimrc
148 define Package/vim-runtime/install
149 $(CP) $(PKG_INSTALL_DIR)/* $(1)
150 rm -rf $(1)/usr/share/vim/vim*/doc
153 define Package/vim-help/install
154 tar -C $(1) -xzf $(PKG_BUILD_DIR)/docs.tgz
157 $(eval $(call BuildPackage,vim))
158 $(eval $(call BuildPackage,vim-full))
159 $(eval $(call BuildPackage,vim-runtime))
160 $(eval $(call BuildPackage,vim-help))