ant/ant-antlr.spec

521 lines
20 KiB
RPMSpec

#
# spec file for package ant-antlr (Version 1.6.5)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: ant-antlr
BuildRequires: ant antlr bcel bsf jaf jakarta-commons-logging java2-devel-packages javamail jdepend junit log4j oro regexp xalan-j2 xerces-j2
# commented out as jai was dropped in 10.3
#% ifarch % ix86
#BuildRequires: jai
#% endif
%define ant_home %{_datadir}/ant
%define ant_name ant
%define section free
Version: 1.6.5
Release: 85
URL: http://jakarta.apache.org/
Group: Development/Tools/Building
Source0: apache-ant-%{version}-src.tar.bz2
# Ant configuration file which is edited when each optional subpackage
# is installed/uninstalled
Summary: Optional antlr Tasks for Ant
License: The Apache Software License
# Ant configuration file which is edited when each optional subpackage
# is installed/uninstalled
# Fix temp directory used for file containing large command strings (> 4k)
Requires: %{ant_name} = %{version}
Conflicts: ant-optional-clean, ant-optional-full
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch150: java150_build.patch
%description
Apache Ant is a Java-based build tool. This package contains optional
antlr tasks for Apache Ant.
%package -n ant-commons-logging
Summary: Optional commons logging tasks for ant
Group: Development/Tools/Building
Requires: jakarta-commons-logging
Provides: ant-commons-logging = %{version}-%{release}
Requires: %{ant_name} = %{version}
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-commons-logging
Apache Ant is a Java-based build tool.
This package contains optional commons logging tasks for Apache Ant.
%package -n ant-apache-bsf
Summary: Optional apache bsf tasks for ant
Group: Development/Tools/Building
Requires: bsf
Requires: %{ant_name} = %{version}
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-apache-bsf
Apache Ant is a Java-based build tool.
This package contains optional apache bsf tasks for Apache Ant.
%package -n ant-apache-resolver
Summary: Optional apache resolver tasks for ant
Group: Development/Tools/Building
Requires: %{ant_name} = %{version}
Requires: xml-commons-resolver
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-apache-resolver
Apache Ant is a Java-based build tool.
This package contains optional apache resolver tasks for Apache Ant.
%package -n ant-apache-bcel
Summary: Optional apache bcel tasks for ant
Group: Development/Tools/Building
Requires: %{ant_name} = %{version}
Requires: bcel
Provides: ant-jakarta-bcel = %{version}-%{release}
Obsoletes: ant-jakarta-bcel
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-apache-bcel
Apache Ant is a Java-based build tool.
This package contains optional apache bcel tasks for Apache Ant.
%package -n ant-apache-log4j
Summary: Optional apache log4j tasks for ant
Group: Development/Tools/Building
Requires: %{ant_name} = %{version}
Requires: log4j
Provides: ant-jakarta-log4j = %{version}-%{release}
Obsoletes: ant-jakarta-log4j
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-apache-log4j
Apache Ant is a Java-based build tool.
This package contains optional apache log4j tasks for Apache Ant.
%package -n ant-apache-oro
Summary: Optional apache oro tasks for ant
Group: Development/Tools/Building
Requires: %{ant_name} = %{version}
Requires: oro
Provides: ant-jakarta-oro = %{version}-%{release}
Obsoletes: ant-jakarta-oro
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-apache-oro
Apache Ant is a Java-based build tool.
This package contains optional apache oro tasks for Apache Ant.
%package -n ant-apache-regexp
Summary: Optional apache regexp tasks for ant
Group: Development/Tools/Building
Requires: %{ant_name} = %{version}
Requires: regexp
Provides: ant-jakarta-regexp = %{version}-%{release}
Obsoletes: ant-jakarta-regexp
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-apache-regexp
Apache Ant is a Java-based build tool.
This package contains optional apache regexp tasks for Apache Ant.
%package -n ant-javamail
Summary: Optional javamail tasks for ant
Group: Development/Tools/Building
Requires: %{ant_name} = %{version}
Requires: javamail >= 1.2-5jpp
Requires: jaf >= 1.0.1-5jpp
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-javamail
Apache Ant is a Java-based build tool.
This package contains optional javamail tasks for Apache Ant.
%package -n ant-jdepend
Summary: Optional jdepend tasks for ant
Group: Development/Tools/Building
Requires: %{ant_name} = %{version}
Requires: jdepend
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-jdepend
Apache Ant is a Java-based build tool.
This package contains optional jdepend tasks for Apache Ant.
%package -n ant-jmf
Summary: Optional jmf tasks for ant
Group: Development/Tools/Building
Requires: %{ant_name} = %{version}
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-jmf
Apache Ant is a Java-based build tool.
This package contains optional jmf tasks for Apache Ant.
%package -n ant-junit
Summary: Optional junit tasks for ant
Group: Development/Tools/Building
Requires: %{ant_name} = %{version}
Requires: junit
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-junit
Apache Ant is a Java-based build tool.
This package contains optional JUnit tasks for Apache Ant.
%package -n ant-nodeps
Summary: Optional tasks for ant
Group: Development/Tools/Building
Requires: %{ant_name} = %{version}
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-nodeps
Apache Ant is a Java-based build tool.
This package contains optional tasks for Apache Ant.
%package -n ant-swing
Summary: Optional swing tasks for ant
Group: Development/Tools/Building
Requires: %{ant_name} = %{version}
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-swing
Apache Ant is a Java-based build tool.
This package contains optional swing tasks for Apache Ant.
%package -n ant-trax
Summary: Optional trax tasks for ant
Group: Development/Tools/Building
Requires: %{ant_name} = %{version}
Requires: jaxp_transform_impl
# The ant-xalan jar has been merged into the ant-trax one
Obsoletes: ant-xalan2
Provides: ant-xalan2
Conflicts: ant-optional-clean, ant-optional-full
%description -n ant-trax
Apache Ant is a Java-based build tool.
This package contains optional trax tasks for Apache Ant.
%prep
%setup -q -n apache-ant-%{version}
# Fix temp directory used for file containing large command strings (> 4k)
# clean jar files
%patch150 -p1
find . -name "*.jar" -exec rm -f {} \;
# -----------------------------------------------------------------------------
%build
%ifarch %ix86
export CLASSPATH=$(%{_bindir}/build-classpath jaxp_parser_impl xml-commons-apis antlr bcel jaf javamail/mailapi jdepend junit log4j oro regexp commons-logging bsf xml-commons-resolver regexp regexp javamail xml-commons-resolver jakarta-commons-logging jdepend xalan-j2)
%else
export CLASSPATH=$(%{_bindir}/build-classpath jaxp_parser_impl xml-commons-apis antlr bcel jaf javamail/mailapi jdepend junit log4j oro regexp commons-logging bsf xml-commons-resolver regexp regexp javamail xml-commons-resolver jakarta-commons-logging jdepend )
%endif
# perform bootstrap and build without jjp or user configs,
# (except JAVA_HOME as required by build script)
#[ -n "$JAVA_HOME" ] && unset JAVA_HOME
#[ -r %{_sysconfdir}/java/java.conf ] && . %{_sysconfdir}/java/java.conf
#[ -z "$JAVA_HOME" ] && JAVA_HOME=%{_jvmdir}/java
export JAVA_HOME
sh build.sh --noconfig jars javadocs
%install
# jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}
# optional jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}/ant
cp -p build/lib/%{ant_name}-antlr.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-antlr-%{version}.jar
cp -p build/lib/%{ant_name}-apache-bsf.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-apache-bsf-%{version}.jar
cp -p build/lib/%{ant_name}-apache-resolver.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-apache-resolver-%{version}.jar
cp -p build/lib/%{ant_name}-apache-bcel.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-apache-bcel-%{version}.jar
cp -p build/lib/%{ant_name}-apache-log4j.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-apache-log4j-%{version}.jar
cp -p build/lib/%{ant_name}-apache-oro.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-apache-oro-%{version}.jar
cp -p build/lib/%{ant_name}-apache-regexp.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-apache-regexp-%{version}.jar
cp -p build/lib/%{ant_name}-javamail.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-javamail-%{version}.jar
cp -p build/lib/%{ant_name}-jdepend.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-jdepend-%{version}.jar
cp -p build/lib/%{ant_name}-jmf.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-jmf-%{version}.jar
cp -p build/lib/%{ant_name}-commons-logging.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-commons-logging-%{version}.jar
#cp -p build/lib/% {ant_name}-commons-net.jar $RPM_BUILD_ROOT% {_javadir}/% {ant_name}/% {ant_name}-commons-net-% {version}.jar
cp -p build/lib/%{ant_name}-junit.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-junit-%{version}.jar
#cp -p build/lib/% {ant_name}-jsch.jar $RPM_BUILD_ROOT% {_javadir}/% {ant_name}/% {ant_name}-jsch-% {version}.jar
#% ifarch % ix86
#cp -p build/lib/% {ant_name}-jai.jar $RPM_BUILD_ROOT% {_javadir}/% {ant_name}/% {ant_name}-jai-% {version}.jar
#% endif
cp -p build/lib/%{ant_name}-nodeps.jar $RPM_BUILD_ROOT%{_javadir}/%{ant_name}/%{ant_name}-nodeps-%{version}.jar
cp -p build/lib/%{ant_name}-swing.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-swing-%{version}.jar
cp -p build/lib/%{ant_name}-trax.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{ant_name}-trax-%{version}.jar
# jar aliases
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in `ls *-%{version}.jar`; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
(cd $RPM_BUILD_ROOT%{_javadir}/ant && for jar in `ls *-%{version}.jar`; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# XSLs
mkdir -p $RPM_BUILD_ROOT%{ant_home}/etc
cp -p src/etc/*.xsl $RPM_BUILD_ROOT%{ant_home}/etc/
rm $RPM_BUILD_ROOT%{ant_home}/etc/ant-update.xsl
rm $RPM_BUILD_ROOT%{ant_home}/etc/changelog.xsl
rm $RPM_BUILD_ROOT%{ant_home}/etc/log.xsl
rm $RPM_BUILD_ROOT%{ant_home}/etc/tagdiff.xsl
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d
# OPT_JAR_LIST fragments
echo "antlr ant/ant-antlr" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/antlr
echo "bsf ant/ant-apache-bsf" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/apache-bsf
echo "xml-commons-resolver ant/ant-apache-resolver" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/apache-resolver
echo "jakarta-commons-logging ant/ant-commons-logging" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/commons-logging
#echo "jakarta-commons-net ant/ant-commons-net" > $RPM_BUILD_ROOT% {_sysconfdir}/% {ant_name}.d/commons-net
#% ifarch % ix86
#echo "jai ant/ant-jai" > $RPM_BUILD_ROOT% {_sysconfdir}/% {ant_name}.d/jai
#% endif
echo "bcel ant/ant-apache-bcel" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/apache-bcel
echo "log4j ant/ant-apache-log4j" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/apache-log4j
echo "oro ant/ant-apache-oro" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/apache-oro
echo "regexp ant/ant-apache-regexp" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/apache-regexp
echo "javamail jaf ant/ant-javamail" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/javamail
echo "jdepend ant/ant-jdepend" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/jdepend
echo "ant/ant-jmf" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/jmf
#echo "jsch ant/ant-jsch" > $RPM_BUILD_ROOT% {_sysconfdir}/% {ant_name}.d/jsch
echo "junit ant/ant-junit" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/junit
echo "ant/ant-nodeps" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/nodeps
echo "ant/ant-swing" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/swing
echo "jaxp_transform_impl ant/ant-trax" > $RPM_BUILD_ROOT%{_sysconfdir}/%{ant_name}.d/trax
%files
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-antlr.jar
%{_javadir}/%{ant_name}/%{ant_name}-antlr-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/antlr
%files -n ant-apache-bsf
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-apache-bsf.jar
%{_javadir}/%{ant_name}/%{ant_name}-apache-bsf-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/apache-bsf
%files -n ant-apache-resolver
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-apache-resolver.jar
%{_javadir}/%{ant_name}/%{ant_name}-apache-resolver-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/apache-resolver
%files -n ant-commons-logging
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-commons-logging.jar
%{_javadir}/%{ant_name}/%{ant_name}-commons-logging-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/commons-logging
#% files -n ant-commons-net
#% defattr(0644,root,root,0755)
#% {_javadir}/% {ant_name}/% {ant_name}-commons-net.jar
#% {_javadir}/% {ant_name}/% {ant_name}-commons-net-% {version}.jar
#% {_sysconfdir}/% {ant_name}.d/commons-net
#% ifarch % ix86
#
#% files -n ant-jai
#% defattr(0644,root,root,0755)
#% {_javadir}/% {ant_name}/% {ant_name}-jai.jar
#% {_javadir}/% {ant_name}/% {ant_name}-jai-% {version}.jar
#% config % {_sysconfdir}/% {ant_name}.d/jai
#% endif
%files -n ant-apache-bcel
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-apache-bcel.jar
%{_javadir}/%{ant_name}/%{ant_name}-apache-bcel-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/apache-bcel
%files -n ant-apache-log4j
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-apache-log4j.jar
%{_javadir}/%{ant_name}/%{ant_name}-apache-log4j-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/apache-log4j
%files -n ant-apache-oro
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-apache-oro.jar
%{_javadir}/%{ant_name}/%{ant_name}-apache-oro-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/apache-oro
%dir %{ant_home}/etc/
%{ant_home}/etc/maudit-frames.xsl
%files -n ant-apache-regexp
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-apache-regexp.jar
%{_javadir}/%{ant_name}/%{ant_name}-apache-regexp-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/apache-regexp
%files -n ant-javamail
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-javamail.jar
%{_javadir}/%{ant_name}/%{ant_name}-javamail-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/javamail
%files -n ant-jdepend
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-jdepend.jar
%{_javadir}/%{ant_name}/%{ant_name}-jdepend-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/jdepend
%dir %{ant_home}/etc/
%{ant_home}/etc/jdepend.xsl
%{ant_home}/etc/jdepend-frames.xsl
%files -n ant-jmf
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-jmf.jar
%{_javadir}/%{ant_name}/%{ant_name}-jmf-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/jmf
#% files -n ant-jsch
#% defattr(0644,root,root,0755)
#% {_javadir}/% {ant_name}/% {ant_name}-jsch.jar
#% {_javadir}/% {ant_name}/% {ant_name}-jsch-% {version}.jar
#% {_sysconfdir}/% {ant_name}.d/jsch
%files -n ant-junit
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-junit.jar
%{_javadir}/%{ant_name}/%{ant_name}-junit-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/junit
%dir %{ant_home}/etc/
%{ant_home}/etc/junit-frames.xsl
%{ant_home}/etc/junit-noframes.xsl
%{ant_home}/etc/junit-frames-xalan1.xsl
%files -n ant-nodeps
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-nodeps.jar
%{_javadir}/%{ant_name}/%{ant_name}-nodeps-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/nodeps
%files -n ant-swing
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-swing.jar
%{_javadir}/%{ant_name}/%{ant_name}-swing-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/swing
%files -n ant-trax
%defattr(0644,root,root,0755)
%{_javadir}/%{ant_name}/%{ant_name}-trax.jar
%{_javadir}/%{ant_name}/%{ant_name}-trax-%{version}.jar
%config %{_sysconfdir}/%{ant_name}.d/trax
%dir %{ant_home}/etc/
%{ant_home}/etc/mmetrics-frames.xsl
%{ant_home}/etc/coverage-frames.xsl
%changelog
* Tue May 08 2007 - dbornkessel@suse.de
- removed all jai stuff as jai was dropped
* Fri Sep 22 2006 - dbornkessel@suse.de
- added source=1.4
* Mon May 08 2006 - dbornkessel@suse.de
- changed last change (see line below): Requires are only bound to the version, not to the release anymore
--> lrupp: fix Requires for ant (#171473 describes the same for dbus-1)
* Thu Feb 02 2006 - dbornkessel@suse.de
* Thu Feb 02 2006 - dbornkessel@suse.de
- fixed rpmlint errors and warnings
- fixed rpmlint errors and warnings
* Thu Feb 02 2006 - dbornkessel@suse.de
- fixed rpmlint errors and warnings
* Tue Jan 31 2006 - dbornkessel@suse.de
- only ant-antlr updates
- only ant-antlr updates
* Tue Jan 31 2006 - dbornkessel@suse.de
- removed noarch due to different dependencies
- removed jsch and commons-net because we don't have the necessary packages
- ifarch'ed jai as it has a binary only dependency on a i386-only package
* Fri Jan 27 2006 - dbornkessel@suse.de
- added four missing xsl files
- removed JAVA_HOME magic
- added four missing xsl files
- removed JAVA_HOME magic
- added BuildRoot
- removed JAVA_HOME magic
* Wed Jan 25 2006 - dbornkessel@suse.de
- build optional task in an extra spec file due to circular dependencies
* Tue Jan 24 2006 - dbornkessel@suse.de
- Not dependend on xml-commons-apis, which are provided by xerces-j2, which does not
depend on ant package (in contrast to old dependency on
xml-commons-apis <-> ant)
- optional task are now again in extra spec file ant-antlr
- Not dependend on xml-commons-apis, which are provided by xerces-j2, which does not
depend on ant package (in contrast to old dependency on
xml-commons-apis <-> ant)
- optional task are now again in extra spec file ant-antlr
* Thu Jan 19 2006 - dbornkessel@suse.de
- Integrated ant and ant-antlr again in one spec file as there is no
dependency loop ... jpackage BuildRequires were wrong.
- updated to version 1.6.5
- Integrated ant and ant-antlr again in one spec file as there is no
dependency loop ... jpackage BuildRequires were wrong.
- updated to version 1.6.5
* Mon Dec 19 2005 - dbornkessel@suse.de
- added if statement that hinders unwanted creation of a file within a for loop
- added if statement that hinders unwanted creation of a file within a for loop
* Thu Sep 29 2005 - dmueller@suse.de
- add norootforbuild
- add norootforbuild
* Fri Mar 04 2005 - skh@suse.de
- rely on jpackage-utils' java-functions to set JAVA_HOME correctly
- rely on jpackage-utils' java-functions to set JAVA_HOME correctly
* Sun Sep 05 2004 - skh@suse.de
- create and add /usr/share/java/ant to file list for optional
tasks to put their jars into
- create and add /usr/share/java/ant to file list for optional
tasks to put their jars into
* Thu Sep 02 2004 - skh@suse.de
- renamed from apache-ant to ant
- switched to JPackage 1.5 version
- updated to version 1.6.2
- split off optional tasks into separate package to solve build
dependency loop in JPackage
- renamed from apache-ant to ant
- switched to JPackage 1.5 version
- updated to version 1.6.2
- split off optional tasks into separate package to solve build
dependency loop in JPackage