summaryrefslogtreecommitdiff
path: root/comms/ruby-termios
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2008-04-04 15:30:00 +0000
committerjlam <jlam@pkgsrc.org>2008-04-04 15:30:00 +0000
commit49044b1ec2caacbe0cd6751700981b592cdb06b1 (patch)
treec080e0fce7907456de3fe1768865d098adfb51fd /comms/ruby-termios
parentd5b336e4ba6b8a28d7b0778f55c1cbb057689834 (diff)
downloadpkgsrc-49044b1ec2caacbe0cd6751700981b592cdb06b1.tar.gz
Install as a gem using the pkgsrc rubygem.mk framework instead of
directly into site_ruby.
Diffstat (limited to 'comms/ruby-termios')
-rw-r--r--comms/ruby-termios/Makefile31
-rw-r--r--comms/ruby-termios/PLIST35
-rw-r--r--comms/ruby-termios/files/gemspec26
3 files changed, 59 insertions, 33 deletions
diff --git a/comms/ruby-termios/Makefile b/comms/ruby-termios/Makefile
index 93adc71b60f..20e273b12af 100644
--- a/comms/ruby-termios/Makefile
+++ b/comms/ruby-termios/Makefile
@@ -1,31 +1,22 @@
-# $NetBSD: Makefile,v 1.17 2007/08/18 14:26:59 taca Exp $
-#
+# $NetBSD: Makefile,v 1.18 2008/04/04 15:30:00 jlam Exp $
DISTNAME= ruby-termios-0.9.5
-PKGNAME= ${RUBY_PKGPREFIX}-termios-0.9.5
-CATEGORIES= comms ruby
+PKGNAME= ${RUBY_PKGPREFIX}-${GEM_NAME}
+PKGREVISION= 1
+CATEGORIES= comms
MASTER_SITES= http://arika.org/archive/
+EXTRACT_SUFX= .tar.gz
MAINTAINER= taca@NetBSD.org
HOMEPAGE= http://arika.org/ruby/termios
COMMENT= Ruby extension to termios library
-RUBY_HAS_ARCHLIB= yes
-USE_RUBY_EXTCONF= yes
+GEM_NAME= ${DISTNAME:S/ruby-//}
+GEM_BUILD= gemspec
+GEM_CLEANBUILD= Makefile *.o termios.${RUBY_DLEXT} mkmf.log
-DOCS= ChangeLog README TODO.ja
-EXAMPLES= modem_check0.rb modem_check1.rb modem_check2.rb \
- secret_input1.rb secret_input2.rb
+post-extract:
+ cp ${FILESDIR}/gemspec ${GEM_SPECFILE}
-post-install:
- ${INSTALL_DATA_DIR} ${RUBY_DOCDIR}/termios
-.for f in ${DOCS}
- ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/termios
-.endfor
- ${INSTALL_DATA_DIR} ${RUBY_EXAMPLESDIR}/termios
-.for f in ${EXAMPLES}
- ${INSTALL_DATA} ${WRKSRC}/examples/${f} ${RUBY_EXAMPLESDIR}/termios
-.endfor
-
-.include "../../lang/ruby/modules.mk"
+.include "../../misc/rubygems/rubygem.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/comms/ruby-termios/PLIST b/comms/ruby-termios/PLIST
index d36407f270f..2a7c1e3e3df 100644
--- a/comms/ruby-termios/PLIST
+++ b/comms/ruby-termios/PLIST
@@ -1,13 +1,22 @@
-@comment $NetBSD: PLIST,v 1.6 2007/08/18 14:26:59 taca Exp $
-${RUBY_SITEARCHLIBDIR}/termios.${RUBY_DLEXT}
-${RUBY_SITELIBDIR}/termios.rb
-${RUBY_DOCDIR}/termios/ChangeLog
-${RUBY_DOCDIR}/termios/README
-${RUBY_DOCDIR}/termios/TODO.ja
-${RUBY_EXAMPLESDIR}/termios/modem_check0.rb
-${RUBY_EXAMPLESDIR}/termios/modem_check1.rb
-${RUBY_EXAMPLESDIR}/termios/modem_check2.rb
-${RUBY_EXAMPLESDIR}/termios/secret_input1.rb
-${RUBY_EXAMPLESDIR}/termios/secret_input2.rb
-@dirrm ${RUBY_DOCDIR}/termios
-@dirrm ${RUBY_EXAMPLESDIR}/termios
+@comment $NetBSD: PLIST,v 1.7 2008/04/04 15:30:00 jlam Exp $
+${GEM_HOME}/cache/termios-${PKGVERSION}.gem
+${GEM_LIBDIR}/ChangeLog
+${GEM_LIBDIR}/MANIFEST
+${GEM_LIBDIR}/README
+${GEM_LIBDIR}/TODO.ja
+${GEM_LIBDIR}/examples/modem_check0.rb
+${GEM_LIBDIR}/examples/modem_check1.rb
+${GEM_LIBDIR}/examples/modem_check2.rb
+${GEM_LIBDIR}/examples/secret_input1.rb
+${GEM_LIBDIR}/examples/secret_input2.rb
+${GEM_LIBDIR}/extconf.rb
+${GEM_LIBDIR}/lib/termios.${RUBY_DLEXT}
+${GEM_LIBDIR}/termios.c
+${GEM_LIBDIR}/termios.rd
+${GEM_LIBDIR}/test/test0.rb
+${GEM_HOME}/specifications/termios-${PKGVERSION}.gemspec
+@dirrm ${GEM_LIBDIR}/test
+@dirrm ${GEM_LIBDIR}/lib
+@dirrm ${GEM_LIBDIR}/examples
+@dirrm ${GEM_LIBDIR}
+@exec ${MKDIR} %D/lib/ruby/gems/1.8/doc/termios-${PKGVERSION}
diff --git a/comms/ruby-termios/files/gemspec b/comms/ruby-termios/files/gemspec
new file mode 100644
index 00000000000..66e0e92eb8e
--- /dev/null
+++ b/comms/ruby-termios/files/gemspec
@@ -0,0 +1,26 @@
+require "rubygems"
+
+PLUGIN = "termios"
+NAME = "termios"
+VERSION = "0.9.5"
+AUTHOR = "Akira Yamada and Goto Kentaro"
+EMAIL = "akira@ruby-lang.org"
+HOMEPAGE = "http://arika.org/ruby/termios"
+SUMMARY = "Termios module are simple wrapper for termios(3). It can be included into IO-family classes and can extend IO-family objects. In addition, the methods can use as module function."
+
+spec = Gem::Specification.new do |s|
+ s.name = NAME
+ s.email = EMAIL
+ s.author = AUTHOR
+ s.version = VERSION
+ s.summary = SUMMARY
+ s.platform = Gem::Platform::RUBY
+ s.has_rdoc = false
+ s.homepage = HOMEPAGE
+ s.description = SUMMARY
+ s.autorequire = PLUGIN
+ s.require_paths = ["lib"]
+ s.extra_rdoc_files = ["README", "termios.rd"]
+ s.files = Dir.glob("[A-Z]*") + Dir.glob("*.rb") + Dir.glob("termios.*") + Dir.glob("{test,examples}/**/*")
+ s.extensions = "extconf.rb"
+end