# $Id: Portfile,v 1.2 2004/12/20 23:13:16 tristan Exp $
PortSystem		1.0
PortGroup		ruby 1.0

ruby.setup		rubycon 0.8 copy_install:. {_README.txt}
maintainers		tristan@opendarwin.org
description		Toolkit for building concept processing and reasoning systems.
long_description	RubyCon is an open-source, rapid development toolkit for \
                    building concept processing and other intelligent reasoning \
                    systems. RubyCon builds upon the work of the ConceptNet \
                    project (http://web.media.mit.edu/~hugo/conceptnet/), \
                    implementing ConceptNets semantic network of 280,000+ \
                    assertions and graph-processing algorithms into a set \
                    of reusable objects in the Ruby programming language. 
platforms		darwin
use_zip         yes
distname        ${ruby.filename}-${version}-src
worksrcdir      ${ruby.filename}
build           {
                    cd ${worksrcpath}
                    file mkdir ${worksrcpath}/db
                    file rename ${worksrcpath}/predicates.txt ${worksrcpath}/db/predicates
                    exec ${ruby.bin} -e "load \"rubycon.rb\";rcon=RubyCon.new;rcon.import \"db/predicates\""
                    reinplace "s;\.\/db;${ruby.lib}\/db;" ${worksrcpath}/concept.rb ${worksrcpath}/link.rb
                }
post-destroot   {
                    file delete ${destroot}${ruby.lib}/_COPYING.txt
                    file delete ${destroot}${ruby.lib}/_CREDITS.txt
                    file delete ${destroot}${ruby.lib}/_README.txt
                    foreach file [glob ${destroot}${ruby.lib}/db/*~] {
						file delete $file
					}

                    foreach file [glob ${destroot}${ruby.lib}/db/*] {
                        file attributes $file -permissions 00666
                    }
                }
homepage		http://www.geocities.com/ben_bongalon/rubycon/
master_sites	${homepage}
checksums		md5 71c9da8ec53344a32acfb8be03895566

