773e9a8383464c5640ce17e48033c78e8d0a0422
[openwrt/svn-archive/archive.git] / lang / tcl / Makefile
1 #
2 # Copyright (C) 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 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=tcl
10 PKG_VERSION:=8.4.19
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=tcl$(PKG_VERSION)-src.tar.gz
14 PKG_SOURCE_URL:=@SF/tcl
15 PKG_MD5SUM:=ade2c033a7b545ee108f3fdfeb629fcf
16
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION)
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/tcl
22 SECTION:=lang
23 CATEGORY:=Languages
24 TITLE:=TCL Lang
25 URL:=http://www.tcl.tk
26 endef
27
28 define Package/tcl/description
29 TCL Scripting Language
30 endef
31
32 define Build/Configure
33 (cd $(PKG_BUILD_DIR)/unix; \
34 autoconf configure.in > configure; \
35 sed -i.bak "s/relid'/relid/" configure; \
36 $(TARGET_CONFIGURE_OPTS) \
37 ./configure \
38 --build=$(GNU_HOST_NAME) \
39 --host=$(GNU_TARGET_NAME) \
40 --prefix=/usr \
41 --enable-gcc \
42 --enable-threads \
43 --disable-nls \
44 )
45 endef
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR)/unix \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
50 all install
51 endef
52
53 define Build/InstallDev
54 mkdir -p $(1)/usr/include
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
56 mkdir -p $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtcl*.{a,so*} $(1)/usr/lib/
58 endef
59
60
61 define Package/tcl/install
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib
64 $(INSTALL_DIR) $(1)/usr/bin
65 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
66 endef
67
68 $(eval $(call BuildPackage,tcl))