[packages] add sqlite3-ruby, a Ruby interface for SQLite 3.x
authorNicolas Thill <nico@openwrt.org>
Sun, 18 Apr 2010 13:59:26 +0000 (13:59 +0000)
committerNicolas Thill <nico@openwrt.org>
Sun, 18 Apr 2010 13:59:26 +0000 (13:59 +0000)
SVN-Revision: 20987

lang/sqlite3-ruby/Makefile [new file with mode: 0644]

diff --git a/lang/sqlite3-ruby/Makefile b/lang/sqlite3-ruby/Makefile
new file mode 100644 (file)
index 0000000..3875e30
--- /dev/null
@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2010 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=sqlite3-ruby
+PKG_VERSION:=1.2.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://files.rubyforge.vm.bytemark.co.uk/sqlite-ruby/
+PKG_MD5SUM:=fe75fa99dd9a2b5a2f84ab484e7f6469
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ruby-sqlite3
+  SUBMENU:=Ruby
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Ruby interface for SQLite
+  URL:=http://www.ruby-lang.org/
+  DEPENDS:=+libruby +libsqlite3
+endef
+
+RUBY:= \
+       ruby -I $(STAGING_DIR)/usr/share/ruby \
+
+define Build/Configure
+       (cd $(PKG_BUILD_DIR)/ext/sqlite3_api; \
+               $(RUBY) extconf.rb; \
+       )
+endef
+
+define Build/Compile
+       (cd $(PKG_BUILD_DIR)/ext/sqlite3_api; \
+               $(MAKE); \
+       )
+endef
+
+define Package/ruby-sqlite3/install
+       $(INSTALL_DIR) $(1)/usr/lib/ruby/1.8
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/1.8/* $(1)/usr/lib/ruby/1.8/
+
+endef
+
+$(eval $(call BuildPackage,ruby-sqlite3))