Blame SPECS/groovy.spec

426a5a
%global pkg_name groovy
426a5a
%{?scl:%scl_package %{pkg_name}}
426a5a
%{?maven_find_provides_and_requires}
426a5a
426a5a
# Note to packagers: When rebasing this to a later version, do not
426a5a
# forget to ensure that sources 1 and 2 are up to date as well as
426a5a
# the Requires list.
426a5a
426a5a
Name:           %{?scl_prefix}%{pkg_name}
426a5a
Version:        1.8.9
053625
Release:        7.19%{?dist}
426a5a
Summary:        Dynamic language for the Java Platform
426a5a
426a5a
# Some of the files are licensed under BSD and CPL terms, but the CPL has been superceded
426a5a
# by the EPL. We include copies of both for completeness.
426a5a
# groovyConsole uses CC-BY licensed icons
426a5a
# (see: subprojects/groovy-console/target/tmp/groovydoc/groovy/ui/icons/credits.txt)
426a5a
License:        ASL 2.0 and BSD and EPL and Public Domain and CC-BY
426a5a
URL:            http://groovy.codehaus.org/
426a5a
Source0:        http://dist.groovy.codehaus.org/distributions/%{pkg_name}-src-%{version}.zip
426a5a
Source1:        groovy-script
426a5a
Source2:        groovy-starter.conf
426a5a
Source4:        cpl-v10.txt
426a5a
Source5:        epl-v10.txt
426a5a
Source6:        http://www.apache.org/licenses/LICENSE-2.0.txt
426a5a
# http://jira.codehaus.org/browse/GROOVY-6085
426a5a
Patch0:         groovy-inner-interface-annotations.patch
053625
# https://github.com/apache/groovy/commit/09e9778e8a33052d8c27105aee5310649637233d
053625
# https://github.com/apache/groovy/commit/716d3e67e744c7edeed7cbc3f874090d39355764
053625
Patch1:         groovy-CVE-2015-3253-and-CVE-2016-6814.patch
426a5a
BuildArch:      noarch
426a5a
426a5a
BuildRequires:  %{?scl_prefix_java_common}ant
426a5a
BuildRequires:  %{?scl_prefix_java_common}antlr-tool
426a5a
BuildRequires:  %{?scl_prefix_java_common}ant-antlr
426a5a
BuildRequires:  %{?scl_prefix_java_common}objectweb-asm
426a5a
BuildRequires:  %{?scl_prefix_java_common}bsf
426a5a
BuildRequires:  %{?scl_prefix_java_common}jansi
426a5a
BuildRequires:  %{?scl_prefix_java_common}tomcat-jsp-2.2-api
426a5a
BuildRequires:  %{?scl_prefix_java_common}junit
426a5a
BuildRequires:  %{?scl_prefix_java_common}tomcat-servlet-3.0-api
426a5a
BuildRequires:  %{?scl_prefix_java_common}javapackages-tools
426a5a
BuildRequires:  %{?scl_prefix_java_common}apache-commons-cli
426a5a
BuildRequires:  %{?scl_prefix_java_common}ecj
426a5a
BuildRequires:  %{?scl_prefix}xstream
426a5a
BuildRequires:  %{?scl_prefix}jline
426a5a
BuildRequires:  %{?scl_prefix}apache-ivy
426a5a
BuildRequires:  unzip
426a5a
426a5a
# The are all runtime dependencies of the script
426a5a
# TODO: Think of splitting them into a separate subpackage
426a5a
Requires:       %{?scl_prefix_java_common}ant
426a5a
Requires:       %{?scl_prefix_java_common}ant-junit
426a5a
Requires:       %{?scl_prefix_java_common}antlr-tool
426a5a
Requires:       %{?scl_prefix_java_common}objectweb-asm
426a5a
Requires:       %{?scl_prefix_java_common}bsf
426a5a
Requires:       %{?scl_prefix_java_common}apache-commons-cli
426a5a
Requires:       %{?scl_prefix_java_common}apache-commons-logging
426a5a
Requires:       %{?scl_prefix_java_common}jansi
426a5a
Requires:       %{?scl_prefix_java_common}tomcat-jsp-2.2-api
426a5a
Requires:       %{?scl_prefix_java_common}junit
426a5a
Requires:       %{?scl_prefix_java_common}tomcat-servlet-3.0-api
426a5a
Requires:       %{?scl_prefix}xstream
426a5a
Requires:       %{?scl_prefix}jline
426a5a
Requires:       %{?scl_prefix}apache-ivy
426a5a
426a5a
426a5a
%description
426a5a
Groovy is an agile and dynamic language for the Java Virtual Machine,
426a5a
built upon Java with features inspired by languages like Python, Ruby and
426a5a
Smalltalk.  It seamlessly integrates with all existing Java objects and
426a5a
libraries and compiles straight to Java bytecode so you can use it anywhere
426a5a
you can use Java.
426a5a
426a5a
426a5a
%package javadoc
426a5a
Summary:        API Documentation for %{pkg_name}
426a5a
Requires:       %{name} = %{version}-%{release}
426a5a
%description javadoc
426a5a
JavaDoc documentation for %{pkg_name}
426a5a
426a5a
426a5a
%prep
426a5a
%setup -q -n %{pkg_name}-%{version}
426a5a
%{?scl:scl enable %{scl} - <<"EOF"}
426a5a
set -e -x
426a5a
cp %{SOURCE4} %{SOURCE5} %{SOURCE6} .
426a5a
# Remove bundled JARs and classes
426a5a
find \( -name *.jar -o -name *.class \) -delete
426a5a
426a5a
%patch0 -p1
053625
%patch1 -p1
426a5a
%{?scl:EOF}
426a5a
426a5a
%build
426a5a
%{?scl:scl enable %{scl} - <<"EOF"}
426a5a
set -e -x
426a5a
mkdir -p target/lib/{compile,tools}
426a5a
426a5a
# Construct classpath
426a5a
build-jar-repository target/lib/compile tomcat-servlet-api tomcat-jsp-api \
426a5a
        objectweb-asm/asm-tree objectweb-asm/asm \
