Update to upstream version 6.1.2

This commit is contained in:
Michael Simacek 2016-08-24 12:49:34 +02:00
parent 0807c6e372
commit 63e52b1fef
3 changed files with 31 additions and 43 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
javacc-4.1src.tar.gz
javacc.jar
javacc-5.0src.tar.gz
/javacc-6.1.2-sources.jar

View File

@ -29,27 +29,24 @@
#
Name: javacc
Version: 5.0
Release: 14%{?dist}
Version: 6.1.2
Release: 1%{?dist}
Epoch: 0
Summary: A parser/scanner generator for java
License: BSD
Source0: http://java.net/projects/%{name}/downloads/download/%{name}-%{version}src.tar.gz
URL: http://javacc.java.net/
Source0: https://java.net/projects/javacc/downloads/download/releases/Release%%20%{version}/javacc-%{version}-sources.jar
Source1: javacc.sh
Source2: jjdoc
Source3: jjtree
Patch0: 0001-Add-javadoc-target-to-build.xml.patch
URL: http://javacc.java.net/
Requires: java-headless
BuildRequires: javapackages-local
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: junit
BuildRequires: javacc
BuildRequires: java-devel
BuildArch: noarch
%description
%description
Java Compiler Compiler (JavaCC) is the most popular parser generator for use
with Java applications. A parser generator is a tool that reads a grammar
specification and converts it to a Java program that can recognize matches to
@ -77,64 +74,55 @@ Summary: Javadoc for %{name}
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{name}
%patch0 -p1
%setup -q
# Remove binary information in the source tar
find . -name "*.jar" -delete
find . -name "*.class" -delete
rm -r src/main/generated-sources
find ./examples -type f -exec sed -i 's/\r//' {} \;
ln -s `build-classpath javacc` bootstrap/javacc.jar
build-jar-repository -p bootstrap javacc
sed -i 's/source="1.4"/source="1.5"/g' src/org/javacc/{parser,jjdoc,jjtree}/build.xml
%mvn_file : %{name}
%build
# Use the bootstrap javacc.jar to generate some required
# source java files. After these source files are generated we
# remove the bootstrap jar and build the binary from source.
ant -f src/org/javacc/parser/build.xml parser-files
ant -f src/org/javacc/jjtree/build.xml tree-files
find . -name "*.jar" -delete
# There is maven pom which doesn't really work for building. The tests don't
# work either (even when using bundled jars).
ant jar javadoc
%install
# jar
install -Dpm 644 bin/lib/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
# The pom dependencies are also wrong
%mvn_artifact --skip-dependencies pom.xml target/javacc-%{version}.jar
%install
%mvn_install -J target/javadoc
# bin
install -Dp -T -m 755 %{SOURCE1} %{buildroot}/%{_bindir}/javacc.sh
install -Dp -T -m 755 %{SOURCE2} %{buildroot}/%{_bindir}/jjdoc
install -Dp -T -m 755 %{SOURCE3} %{buildroot}/%{_bindir}/jjtree
# javadoc
install -d -p 755 %{buildroot}/%{_javadocdir}/%{name}
cp -rp api/* %{buildroot}/%{_javadocdir}/%{name}
# pom
install -Dpm 644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom %{name}.jar
%files -f .mfiles
%{_javadir}/*.jar
%doc LICENSE README
%{_bindir}/*
%license LICENSE
%doc README
%{_bindir}/javacc.sh
%{_bindir}/jjdoc
%{_bindir}/jjtree
%files manual
%doc LICENSE README
%doc www/*
%files demo
%doc examples
%files javadoc
%doc LICENSE README
%{_javadocdir}/%{name}
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog
* Tue Aug 23 2016 Michael Simacek <msimacek@redhat.com> - 0:6.1.2-1
- Update to upstream version 6.1.2
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0:5.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View File

@ -1,2 +1 @@
de7a77c72002e81965aaa408145644bb javacc.jar
871d78a2a5859c2eebc712c1f8135be5 javacc-5.0src.tar.gz
a29fdd55ccb738dc07a489b80b74e062 javacc-6.1.2-sources.jar