[packages] Require* calls must now be placed before BuildPackage calls
[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:=tcl8.4.19.tar.gz
14 PKG_SOURCE_URL:=http://heanet.dl.sourceforge.net/sourceforge/tcl/tcl8.4.19-src.tar.gz
15 PKG_MD5SUM:=ade2c033a7b545ee108f3fdfeb629fcf
16 PKG_CAT:=zcat
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION)
19 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/tcl
24 SECTION:=lang
25 CATEGORY:=Languages
26 TITLE:=TCL Lang
27 URL:=http://www.tcl.tk
28 endef
29
30 define Package/tcl/description
31 TCL Scripting Language
32 endef
33
34 define Build/Configure
35 (cd $(PKG_BUILD_DIR)/unix; \
36 autoconf configure.in > configure; \
37 sed -i.bak "s/relid'/relid/" configure; \
38 $(TARGET_CONFIGURE_OPTS) \
39 ./configure \
40 --build=$(GNU_HOST_NAME) \
41 --host=$(GNU_TARGET_NAME) \
42 --prefix=/usr \
43 --enable-gcc \
44 --enable-threads \
45 --disable-nls \
46 )
47 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR)/unix \
51 DESTDIR="$(PKG_INSTALL_DIR)" \
52 all install
53 endef
54
55 define Build/InstallDev
56 mkdir -p $(1)/usr/include
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
58 mkdir -p $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtcl*.{a,so*} $(1)/usr/lib/
60 endef
61
62
63 define Package/tcl/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib
66 $(INSTALL_DIR) $(1)/usr/bin
67 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
68 endef
69
70 $(eval $(call BuildPackage,tcl))