ruby:
[packages.git] / lang / ruby / 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:=ruby
12 PKG_VERSION:=1.8.6
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.ruby-lang.org/pub/ruby/1.8/
17 PKG_MD5SUM:=e558a0e00ae318d43bf6ff9af452bad2
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/ruby
25   SECTION:=lang
26   CATEGORY:=Languages
27   DEPENDS:=+libruby
28   TITLE:=Ruby object-oriented scripting language interpreter
29   DESCRIPTION:=\
30         Ruby is the interpreted scripting language for quick and \\\
31         easy object-oriented programming.  It has many features to \\\
32         process text files and to do system management tasks (as in \\\
33         perl).  It is simple, straight-forward, and extensible.
34   URL:=http://www.ruby-lang.org/
35 endef
36
37 define Package/libruby
38   SECTION:=libs
39   CATEGORY:=Libraries
40   TITLE:=Libraries necessary to run Ruby
41   URL:=http://www.ruby-lang.org/
42 endef
43
44 CONFIGURE_ARGS += \
45         --enable-shared \
46         --disable-ipv6 \
47         , \
48         ac_cv_func_setpgrp_void=yes
49
50 MAKE_FLAGS += \
51         DESTDIR="$(PKG_INSTALL_DIR)" \
52         SHELL="/bin/bash" \
53         all install
54
55 define Package/ruby/install
56         $(INSTALL_DIR) $(1)/usr/bin
57         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/bin/
58 endef
59
60 define Package/libruby/install
61         $(INSTALL_DIR) $(1)/usr/lib
62         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so* $(1)/usr/lib/
63 endef
64
65 $(eval $(call BuildPackage,ruby))
66 $(eval $(call BuildPackage,libruby))
67
68 $(eval $(call RequireCommand,ruby, \
69         $(PKG_NAME) requires ruby installed on the host-system. \
70 ))