fix vim-full config (thanks to frogonwheels), bump release number
[openwrt/svn-archive/archive.git] / utils / vim / Makefile
1 #
2 # Copyright (C) 2006-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=vim
12 PKG_VERSION:=7.1
13 PKG_RELEASE:=3
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.vim.org/pub/vim/unix/
17 PKG_MD5SUM:=44c6b4914f38d6f9aa959640b89da329
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)71
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/vim/Default
24 SECTION:=utils
25 CATEGORY:=Utilities
26 DEPENDS:=+libncurses
27 TITLE:=Vi IMproved - enhanced vi editor
28 URL:=http://www.vim.org/
29 SUBMENU:=Editors
30 endef
31
32 define Package/vim
33 $(call Package/vim/Default)
34 TITLE+= (Tiny)
35 endef
36
37 define Package/vim-full
38 $(call Package/vim/Default)
39 TITLE+= (Normal)
40 endef
41
42 define Package/vim-runtime
43 $(call Package/vim/Default)
44 TITLE+= (runtime files)
45 endef
46
47 define Package/vim-help
48 $(call Package/vim/Default)
49 TITLE+= (help files)
50 endef
51
52 define Package/vim-full/conffiles
53 /usr/share/vim/vimrc
54 endef
55
56 define Package/vim/conffiles
57 /usr/share/vim/vimrc
58 endef
59
60 define Package/vim/description
61 Vim is an almost compatible version of the UNIX editor Vi.
62 (Tiny build)
63 endef
64
65 define Package/vim-full/description
66 Vim is an almost compatible version of the UNIX editor Vi.
67 (Normal build)
68 endef
69
70 define Package/vim-runtime/description
71 Vim is an almost compatible version of the UNIX editor Vi.
72 (Runtime files)
73 endef
74
75 define Package/vim-help/description
76 Vim is an almost compatible version of the UNIX editor Vi.
77 (Help files)
78 endef
79
80
81 CONFIGURE_ARGS += \
82 --disable-gui \
83 --disable-gtktest \
84 --disable-xim \
85 --without-x \
86 --disable-multibyte \
87 --disable-netbeans \
88 --disable-cscope \
89 --disable-gpm \
90 --with-tlib=ncurses
91
92 ifneq ($(CONFIG_PACKAGE_vim),)
93 define Build/Compile/vim
94 $(call Build/Configure/Default, \
95 --with-features=tiny \
96 )
97 $(MAKE) -C $(PKG_BUILD_DIR) clean
98 $(MAKE) -C $(PKG_BUILD_DIR) \
99 DESTDIR="$(PKG_INSTALL_DIR)" \
100 all
101 $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_tiny
102 endef
103 endif
104
105 ifneq ($(CONFIG_PACKAGE_vim-full),)
106 define Build/Compile/vim-full
107 $(call Build/Configure/Default, \
108 --with-features=normal \
109 )
110 $(MAKE) -C $(PKG_BUILD_DIR) clean
111 $(MAKE) -C $(PKG_BUILD_DIR) \
112 DESTDIR="$(PKG_INSTALL_DIR)" \
113 all
114 $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_normal
115 endef
116 endif
117
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
123 endef
124
125 define Build/Configure
126 endef
127
128 define Build/Compile
129 $(call Build/Compile/vim)
130 $(call Build/Compile/vim-full)
131 $(call Build/Compile/vim-runtime)
132 endef
133
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/
139 endef
140
141
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
147 endef
148
149 define Package/vim-runtime/install
150 $(CP) $(PKG_INSTALL_DIR)/* $(1)
151 rm -rf $(1)/usr/share/vim/vim*/doc
152 endef
153
154 define Package/vim-help/install
155 tar -C $(1) -xzf $(PKG_BUILD_DIR)/docs.tgz
156 endef
157
158 $(eval $(call BuildPackage,vim))
159 $(eval $(call BuildPackage,vim-full))
160 $(eval $(call BuildPackage,vim-runtime))
161 $(eval $(call BuildPackage,vim-help))
162