Port libffi-sable to -ng
[openwrt/svn-archive/archive.git] / libs / libffi-sable / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libffi-sable
11 PKG_VERSION:=3325
12 PKG_RELEASE:=3
13 PKG_MD5SUM:=0c32eaaea0269c5fbe156fcd0be3e5bd
14
15 PKG_SOURCE_URL:=http://sablevm.org/download/snapshot/2005-01-21/
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_CAT:=zcat
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libffi-sable
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=Foreign Function Interface library (for sablevm)
28 DESCRIPTION:=The libffi library provides a portable, high level programming\\\
29 interface to various calling conventions. This allows a programmer to\\\
30 call any function specified by a call interface description at run\\\
31 time.\\\
32 URL:=http://sources.redhat.com/libffi/
33 endef
34
35 define Build/Configure
36 $(call Build/Configure/Default,--enable-shared \
37 --enable-static \
38 --disable-debug)
39 endef
40
41 define Build/Compile
42 rm -rf $(PKG_INSTALL_DIR)
43 mkdir -p $(PKG_INSTALL_DIR)
44 $(MAKE) -C $(PKG_BUILD_DIR) \
45 DESTDIR="$(PKG_INSTALL_DIR)" \
46 all install
47 endef
48
49 define Package/libffi-sable/install
50 install -m0755 -d $(1)/usr/lib
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libffi.so.* $(1)/usr/lib/
52 endef
53
54 define Build/InstallDev
55 mkdir -p $(STAGING_DIR)/usr/include
56 $(CP) $(PKG_INSTALL_DIR)/usr/include/ffi{,target}.h $(STAGING_DIR)/usr/include/
57 mkdir -p $(STAGING_DIR)/usr/lib
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libffi.{a,so*} $(STAGING_DIR)/usr/lib/
59 endef
60
61 define Build/UninstallDev
62 rm -rf \
63 $(STAGING_DIR)/usr/include/ffi{,target}.h \
64 $(STAGING_DIR)/usr/lib/libffi.{a,so*}
65 endef
66
67 $(eval $(call BuildPackage,libffi-sable))