packages java-jaskell.spec
      Pages: < 1 >  DOWNLOAD      
Name:          java-jaskell
Version:       1.0
Release:       1mamba
Summary:       Java Haskell pure functional programming language
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://jaskell.codehaus.org/
Source0:       http://dist.codehaus.org/jaskell/distributions/jaskell-%{version}.zip
Source1:       java-jaskell-1.0.pom
Patch0:        java-jaskell-1.0-build_xml.patch
License:       BSD
BuildRequires: apache-ant
BuildRequires: apache-ant-junit
BuildRequires: jakarta-bsf
BuildRequires: jakarta-commons-lang
BuildRequires: java-jfunutil
BuildRequires: java-jparsec
BuildRequires: java-junit3
BuildRequires: jpackage-utils
Requires:      jakarta-commons-lang
Requires:      java-jfunutil
Requires:      java-jparsec
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
There are already many cool scripting languages in jvm.
Jython, JRuby, Groovy etc. They are all excellent and very
practical scripting languages. Why yet another scripting
language?
Well. Jaskell is designed not to be a better language, but
a different one.
1. Most of the current scripting languages are Object-Oriented.
  Though they more or less have functional tastes (Ruby's
  sexy closure, for example), the heart of them are still
  Object-Oriented. One of the most important essenses of
  functional programming (combinators) is yet to be brought
  into Java.
2. Jaskell brings with it higher order function, function
  currying, pattern match and monadic combinator support.
3. Monadic combinator is ideal for designing Domain Specifi
  Language. It is relatively easy to tailor Jaskell runtime
  to make domain specific syntax look like simple atomic
  statements. See Neptune for a real example.
4. Jaskell bridges nicely between functional interpreter and
  Java. In fact, Jaskell is nothing but a Java library that
  passes Java objects in and out of the interpreter.

%package javadoc
Group:         Documentation
Summary:       Javadoc for %{name}

%description javadoc
Jaskell, Java Haskell pure functional programming language.

This package contains javadoc for %{name}.

%package manual
Group:         Documentation
Summary:       Documents for %{name}

%description manual
Jaskell, Java Haskell pure functional programming language.

This package contains documents for %{name}.

%prep
%setup -q -c 

mkdir src
pushd src
  unzip -q ../jaskell_src-1.0.zip
  for j in $(find . -name "*.jar"); do
    mv $j $j.no
  done
  pushd lib
    ln -sf $(build-classpath commons-lang) commons-lang-2.1.jar
    ln -sf $(build-classpath bsf) bsf.jar
    ln -sf $(build-classpath jfunutil) jfunutil.jar
    ln -sf $(build-classpath jparsec) jparsec.jar
#   jparsec_old2.jar.no
#   jparsec_old.jar.no
  popd
popd
%patch0 -p0

mkdir doc
pushd doc
  unzip -q ../jaskell_doc-1.0.zip
popd

%build

pushd src
  export CLASSPATH=$(build-classpath junit-3.8.2)
  ant buildlib test doc
popd

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}/
mkdir -p %{buildroot}%{_datadir}/maven2/poms

install -pm 644 src/bin/jaskell.jar \
	%{buildroot}%{_javadir}/jaskell-%{version}.jar

%add_to_maven_depmap jaskell jaskell %{version} JPP jaskell
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/maven2/poms/JPP-jaskell.pom

(
	cd %{buildroot}%{_javadir}/
	for jar in *-%{version}*; do
		ln -sf ${jar} ${jar/-%{version}/}
	done
)

mkdir -p %{buildroot}%{_javadocdir}/jaskell-%{version}
cp -pr src/docs/jaskell/api/* %{buildroot}%{_javadocdir}/jaskell-%{version}
ln -sf jaskell-%{version} %{buildroot}%{_javadocdir}/jaskell
rm -rf doc/api

mkdir -p %{buildroot}%{_docdir}/jaskell-%{version}
cp -pr doc/* %{buildroot}%{_docdir}/jaskell-%{version}

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root)
%{_javadir}/jaskell-%{version}.jar
%{_javadir}/jaskell.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc src/LICENSE.txt

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/jaskell-%{version}
%{_javadocdir}/jaskell

%files manual
%defattr(-,root,root)
%{_docdir}/jaskell-%{version}

%changelog
* Fri Dec 10 2010 gil <puntogil@...> 1.0-1mamba
- package created by autospec