%global base_name javaflow %global short_name commons-%{base_name} %global namedreltag -SNAPSHOT %global namedversion %{version}%{?namedreltag} %define with_maven 1 Name: apache-commons-javaflow Version: 1.0 Release: %mkrel 1 Summary: Commons JavaFlow Group: Development/Java License: ASL 2.0 Url: http://commons.apache.org/sandbox/javaflow/ # svn export http://svn.apache.org/repos/asf/commons/sandbox/javaflow/trunk/ commons-javaflow-1.0-SNAPSHOT # tar czf commons-javaflow-1.0-SNAPSHOT-src-svn.tar.gz commons-javaflow-1.0-SNAPSHOT Source0: commons-javaflow-1.0-SNAPSHOT-src-svn.tar.gz # svn export http://svn.apache.org/repos/asf/commons/proper/commons-build/trunk/ commons-build # tar czf commons-build-src-svn.tar.gz commons-build Source1: commons-build-src-svn.tar.gz Source2: commons-javaflow-1.0-SNAPSHOT-autogeneratedfiles.tar.gz BuildRequires: jpackage-utils BuildRequires: java-devel BuildRequires: apache-commons-sandbox-parent BuildRequires: ant BuildRequires: apache-commons-io BuildRequires: apache-commons-jci BuildRequires: apache-commons-logging BuildRequires: asm2 BuildRequires: bcel BuildRequires: junit BuildRequires: junit-addons BuildRequires: objectweb-asm BuildRequires: subversion %if !%with_maven BuildRequires: hamcrest BuildRequires: xerces-j2 BuildRequires: xml-commons-apis %else BuildRequires: maven BuildRequires: maven-ant-plugin BuildRequires: maven-compiler-plugin BuildRequires: maven-install-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-plugin-cobertura BuildRequires: maven-pmd-plugin BuildRequires: maven-surefire-plugin %endif Requires: apache-commons-io Requires: apache-commons-jci Requires: apache-commons-logging Requires: asm2 Requires: bcel Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils Requires: java BuildArch: noarch %description Sometimes it is useful if we can capture the state of the application, its stack of function calls, which includes local variables, the global variables and the program counter, and save them into an object. If this object would give us the ability to restart the processing from the point stored in it. A continuation is exactly the type of object that we need. Think of a continuation as an object that, for a given point in your program, contains a snapshot of the stack trace, including all the local variables, and the program counter. You can not only store these things in the continuation object, but also restore the execution of the program from a continuation object. This means that the stack trace and the program counter of the running program become the ones stored in a continuation. Continuations are powerful concepts from the world of functional languages, like Scheme, but they are becoming popular in other languages as well. %package javadoc Summary: API documentation for %{name} Group: Development/Java Requires: jpackage-utils %description javadoc This package contains Maven plugin for %{name} %prep %setup -q -n %{short_name}-%{namedversion} for j in $(find . -name "*.jar" -o -name '*.class' ); do rm -rf $j done %if !%with_maven tar xf %{SOURCE1} tar xf %{SOURCE2} %endif %build %if %with_maven mvn-rpmbuild -e \ -Dmaven.test.failure.ignore=true \ ant:ant install javadoc:aggregate %else # TODO %endif %install [ %{buildroot} != / ] && rm -rf %{buildroot} mkdir -p %{buildroot}%{_javadir} install -pm 644 target/%{short_name}-%{namedversion}.jar \ %{buildroot}%{_javadir}/%{name}-%{version}.jar ( cd %{buildroot}%{_javadir} for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|apache-||g"` done ) ( cd %{buildroot}%{_javadir} for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` done ) mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom %add_to_maven_depmap org.apache.commons %{base_name} %{version} JPP %{short_name} %add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name} mkdir -p %{buildroot}%{_javadocdir}/%{short_name} cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{short_name} %clean [ %{buildroot} != / ] && rm -rf %{buildroot} %post %update_maven_depmap %postun %update_maven_depmap %files %{_javadir}/%{name}-%{version}.jar %{_javadir}/%{name}.jar %{_javadir}/%{short_name}-%{version}.jar %{_javadir}/%{short_name}.jar %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %doc CREDITS.txt LICENSE.txt NOTICE.txt TODO.txt %files javadoc %{_javadocdir}/%{short_name} %changelog * Wed Oct 26 2011 gil <gil> 1.0-1.mga2 + Revision: 158479 - imported package apache-commons-javaflow