1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
#
# Copyright (C) 2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=vim
PKG_VERSION:=8.1
PKG_RELEASE:=1
VIMVER:=81
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ftp.vim.org/pub/vim/unix
PKG_HASH:=8b69fbd01c877dd8ecbbeca1dc66e5e927228d631ac4c2174b9307eb5c827c86
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
PKG_CPE_ID:=cpe:/a:vim:vim
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(VIMVER)
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/vim/Default
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libncurses
TITLE:=Vi IMproved - enhanced vi editor
URL:=http://www.vim.org/
SUBMENU:=Editors
endef
define Package/vim
$(call Package/vim/Default)
TITLE+= (Tiny)
endef
define Package/vim-full
$(call Package/vim/Default)
TITLE+= (Normal)
endef
define Package/vim-fuller
$(call Package/vim/Default)
TITLE+= (Big)
endef
define Package/vim-runtime
$(call Package/vim/Default)
TITLE+= (runtime files)
endef
define Package/vim-help
$(call Package/vim/Default)
TITLE+= (help files)
endef
define Package/xxd
SECTION:=utils
CATEGORY:=Utilities
TITLE:=make a hexdump or do the reverse
URL:=http://www.vim.org/
endef
define Package/vim-full/conffiles
/usr/share/vim/vimrc
/root/.vimrc
endef
define Package/vim/conffiles
/usr/share/vim/vimrc
/root/.vimrc
endef
define Package/vim/description
Vim is an almost compatible version of the UNIX editor Vi.
(Tiny build)
endef
define Package/vim-full/description
Vim is an almost compatible version of the UNIX editor Vi.
(Normal build)
endef
define Package/vim-fuller/description
Vim is an almost compatible version of the UNIX editor Vi.
(Big build)
endef
define Package/vim-runtime/description
Vim is an almost compatible version of the UNIX editor Vi.
(Runtime files)
endef
define Package/vim-help/description
Vim is an almost compatible version of the UNIX editor Vi.
(Help files)
endef
define Package/xxd/description
xxd creates a hex dump of a given file or standard input, it can also convert
a hex dump back to its original binary form.
endef
CONFIGURE_ARGS += \
--disable-gui \
--disable-gtktest \
--disable-xim \
--without-x \
--disable-netbeans \
--disable-cscope \
--disable-gpm \
--disable-acl \
--with-tlib=ncurses \
--with-compiledby="non-existent-hostname-compiled" \
--disable-darwin
CONFIGURE_VARS += \
vim_cv_getcwd_broken=no \
vim_cv_memmove_handles_overlap=yes \
vim_cv_stat_ignores_slash=yes \
vim_cv_tgetent=zero \
vim_cv_terminfo=yes \
vim_cv_toupper_broken=no \
vim_cv_tty_group=root \
vim_cv_tty_mode=0620
define Build/Prepare
$(call Build/Prepare/Default)
$(MAKE) -C $(PKG_BUILD_DIR)/src autoconf
endef
ifneq ($(CONFIG_PACKAGE_vim),)
define Build/Compile/vim
$(call Build/Configure/Default, \
--with-features=tiny \
--disable-multibyte \
)
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" all
$(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_tiny
endef
endif
ifneq ($(CONFIG_PACKAGE_vim-full),)
define Build/Compile/vim-full
$(call Build/Configure/Default, \
--with-features=normal \
--enable-multibyte \
)
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" all
$(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_normal
endef
endif
ifneq ($(CONFIG_PACKAGE_vim-fuller),)
define Build/Compile/vim-fuller
$(call Build/Configure/Default, \
--with-features=big \
--enable-multibyte \
)
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" all
$(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_big
endef
endif
ifneq ($(CONFIG_PACKAGE_xxd),)
define Build/Compile/xxd
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" all
endef
endif
define Build/Compile/vim-runtime
$(MAKE) -C $(PKG_BUILD_DIR)/src DESTDIR="$(PKG_INSTALL_DIR)" installrtbase
(cd $(PKG_INSTALL_DIR) && tar -cf $(PKG_BUILD_DIR)/docs.tar ./usr/share/vim/vim$(VIMVER)/doc)
rm -rf $(PKG_INSTALL_DIR)/usr/share/vim/vim$(VIMVER)/doc
rm -rf $(PKG_INSTALL_DIR)/usr/man
endef
define Build/Compile
$(call Build/Compile/vim)
$(call Build/Compile/vim-full)
$(call Build/Compile/vim-fuller)
$(call Build/Compile/vim-runtime)
$(call Build/Compile/xxd)
endef
define Package/vim/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_tiny $(1)/usr/bin/vim
$(INSTALL_DIR) $(1)/usr/share/vim
$(INSTALL_CONF) ./files/vimrc $(1)/usr/share/vim/
endef
define Package/vim-full/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_normal $(1)/usr/bin/vim
$(INSTALL_DIR) $(1)/usr/share/vim
$(INSTALL_CONF) ./files/vimrc.full $(1)/usr/share/vim/vimrc
endef
define Package/vim-fuller/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_big $(1)/usr/bin/vim
$(INSTALL_DIR) $(1)/usr/share/vim
$(CP) -r $(PKG_INSTALL_DIR)/usr/share/vim/vim$(VIMVER) $(1)/usr/share/vim
$(INSTALL_CONF) ./files/vimrc.full $(1)/usr/share/vim/vimrc
endef
define Package/vim-runtime/install
$(CP) $(PKG_INSTALL_DIR)/* $(1)
rm -rf $(1)/usr/share/vim/vim$(VIMVER)/doc
endef
define Package/vim-help/install
tar -C $(1) -xf $(PKG_BUILD_DIR)/docs.tar
endef
define Package/xxd/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/xxd/xxd $(1)/usr/bin
endef
$(eval $(call BuildPackage,vim))
$(eval $(call BuildPackage,vim-full))
$(eval $(call BuildPackage,vim-fuller))
$(eval $(call BuildPackage,vim-runtime))
$(eval $(call BuildPackage,vim-help))
$(eval $(call BuildPackage,xxd))
|