package init

This commit is contained in:
chengzihan2 2020-08-19 14:27:02 +08:00
parent b7f05ffb0b
commit 618193590a
3 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,91 @@
%global base_name javaflow
%global short_name commons-%{base_name}
%global namedreltag -SNAPSHOT
%global namedversion %{version}%{?namedreltag}
Name: apache-commons-javaflow
Version: 1.0
Release: 1
Summary: Commons Javaflow
License: ASL 2.0
URL: http://commons.apache.org/sandbox/javaflow/
Source0: https://repo1.maven.org/maven2/com/google/code/maven-play-plugin/org/apache/commons/commons-javaflow/1590792/commons-javaflow-1590792.jar
Source1: https://repo1.maven.org/maven2/com/google/code/maven-play-plugin/org/apache/commons/commons-javaflow/1590792/commons-javaflow-1590792-javadoc.jar
BuildRequires: mvn(asm:asm) mvn(asm:asm-analysis) mvn(asm:asm-commons) mvn(asm:asm-tree)
BuildRequires: mvn(asm:asm-util) mvn(commons-io:commons-io)
BuildRequires: mvn(commons-logging:commons-logging) mvn(junit:junit)
BuildRequires: mvn(junit-addons:junit-addons) mvn(org.apache.ant:ant)
BuildRequires: mvn(org.apache.bcel:bcel) mvn(org.apache.commons:commons-jci-core) maven-local
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 ant
Summary: Development files for Commons Javaflow
Requires: ant %{name} = %{version}-%{release}
%description ant
This package enables support for the Commons Javaflow ant tasks.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%autosetup -c %{short_name}-%{namedversion}
cp ./META-INF/maven/org.apache.commons/commons-javaflow/pom.xml ./
jar -xvf %{SOURCE1}
find . -name "*.class" -delete
find . -name "*.jar" -delete
%pom_remove_parent
%pom_xpath_inject "pom:project" "<groupId>org.apache.commons</groupId>"
%pom_xpath_inject "pom:dependencies/pom:dependency[pom:artifactId = 'ant' ]" "<scope>provided</scope>"
%mvn_file :%{short_name} %{name}
%mvn_file :%{short_name} %{short_name}
%build
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
%install
%mvn_install
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
echo "ant %{short_name}" > %{short_name}
install -p -m 644 %{short_name} %{buildroot}%{_sysconfdir}/ant.d/%{short_name}
cp ./META-INF/LICENSE.txt ./
cp ./META-INF/NOTICE.txt ./
mkdir -p %{buildroot}%{_datadir}/javadoc/%{name}
cp -r %_builddir/%{name}-%{version}/* %{buildroot}%{_datadir}/javadoc/%{name}
find %{buildroot}%{_datadir}/javadoc/%{name} -type f -name "*.txt" -delete
find %{buildroot}%{_datadir}/javadoc/%{name} -name "pom*" -delete
rm -rf %{buildroot}%{_datadir}/javadoc/%{name}/META-INF
rm -rf %{buildroot}%{_datadir}/javadoc/%{name}/target
rm -rf %{buildroot}%{_datadir}/javadoc/%{name}/resources
%files -f .mfiles
%license LICENSE.txt NOTICE.txt
%files javadoc
%license LICENSE.txt NOTICE.txt
%doc %{_datadir}/javadoc/%{name}
%files ant
%config(noreplace) %{_sysconfdir}/ant.d/%{short_name}
%changelog
* Sat Aug 15 2020 chengzihan <chengzihan2@huawei.com> - 1.0-1
- Package init

Binary file not shown.

Binary file not shown.