2 # Copyright (C) 2015 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
:=http
://ftp.vim.org
/pub
/vim
/unix
17 PKG_HASH
:=8b69fbd01c877dd8ecbbeca1dc66e5e927228d631ac4c2174b9307eb5c827c86
18 PKG_MAINTAINER
:=Marko Ratkaj
<marko.ratkaj@sartura.hr
>
19 PKG_CPE_ID
:=cpe
:/a
:vim
:vim
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)$(VIMVER
)
24 HOST_BUILD_DEPENDS
:=libiconv
/host
25 HOST_BUILD_DIR
:=$(BUILD_DIR_HOST
)/$(PKG_NAME
)$(VIMVER
)
26 HOST_BUILD_PARALLEL
:=1
28 include $(INCLUDE_DIR
)/package.mk
29 include $(INCLUDE_DIR
)/host-build.mk
31 define Package
/vim
/Default
35 TITLE
:=Vi IMproved
- enhanced vi editor
36 URL
:=http
://www.vim.org
/
41 $(call Package
/vim
/Default
)
45 define Package
/vim-full
46 $(call Package
/vim
/Default
)
51 define Package
/vim-fuller
52 $(call Package
/vim
/Default
)
56 define Package
/vim-runtime
57 $(call Package
/vim
/Default
)
58 TITLE
+= (runtime files
)
61 define Package
/vim-help
62 $(call Package
/vim
/Default
)
69 TITLE
:=make a hexdump or do the reverse
70 URL
:=http
://www.vim.org
/
73 define Package
/vim-full
/conffiles
78 define Package
/vim
/conffiles
83 define Package
/vim
/description
84 Vim is an almost compatible version of the UNIX editor Vi.
88 define Package
/vim-full
/description
89 Vim is an almost compatible version of the UNIX editor Vi.
94 define Package
/vim-fuller
/description
95 Vim is an almost compatible version of the UNIX editor Vi.
99 define Package
/vim-runtime
/description
100 Vim is an almost compatible version of the UNIX editor Vi.
104 define Package
/vim-help
/description
105 Vim is an almost compatible version of the UNIX editor Vi.
109 define Package
/xxd
/description
110 xxd creates a hex dump of a given file or standard input
, it can also convert
111 a hex dump back to its original binary form.
114 HOST_CONFIGURE_ARGS
+= \
120 --with-features
=normal \
132 --with-tlib
=ncurses \
133 --with-compiledby
="non-existent-hostname-compiled"
136 ac_cv_header_elf_h
=no \
137 vim_cv_getcwd_broken
=no \
138 vim_cv_memmove_handles_overlap
=yes \
139 vim_cv_stat_ignores_slash
=yes \
140 vim_cv_tgetent
=zero \
141 vim_cv_terminfo
=yes \
142 vim_cv_toupper_broken
=no \
143 vim_cv_tty_group
=root \
146 ifneq ($(HOST_OS
),Linux
)
147 TARGET_PATH_PKG
:=$(CURDIR
)/scripts
:$(TARGET_PATH_PKG
)
151 $(call Build
/Prepare
/Default
)
152 $(MAKE
) -C
$(PKG_BUILD_DIR
)/src autoconf
155 ifneq ($(CONFIG_PACKAGE_vim
),)
156 define Build
/Compile
/vim
157 $(call Build
/Configure
/Default
, \
158 --with-features
=tiny \
159 --disable-multibyte \
161 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
162 DESTDIR
="$(PKG_INSTALL_DIR)" all
163 $(CP
) $(PKG_BUILD_DIR
)/src
/$(PKG_NAME
) $(PKG_BUILD_DIR
)/vim_tiny
167 ifneq ($(CONFIG_PACKAGE_vim-full
),)
168 define Build
/Compile
/vim-full
169 $(call Build
/Configure
/Default
, \
170 --with-features
=normal \
173 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
174 DESTDIR
="$(PKG_INSTALL_DIR)" all
175 $(CP
) $(PKG_BUILD_DIR
)/src
/$(PKG_NAME
) $(PKG_BUILD_DIR
)/vim_normal
179 ifneq ($(CONFIG_PACKAGE_vim-fuller
),)
180 define Build
/Compile
/vim-fuller
181 $(call Build
/Configure
/Default
, \
182 --with-features
=big \
185 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
186 DESTDIR
="$(PKG_INSTALL_DIR)" all
187 $(CP
) $(PKG_BUILD_DIR
)/src
/$(PKG_NAME
) $(PKG_BUILD_DIR
)/vim_big
193 ifneq ($(CONFIG_PACKAGE_xxd
),)
194 define Build
/Compile
/xxd
195 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
196 DESTDIR
="$(PKG_INSTALL_DIR)" all
200 define Build
/Compile
/vim-runtime
201 $(MAKE
) -C
$(PKG_BUILD_DIR
)/src DESTDIR
="$(PKG_INSTALL_DIR)" installrtbase
202 (cd
$(PKG_INSTALL_DIR
) && tar -cf
$(PKG_BUILD_DIR
)/docs.
tar .
/usr
/share
/vim
/vim
$(VIMVER
)/doc
)
203 rm -rf
$(PKG_INSTALL_DIR
)/usr
/share
/vim
/vim
$(VIMVER
)/doc
204 rm -rf
$(PKG_INSTALL_DIR
)/usr
/man
208 $(call Build
/Compile
/vim
)
209 $(call Build
/Compile
/vim-full
)
210 $(call Build
/Compile
/vim-fuller
)
211 $(call Build
/Compile
/vim-runtime
)
212 $(call Build
/Compile
/xxd
)
215 define Package
/vim
/install
216 $(INSTALL_DIR
) $(1)/usr
/bin
217 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/vim_tiny
$(1)/usr
/bin
/vim
218 $(INSTALL_DIR
) $(1)/usr
/share
/vim
219 $(INSTALL_CONF
) .
/files
/vimrc
$(1)/usr
/share
/vim
/
222 define Package
/vim-full
/install
223 $(INSTALL_DIR
) $(1)/usr
/bin
224 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/vim_normal
$(1)/usr
/bin
/vim
225 $(INSTALL_DIR
) $(1)/usr
/share
/vim
226 $(INSTALL_CONF
) .
/files
/vimrc.full
$(1)/usr
/share
/vim
/vimrc
230 define Package
/vim-fuller
/install
231 $(INSTALL_DIR
) $(1)/usr
/bin
232 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/vim_big
$(1)/usr
/bin
/vim
233 $(INSTALL_DIR
) $(1)/usr
/share
/vim
234 $(LN
) vim
$(1)/usr
/bin
/vimdiff
235 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/vim
/vim
$(VIMVER
) $(1)/usr
/share
/vim
236 $(INSTALL_CONF
) .
/files
/vimrc.full
$(1)/usr
/share
/vim
/vimrc
241 define Package
/vim-runtime
/install
242 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)
243 rm -rf
$(1)/usr
/share
/vim
/vim
$(VIMVER
)/doc
246 define Package
/vim-help
/install
247 tar -C
$(1) -xf
$(PKG_BUILD_DIR
)/docs.
tar
250 define Package
/xxd
/install
251 $(INSTALL_DIR
) $(1)/usr
/bin
252 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/xxd
/xxd
$(1)/usr
/bin
255 $(eval
$(call BuildPackage
,vim
))
256 $(eval
$(call BuildPackage
,vim-full
))
257 $(eval
$(call BuildPackage
,vim-fuller
))
258 $(eval
$(call BuildPackage
,vim-runtime
))
259 $(eval
$(call BuildPackage
,vim-help
))
260 $(eval
$(call BuildPackage
,xxd
))
261 $(eval
$(call HostBuild
))