Fridrich Strba 2019-02-07 16:18:29 +00:00 committed by Git OBS Bridge
parent 7236c81db8
commit 5816b31cd4

View File

@ -1,7 +1,7 @@
# #
# spec file for package velocity # spec file for package velocity
# #
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -22,13 +22,14 @@ Release: 0
Summary: Java-based template engine Summary: Java-based template engine
License: Apache-2.0 License: Apache-2.0
Group: Development/Libraries/Java Group: Development/Libraries/Java
Url: http://velocity.apache.org/ URL: http://velocity.apache.org/
Source0: http://www.apache.org/dist/velocity/engine/1.7/%{name}-%{version}.tar.gz Source0: http://www.apache.org/dist/velocity/engine/%{version}/%{name}-%{version}.tar.gz
Source1: %{name}-%{version}.pom Source1: %{name}-%{version}.pom
Patch0: velocity-build_xml.patch Patch0: velocity-build_xml.patch
BuildRequires: ant >= 1.6.5 BuildRequires: ant >= 1.6.5
BuildRequires: ant-junit BuildRequires: ant-junit
BuildRequires: antlr BuildRequires: antlr
BuildRequires: apache-parent
BuildRequires: avalon-logkit BuildRequires: avalon-logkit
BuildRequires: classworlds BuildRequires: classworlds
BuildRequires: commons-collections BuildRequires: commons-collections
@ -37,13 +38,13 @@ BuildRequires: commons-logging
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: hsqldb BuildRequires: hsqldb
BuildRequires: javapackages-local BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: jdom >= 1.0-1 BuildRequires: jdom >= 1.0-1
BuildRequires: junit BuildRequires: junit
BuildRequires: log4j >= 1.1 BuildRequires: log4j >= 1.1
BuildRequires: oro BuildRequires: oro
BuildRequires: servletapi4 BuildRequires: servletapi4
BuildRequires: werken-xpath BuildRequires: werken-xpath
Requires: apache-parent
Requires: avalon-logkit Requires: avalon-logkit
Requires: commons-collections Requires: commons-collections
Requires: commons-lang Requires: commons-lang
@ -162,7 +163,6 @@ for j in $(find . -name "*.jar" | grep -v /test/); do
mv $j $j.no mv $j $j.no
done done
%patch0 -b .sav0 %patch0 -b .sav0
#%patch99 -b .sav99
%build %build
#export JAVA_HOME=%{_jvmdir}/java-1.5.0 #export JAVA_HOME=%{_jvmdir}/java-1.5.0
@ -183,6 +183,7 @@ ln -sf $(build-classpath commons-logging)
ln -sf $(build-classpath jdom) ln -sf $(build-classpath jdom)
ln -sf $(build-classpath log4j) ln -sf $(build-classpath log4j)
ln -sf $(build-classpath oro) ln -sf $(build-classpath oro)
# Use servletapi4 instead of servletapi5 in CLASSPATH
ln -sf $(build-classpath servletapi4) ln -sf $(build-classpath servletapi4)
ln -sf $(build-classpath werken-xpath) ln -sf $(build-classpath werken-xpath)
ln -sf $(build-classpath classworlds) ln -sf $(build-classpath classworlds)
@ -195,7 +196,7 @@ export OPT_JAR_LIST="ant/ant-junit junit"
ant \ ant \
-Djavac.source=1.6 -Djavac.target=1.6 \ -Djavac.source=1.6 -Djavac.target=1.6 \
-buildfile build/build.xml \ -buildfile build/build.xml \
jar javadocs #test jar javadocs
%install %install
# jars # jars
@ -210,17 +211,20 @@ install -pm 644 %{SOURCE1} \
# javadoc # javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name} install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr docs/api/* %{buildroot}%{_javadocdir}/%{name} cp -pr docs/api/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}
rm -rf docs/api rm -rf docs/api
# zero-length file
rm -r test/issues/velocity-537/compare/velocity537.vm.cmp
# data # data
install -d -m 755 %{buildroot}%{_datadir}/%{name} install -d -m 755 %{buildroot}%{_datadir}/%{name}
cp -pr examples test %{buildroot}%{_datadir}/%{name} cp -pr examples test %{buildroot}%{_datadir}/%{name}
%fdupes -s %{buildroot} %fdupes -s %{buildroot}%{_datadir}/%{name}
%files %files -f .mfiles
%doc LICENSE NOTICE README.txt %license LICENSE NOTICE
%{_javadir}/*.jar %doc README.txt
%{_mavenpomdir}/*
%{_datadir}/maven-metadata/%{name}.xml
%files manual %files manual
%doc docs/* %doc docs/*