2 # Copyright (C) 2008 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
11 PKG_VERSION:=1.6.20070208
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=ftp://ftp.ossp.org/pkg/lib/js/
16 PKG_MD5SUM:=07f6cad7e03fd74a949588c3d4b333de
19 include $(INCLUDE_DIR)/package.mk
23 define Package/js/Default
24 TITLE:=Mozilla JavaScript Engine
25 URL:=http://www.ossp.org/pkg/lib/js/
29 $(call Package/js/Default)
34 DEPENDS+= +libjs +libreadline +libncurses
38 $(call Package/js/Default)
44 TARGET_CFLAGS += $(FPIC)
54 define Build/Configure
55 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
60 --datadir=/usr/share \
61 --includedir=/usr/include \
62 --infodir=/usr/share/info \
64 --libexecdir=/usr/lib \
65 --localstatedir=/var \
66 --mandir=/usr/share/man \
70 $(DISABLE_LARGEFILE) \
74 $(MAKE) -C $(PKG_BUILD_DIR) src/jsautocfg.h
75 $(call Build/Configure/Default)
78 define Build/InstallDev
79 $(INSTALL_DIR) $(2)/bin
81 $(PKG_INSTALL_DIR)/usr/bin/js-config \
84 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
87 $(INSTALL_DIR) $(1)/usr/include
89 $(PKG_INSTALL_DIR)/usr/include/js \
92 $(INSTALL_DIR) $(1)/usr/lib
94 $(PKG_INSTALL_DIR)/usr/lib/libjs.{la,so*} \
97 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
99 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/js.pc \
100 $(1)/usr/lib/pkgconfig/
103 define Package/js/install
104 $(INSTALL_DIR) $(1)/usr/bin
106 $(PKG_INSTALL_DIR)/usr/bin/js \
110 define Package/libjs/install
111 $(INSTALL_DIR) $(1)/usr/lib
113 $(PKG_INSTALL_DIR)/usr/lib/libjs.so.* \
117 $(eval $(call BuildPackage,js))
118 $(eval $(call BuildPackage,libjs))