426a5a
        objectweb-asm/asm-util objectweb-asm/asm-analysis \
426a5a
        antlr ant/ant-antlr antlr \
426a5a
        bsf jline xstream ant/ant junit ivy commons-cli \
426a5a
        jansi
426a5a
426a5a
# Use ECJ instead of OpenJDK to compile MethodHandle.  This is a
426a5a
# workaround for a bug in OpenJDK that causes compilation of
426a5a
# MethodHandle to take many minutes (15min or even more), while ECJ
426a5a
# can compile it under five seconds.  See rhbz#971483 and
426a5a
# http://mail.openjdk.java.net/pipermail/compiler-dev/2013-May/006339.html
426a5a
ecj -6 -d target/classes `find -name MethodHandle.java -o -name ArrayUtil.java`
426a5a
426a5a
# Build
426a5a
# TODO: Build at least tests, maybe examples
426a5a
ant -DskipTests=on -DskipExamples=on -DskipFetch=on -DskipEmbeddable=on \
426a5a
        createJars javadoc
426a5a
%{?scl:EOF}
426a5a
426a5a
426a5a
%install
426a5a
%{?scl:scl enable %{scl} - <<"EOF"}
426a5a
set -e -x
426a5a
426a5a
# Code
426a5a
install -d $RPM_BUILD_ROOT%{_javadir}
426a5a
install -p -m644 target/dist/groovy.jar $RPM_BUILD_ROOT%{_javadir}/%{pkg_name}.jar
426a5a
426a5a
# Startup scripts
426a5a
install -d $RPM_BUILD_ROOT%{_bindir}
426a5a
install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/groovy
426a5a
for TOOL in grape groovyc groovyConsole java2groovy groovysh
426a5a
do
426a5a
        ln $RPM_BUILD_ROOT%{_bindir}/groovy \
426a5a
                $RPM_BUILD_ROOT%{_bindir}/$TOOL
426a5a
done
426a5a
426a5a
# Configuration
426a5a
install -d $RPM_BUILD_ROOT%{_sysconfdir}
426a5a
install -p -m644 %{SOURCE2} \
426a5a
        $RPM_BUILD_ROOT%{_sysconfdir}/groovy-starter.conf
