summaryrefslogtreecommitdiff
path: root/security/ruby-password
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2002-09-19 20:05:56 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2002-09-19 20:05:56 +0000
commitef77b2bf81c60940af0a9aa42b5a14f5c61b8d33 (patch)
tree507f2c4a0314dcf418b5d10dd8f9b2b7c77916eb /security/ruby-password
parentupgrade to 2.0.34 (diff)
Add ruby-password, a Ruby library to create, verify and manipulate
passwords.
Notes
Notes: svn path=/head/; revision=66738
Diffstat (limited to 'security/ruby-password')
-rw-r--r--security/ruby-password/Makefile39
-rw-r--r--security/ruby-password/distinfo1
-rw-r--r--security/ruby-password/files/patch-extconf.rb64
-rw-r--r--security/ruby-password/files/patch-rbcrack.c15
-rw-r--r--security/ruby-password/pkg-comment1
-rw-r--r--security/ruby-password/pkg-descr6
-rw-r--r--security/ruby-password/pkg-plist8
7 files changed, 134 insertions, 0 deletions
diff --git a/security/ruby-password/Makefile b/security/ruby-password/Makefile
new file mode 100644
index 000000000000..7b306c980f30
--- /dev/null
+++ b/security/ruby-password/Makefile
@@ -0,0 +1,39 @@
+# New ports collection makefile for: Ruby/Password
+# Date created: 18 September 2002
+# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= password
+PORTVERSION= 0.2.0
+CATEGORIES= security ruby
+MASTER_SITES= http://www.caliban.org/files/ruby/
+PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
+DISTNAME= ruby-${PORTNAME}-${PORTVERSION}
+DIST_SUBDIR= ruby
+
+MAINTAINER= knu@FreeBSD.org
+
+BUILD_DEPENDS= ${LOCALBASE}/lib/libcrack.a:${PORTSDIR}/security/cracklib
+RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/termios.so:${PORTSDIR}/comms/ruby-termios
+
+USE_RUBY= yes
+USE_RUBY_EXTCONF= yes
+
+CONFIGURE_ARGS= --with-crack-dict="${LOCALBASE}/libdata/cracklib/pw_dict.pwd"
+INSTALL_TARGET= site-install
+
+DOCS_EN= CHANGES README doc/password.html
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${RUBY_EXAMPLESDIR}/${PORTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/examples/*.rb ${RUBY_EXAMPLESDIR}/${PORTNAME}/
+ ${MKDIR} ${RUBY_DOCDIR}/${PORTNAME}
+.for f in ${DOCS_EN}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/${PORTNAME}/
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/security/ruby-password/distinfo b/security/ruby-password/distinfo
new file mode 100644
index 000000000000..9534b2d62b45
--- /dev/null
+++ b/security/ruby-password/distinfo
@@ -0,0 +1 @@
+MD5 (ruby/ruby-password-0.2.0.tar.gz) = cb6525ae6ba61ed5dba07f0fd185094b
diff --git a/security/ruby-password/files/patch-extconf.rb b/security/ruby-password/files/patch-extconf.rb
new file mode 100644
index 000000000000..04476b3e990d
--- /dev/null
+++ b/security/ruby-password/files/patch-extconf.rb
@@ -0,0 +1,64 @@
+--- extconf.rb.orig Wed Jun 19 09:29:52 2002
++++ extconf.rb Fri Sep 20 04:47:59 2002
+@@ -4,34 +4,44 @@
+
+ require 'mkmf'
+
+-CRACK_DICT = 'cracklib_dict.pwd'
++search_dicts = %w(
++/usr/local/lib/pw_dict.pwd
++/usr/lib/pw_dict.pwd
++/opt/lib/pw_dict.pwd
++/usr/local/lib/cracklib_dict.pwd
++/usr/lib/cracklib_dict.pwd
++/opt/lib/cracklib_dict.pwd
++)
+
+-dict = []
+-search_dirs = %w(/usr/local /usr /opt)
++if dict = with_config('crack-dict')
++ search_dicts.unshift(dict)
++end
+
+-# find the crack dictionary
+-print "checking for #{CRACK_DICT}... "
+-search_dirs.each do |d|
+- dict = Dir.glob(File.join(d, "lib", CRACK_DICT))
++crack_dict = nil
+
++# find the crack dictionary
++print "checking for cracklib dictionary... "
++search_dicts.each do |dict|
+ # create a header file pointing to the crack dictionary
+- unless dict.empty?
+- puts "yes"
+- path = dict[0].sub(/\.pwd/, '')
+- hfile = File.new("rbcrack.h", 'w')
+- hfile.printf("#define CRACK_DICT \"%s\"\n", path)
+- hfile.close
++ if File.exist?(dict)
++ puts dict
++ crack_dict = dict.sub(/\.pwd/, '')
+ break
+ end
+-
+ end
+
+-if dict.empty?
+- puts "no\nCouldn't find #{CRACK_DICT} on this system"
++if crack_dict.nil?
++ puts "no\nCouldn't find a cracklib dictionary on this system"
+ exit 1
+ end
+
+-have_library('crack', 'FascistCheck')
++hfile = File.new("rbcrack.h", 'w')
++hfile.printf("#define CRACK_DICT \"%s\"\n", crack_dict)
++hfile.close
++
++(have_header('packer.h') || have_header('crack.h')) &&
++ have_library('crack', 'FascistCheck') or exit 1
++
+ create_makefile('crack')
+
+ File.open('Makefile', 'a') do |f|
diff --git a/security/ruby-password/files/patch-rbcrack.c b/security/ruby-password/files/patch-rbcrack.c
new file mode 100644
index 000000000000..e47328ea5f62
--- /dev/null
+++ b/security/ruby-password/files/patch-rbcrack.c
@@ -0,0 +1,15 @@
+--- rbcrack.c.orig Wed Sep 18 16:45:57 2002
++++ rbcrack.c Fri Sep 20 04:46:38 2002
+@@ -5,7 +5,11 @@
+ */
+
+ #include "ruby.h"
+-#include "crack.h"
++#ifdef HAVE_PACKER_H
++#include <packer.h>
++#else
++#include <crack.h>
++#endif
+ #include "rbcrack.h"
+
+ #define CRACK_VERSION "0.2.0"
diff --git a/security/ruby-password/pkg-comment b/security/ruby-password/pkg-comment
new file mode 100644
index 000000000000..4e3bb15b3baf
--- /dev/null
+++ b/security/ruby-password/pkg-comment
@@ -0,0 +1 @@
+A Ruby library to create, verify and manipulate passwords
diff --git a/security/ruby-password/pkg-descr b/security/ruby-password/pkg-descr
new file mode 100644
index 000000000000..985bbd94a5c7
--- /dev/null
+++ b/security/ruby-password/pkg-descr
@@ -0,0 +1,6 @@
+Ruby/Password comprises a set of useful methods for creating,
+verifying and manipulating passwords. It includes an interface to
+CrackLib, a library commonly used for checking password strength.
+
+WWW: http://www.caliban.org/ruby/ruby-password.shtml
+Author: Ian Macdonald <ian@caliban.org>
diff --git a/security/ruby-password/pkg-plist b/security/ruby-password/pkg-plist
new file mode 100644
index 000000000000..82f55ed5ce3c
--- /dev/null
+++ b/security/ruby-password/pkg-plist
@@ -0,0 +1,8 @@
+%%RUBY_SITEARCHLIBDIR%%/crack.so
+%%RUBY_SITELIBDIR%%/password.rb
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/password/example.rb
+%%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/password
+%%PORTDOCS%%%%RUBY_DOCDIR%%/password/CHANGES
+%%PORTDOCS%%%%RUBY_DOCDIR%%/password/README
+%%PORTDOCS%%%%RUBY_DOCDIR%%/password/password.html
+%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/password