80beb53fcdd4865a3af7e5ba04df856a2a10a5a8
[openwrt/svn-archive/archive.git] / lang / sablevm-classpath / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=sablevm-classpath
12 PKG_VERSION:=1.13
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=9476bb7a0ad67c6cfa353d06f094cdce
15
16 PKG_SOURCE_URL:=http://sablevm.org/download/release/$(PKG_VERSION)/
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libsablevm-classpath
26 SECTION:=lang
27 CATEGORY:=Languages
28 TITLE:=Essential native libraries for Java
29 DESCRIPTION:=GNU Classpath, Essential Libraries for Java, is a GNU project to create\\\
30 free core class libraries for use with virtual machines and compilers for\\\
31 the java programming language.\\\
32 This is a modified version for use with SableVM.\\\
33 URL:=http://www.gnu.org/software/classpath/
34 endef
35
36 define Package/sablevm-classpath-full
37 SECTION:=lang
38 CATEGORY:=Languages
39 DEPENDS:=libsablevm-classpath
40 TITLE:=Full set
41 endef
42
43 define Package/sablevm-classpath-mini
44 SECTION:=lang
45 CATEGORY:=Languages
46 DEPENDS:=libsablevm-classpath
47 TITLE:=Minimal set
48 endef
49
50 define Build/Configure
51 $(call Build/Configure/Default,--enable-shared \
52 --disable-static \
53 --disable-gtk-peer \
54 --disable-gtk-cairo \
55 --without-x)
56 endef
57
58
59 define Build/Compile
60 rm -rf $(PKG_INSTAL_DIR)
61 mkdir -p $(PKG_INSTALL_DIR)
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 DESTDIR="$(PKG_INSTALL_DIR)" \
64 all install
65 $(CP) ./files/mini.classlist $(PKG_BUILD_DIR)/lib/
66 cd $(PKG_BUILD_DIR)/lib ; fastjar -Mcf mini.jar -@ < mini.classlist
67 endef
68
69 define Package/libsablevm-classpath/install
70 install -d -m0755 $(1)/usr/lib/sablevm-classpath
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sablevm-classpath/libjava*.so $(1)/usr/lib/sablevm-classpath/
72 install -d -m0755 $(1)/usr/lib/security
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/classpath.security $(1)/usr/lib/security/
74 endef
75
76 define Package/sablevm-classpath-full/install
77 install -d -m0755 $(1)/usr/share/sablevm-classpath
78 $(CP) $(PKG_INSTALL_DIR)/usr/share/sablevm-classpath/{libclasspath,resources}.jar \
79 $(1)/usr/share/sablevm-classpath/
80 endef
81
82 define Package/sablevm-classpath-mini/install
83 install -d -m0755 $(1)/usr/share/sablevm-classpath
84 install -m0755 $(PKG_BUILD_DIR)/lib/mini.jar \
85 $(1)/usr/share/sablevm-classpath/libclasspath.jar
86 endef
87
88 $(eval $(call BuildPackage,libsablevm-classpath))
89 $(eval $(call BuildPackage,sablevm-classpath-full))
90 $(eval $(call BuildPackage,sablevm-classpath-mini))
91
92 $(eval $(call RequireCommand,jikes jikes-sablevm sablevm fastjar, \
93 libsablevm-classpath require jikes jikes-sablevm sablevm fastjar to compile. \
94 ))