426a5a
426a5a
# API Documentation
426a5a
install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}
426a5a
find target -type d |xargs chmod 755
426a5a
cp -rp target/html/api/. $RPM_BUILD_ROOT%{_javadocdir}/%{name}
426a5a
426a5a
# Maven depmap
426a5a
install -d $RPM_BUILD_ROOT%{_mavenpomdir}
426a5a
install -p -m644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{pkg_name}.pom
426a5a
%add_maven_depmap JPP-%{pkg_name}.pom %{pkg_name}.jar
426a5a
%{?scl:EOF}
426a5a
426a5a
%files -f .mfiles
426a5a
%defattr(-,root,root,-)
426a5a
%{_bindir}/*
426a5a
%config(noreplace) %{_sysconfdir}/*
426a5a
%doc README.md
426a5a
%doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt
426a5a
426a5a
426a5a
%files javadoc
426a5a
%{_javadocdir}/*
426a5a
%doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt
426a5a
426a5a
%changelog
053625
* Wed Aug 23 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.9-7.19
053625
- Fix remote code execution vulnerability
053625
- Resolves: CVE-2015-3253, CVE-2016-6814
053625
426a5a
* Mon Feb 08 2016 Michal Srb <msrb@redhat.com> - 1.8.9-7.18
426a5a
- Fix BR on maven-local & co.
426a5a
426a5a
* Fri Jan 29 2016 Michal Srb <msrb@redhat.com> - 1.8.9-7.17
426a5a
- Adapt start script to rh-maven33 collection
426a5a
426a5a
* Mon Jan 11 2016 Michal Srb <msrb@redhat.com> - 1.8.9-7.16
426a5a
- maven33 rebuild #2
426a5a
426a5a
* Sat Jan 09 2016 Michal Srb <msrb@redhat.com> - 1.8.9-7.15
426a5a
- maven33 rebuild
426a5a
426a5a
* Tue Jul 21 2015 Michal Srb <msrb@redhat.com> - 1.8.9-7.14
426a5a
- Fix paths in groovy-script
426a5a
- Resolves: rhbz#1223655
426a5a
426a5a
* Tue Jul 07 2015 Michael Simacek <msimacek@redhat.com> - 1.8.9-7.13
426a5a
- Bump release once more
426a5a
426a5a
* Tue Jul 07 2015 Michael Simacek <msimacek@redhat.com> - 1.8.9-7.12
426a5a
- Set source level 6 when invoking ecj
426a5a
426a5a
* Tue Jan 13 2015 Michael Simacek <msimacek@redhat.com> - 1.8.9-7.11
426a5a
- Mass rebuild 2015-01-13
426a5a
426a5a
* Mon Jan 12 2015 Michael Simacek <msimacek@redhat.com> - 1.8.9-7.10
426a5a
- BR/R on packages from rh-java-common
426a5a
426a5a
* Wed Jan 07 2015 Michal Srb <msrb@redhat.com> - 1.8.9-7.9
426a5a
- Migrate to .mfiles
426a5a
426a5a
* Tue Jan 06 2015 Michael Simacek <msimacek@redhat.com> - 1.8.9-7.8
426a5a
- Mass rebuild 2015-01-06
426a5a
426a5a
* Mon May 26 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.9-7.7
426a5a
- Mass rebuild 2014-05-26
426a5a
426a5a
* Wed Feb 19 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.9-7.6
426a5a
- Mass rebuild 2014-02-19
426a5a
426a5a
* Tue Feb 18 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.9-7.5
426a5a
- Mass rebuild 2014-02-18
426a5a
426a5a
* Tue Feb 18 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.9-7.4
426a5a
- Remove requires on java
426a5a
426a5a
* Mon Feb 17 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.9-7.3
426a5a
- SCL-ize build-requires
426a5a
426a5a
* Thu Feb 13 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.9-7.2
426a5a
- Rebuild to regenerate auto-requires
426a5a
426a5a
* Tue Feb 11 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.9-7.1
426a5a
- First maven30 software collection build
426a5a
426a5a
* Mon Jan 13 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.9-7
426a5a
- Add Requires on java-devel
426a5a
- Resolves: rhbz#1052291
426a5a
426a5a
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.8.9-6
426a5a
- Mass rebuild 2013-12-27
426a5a
426a5a
* Thu Oct 24 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.9-5
426a5a
- Remove desktop files
426a5a
426a5a
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.9-4
426a5a
- Rebuild to regenerate API documentation
426a5a
- Resolves: CVE-2013-1571
426a5a
426a5a
* Mon Jun 10 2013 Michal Srb <msrb@redhat.com> - 1.8.9-3
426a5a
- Fix license tag (+CC-BY)
426a5a
426a5a
* Thu Jun  6 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.9-2
426a5a
- Remove bundled JARs and classes
426a5a
- Add workaround for rhbz#971483
426a5a
- Add Public Domain to licenses
426a5a
- Install ASL 2.0 license text, resolves: rhbz#858257
426a5a
426a5a
* Sat Apr 20 2013 gil cattaneo <puntogil@libero.it> - 1.8.9-1
426a5a
- Update to 1.8.9
426a5a
426a5a
* Thu Apr 11 2013 Matt Spaulding <mspaulding06@gmail.com> - 1.8.8-4
426a5a
- Now accepts classpath argument (RHBZ #810885)
426a5a
426a5a
* Mon Apr  8 2013 Andy Grimm <agrimm@gmail.com> - 1.8.8-3
426a5a
- Apply patch for GROOVY-6085 (RHBZ #949352) 
426a5a
426a5a
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.8-2
426a5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
426a5a
426a5a
* Tue Nov 27 2012 Tom Callaway <spot@fedoraproject.org> - 1.8.8-1
426a5a
- Update to 1.8.8
426a5a
- Fix licensing issues
426a5a
426a5a
* Wed Jul 25 2012 Johannes Lips <hannes@fedoraproject.org> - 1.8.7-1
426a5a
- Update to 1.8.7
426a5a
426a5a
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.6-5
426a5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
426a5a
426a5a
* Wed Mar 21 2012 Alexander Kurtakov <akurtako@redhat.com> 1.8.6-4
426a5a
- Move to tomcat v7 apis.
426a5a
- Guideline fixes.
426a5a
426a5a
* Fri Mar 09 2012 Johannes Lips <hannes@fedoraproject.org> - 1.8.6-3
426a5a
- fixed the path of jvm in the startup script 
426a5a
426a5a
* Sat Mar 03 2012 Johannes Lips <hannes@fedoraproject.org> - 1.8.6-2
426a5a
- fixed the startup script by adding jansi as dep
426a5a
426a5a
* Wed Feb 22 2012 Johannes Lips <hannes@fedoraproject.org> - 1.8.6-1
426a5a
- Update to 1.8.6
426a5a
426a5a
* Tue Jan 03 2012 Johannes Lips <hannes@fedoraproject.org> - 1.8.5-1
426a5a
- Update to 1.8.5
426a5a
426a5a
* Sun Nov 20 2011 Johannes Lips <hannes@fedoraproject.org> - 1.8.4-1
426a5a
- Update to 1.8.4
426a5a
426a5a
* Thu Oct 13 2011 Johannes Lips <hannes@fedoraproject.org> - 1.8.3-2
426a5a
- remove the nojansi patch since jansi is in fedora
426a5a
426a5a
* Thu Oct 13 2011 Johannes Lips <hannes@fedoraproject.org> - 1.8.3-1
426a5a
- Update to 1.8.3
426a5a
426a5a
* Tue Sep 06 2011 Johannes Lips <hannes@fedoraproject.org> - 1.8.2-1
426a5a
- Update to 1.8.2
426a5a
426a5a
* Sat Aug 13 2011 Johannes Lips <hannes@fedoraproject.org> - 1.8.1-3
426a5a
- adjusted the maven pom dir
426a5a
426a5a
* Sat Aug 13 2011 Johannes Lips <hannes@fedoraproject.org> - 1.8.1-2
426a5a
- updated the nojansi patch
426a5a
426a5a
* Sat Aug 13 2011 Johannes Lips <hannes@fedoraproject.org> - 1.8.1-1
426a5a
- Update to 1.8.1
426a5a
426a5a
* Wed May 04 2011 Johannes Lips <hannes@fedoraproject.org> - 1.8.0-2
426a5a
- Minor changes to reflect changes to packaging guidelines
426a5a
426a5a
* Fri Apr 29 2011 Johannes Lips <hannes@fedoraproject.org> - 1.8.0-1
426a5a
- Update to 1.8.0
426a5a
426a5a
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.7-2
426a5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
426a5a
426a5a
* Sat Nov 6 2010 Alexander Kurtakov <akurtako@redhat.com> 1.7.2-3
426a5a
- Build with servlet and jsp apis from tomcat6.
426a5a
426a5a
* Thu Jun 17 2010 Lubomir Rintel <lkundrak@v3.sk> - 1.7.2-2
426a5a
- Fix a typo
426a5a
426a5a
* Tue Apr 20 2010 Lubomir Rintel <lkundrak@v3.sk> - 1.7.2-1
426a5a
- Bump version
426a5a
426a5a
* Fri Apr 02 2010 Lubomir Rintel <lkundrak@v3.sk> - 1.7.1-1
426a5a
- Bump version
426a5a
- Revert addition of jansi dependency
426a5a
426a5a
* Fri Apr 02 2010 Lubomir Rintel <lkundrak@v3.sk> - 1.7.0-2
426a5a
- Add maven depmap
426a5a
426a5a
* Wed Feb 17 2010 Lubomir Rintel <lkundrak@v3.sk> - 1.7.0-1
426a5a
- New upstream version
426a5a
- Use asm 3.1 instead of asm2
426a5a
426a5a
* Wed Dec 04 2009 Lubomir Rintel <lkundrak@v3.sk> - 1.6.7-1
426a5a
- New upstream version
426a5a
- Make Jochen happy
426a5a
426a5a
* Thu Dec 03 2009 Lubomir Rintel <lkundrak@v3.sk> - 1.6.6-2
426a5a
- Build with OpenJDK
426a5a
426a5a
* Mon Nov 30 2009 Lubomir Rintel <lkundrak@v3.sk> - 1.6.6-1
426a5a
- Bump to 1.6.6
426a5a
- Don't mistakenly require itself (Jochen Schmitt, #534168#c3)
426a5a
426a5a
* Fri Nov 27 2009 Lubomir Rintel <lkundrak@v3.sk> - 1.6.5-2
426a5a
- Hopefully fix mockbuild
426a5a
426a5a
* Mon Nov 09 2009 Lubomir Rintel <lkundrak@v3.sk> - 1.6.5-1
426a5a
- Initial Fedora packaging