Makefile cleanup (lang section)
[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
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://sablevm.org/download/release/$(PKG_VERSION)/
17 PKG_MD5SUM:=9476bb7a0ad67c6cfa353d06f094cdce
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/sablevm-classpath/Default
26 SECTION:=lang
27 CATEGORY:=Languages
28 URL:=http://www.gnu.org/software/classpath/
29 endef
30
31 define Package/libsablevm-classpath
32 $(call Package/sablevm-classpath/Default)
33 TITLE:=Essential native libraries for Java
34 DESCRIPTION:=\
35 GNU Classpath, Essential Libraries for Java, is a GNU project to create \\\
36 free core class libraries for use with virtual machines and compilers for \\\
37 the java programming language.\\\
38 This is a modified version for use with SableVM.
39 endef
40
41 define Package/sablevm-classpath-full
42 $(call Package/sablevm-classpath/Default)
43 DEPENDS:=+libsablevm-classpath
44 TITLE+= (full)
45 endef
46
47 define Package/sablevm-classpath-mini
48 $(call Package/sablevm-classpath/Default)
49 DEPENDS:=+libsablevm-classpath
50 TITLE+= (minimal)
51 endef
52
53 define Build/Configure
54 $(call Build/Configure/Default, \
55 --disable-gtk-peer \
56 --disable-gtk-cairo \
57 --with-jikes \
58 --without-x \
59 )
60 endef
61
62
63 define Build/Compile
64 $(MAKE) -C $(PKG_BUILD_DIR) \
65 DESTDIR="$(PKG_INSTALL_DIR)" \
66 all install
67 $(CP) ./files/mini.classlist $(PKG_BUILD_DIR)/lib/
68 cd $(PKG_BUILD_DIR)/lib ; fastjar -Mcf mini.jar -@ < mini.classlist
69 endef
70
71 define Package/libsablevm-classpath/install
72 install -d -m0755 $(1)/usr/lib/sablevm-classpath
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sablevm-classpath/libjava*.so $(1)/usr/lib/sablevm-classpath/
74 install -d -m0755 $(1)/usr/lib/security
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/classpath.security $(1)/usr/lib/security/
76 endef
77
78 define Package/sablevm-classpath-full/install
79 install -d -m0755 $(1)/usr/share/sablevm-classpath
80 $(CP) $(PKG_INSTALL_DIR)/usr/share/sablevm-classpath/{libclasspath,resources}.jar \
81 $(1)/usr/share/sablevm-classpath/
82 endef
83
84 define Package/sablevm-classpath-mini/install
85 install -d -m0755 $(1)/usr/share/sablevm-classpath
86 install -m0755 $(PKG_BUILD_DIR)/lib/mini.jar \
87 $(1)/usr/share/sablevm-classpath/libclasspath.jar
88 endef
89
90 $(eval $(call BuildPackage,libsablevm-classpath))
91 $(eval $(call BuildPackage,sablevm-classpath-full))
92 $(eval $(call BuildPackage,sablevm-classpath-mini))
93
94 $(foreach command, jikes fastjar, \
95 $(eval $(call RequireCommand,$(command), \
96 $(PKG_NAME) requires $(command). \
97 )) \
98 )