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