+define Package/libruby/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
+endef
+
+define Package/ruby-core/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby $(1)/usr/lib/
+ rm -rf \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/curses.so \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/digest \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/digest.rb \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/digest \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/openssl \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/drb/ssl.rb \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/net/https.rb \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick/ssl.rb \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/dl.so \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/enc \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb/completion.rb \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb/ext/save-history.rb \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/json.rb \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/json \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/json \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rdoc \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rake \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rubygems \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/cgi \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rexml \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rss \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/test \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc \
+ \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/yaml \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \
+ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/syck.so \
+
+ find $(1) -name '*.h' | xargs rm -f
+endef
+
+define Package/ruby-cgi/install
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi $(1)/usr/lib/ruby/$(PKG_LIBVER)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
+endef
+
+define Package/ruby-dl/install
+ ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
+ usr/lib/ruby/$(PKG_LIBVER)/*/dl.so \
+ ) | ( cd $(1); $(TAR) -xf - )
+endef
+
+define Package/ruby-enc/install
+ ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
+ usr/lib/ruby/$(PKG_LIBVER)/*/enc \
+ ) | ( cd $(1); $(TAR) -xf - )
+endef
+
+define Package/ruby-erb/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/erb $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
+endef
+
+define Package/ruby-gdbm/install
+ ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
+ usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \
+ ) | ( cd $(1); $(TAR) -xf - )
+endef
+
+define Package/ruby-gems/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems $(1)/usr/lib/ruby/$(PKG_LIBVER)/
+endef
+
+define Package/ruby-irb/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/irb $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
+endef
+
+define Package/ruby-json/install
+ ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
+ usr/lib/ruby/$(PKG_LIBVER)/json.rb \
+ usr/lib/ruby/$(PKG_LIBVER)/json \
+ usr/lib/ruby/$(PKG_LIBVER)/*/json \
+ ) | ( cd $(1); $(TAR) -xf - )
+endef
+
+define Package/ruby-ncurses/install
+ ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
+ usr/lib/ruby/$(PKG_LIBVER)/*/curses.so \
+ ) | ( cd $(1); $(TAR) -xf - )
+endef
+
+define Package/ruby-nkf/install
+ ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
+ usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \
+ usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \
+ ) | ( cd $(1); $(TAR) -xf - )
+endef