Fridrich Strba 2019-02-14 16:36:32 +00:00 committed by Git OBS Bridge
parent f5f1650063
commit e2641aa23b

View File

@ -34,11 +34,7 @@
Version: 2.10.6 Version: 2.10.6
Release: 0 Release: 0
Summary: A hybrid functional/object-oriented language for the JVM Summary: A hybrid functional/object-oriented language for the JVM
# License was confirmed to be standard BSD by fedora-legal License: BSD-3-Clause AND CC0-1.0 AND SUSE-Public-Domain
# https://www.redhat.com/archives/fedora-legal-list/2007-December/msg00012.html
# files in forkjoin module are under CC0
# files in threadpool module are under Public Domain
License: BSD AND CC0 AND SUSE-Public-Domain
Group: Development/Libraries/Java Group: Development/Libraries/Java
URL: http://www.scala-lang.org/ URL: http://www.scala-lang.org/
# ./generate-tarball.sh # ./generate-tarball.sh
@ -114,6 +110,7 @@ fully interoperable with Java.
%package apidoc %package apidoc
Summary: Documentation for the Scala programming language Summary: Documentation for the Scala programming language
Group: Documentation/HTML
%description apidoc %description apidoc
Scala is a general purpose programming language for the JVM that blends Scala is a general purpose programming language for the JVM that blends
@ -122,15 +119,19 @@ reference and API documentation for the Scala programming language.
%package swing %package swing
Summary: The swing library for the scala programming languages Summary: The swing library for the scala programming languages
Group: Development/Libraries/Java
Requires: java >= 1.7 Requires: java >= 1.7
Requires: scala = %{version}-%{release} Requires: scala = %{version}-%{release}
%description swing %description swing
This package contains the swing library for the scala programming languages. This library is required to develope GUI-releate applications in scala. The release provided by this package This package contains the swing library for the scala programming languages.
is not the original version from upstream because this version is not compatible with JDK-1.7. This library is required to develop GUI-related applications in scala.
The release provided by this package is not the original version from upstream
because this version is not compatible with JDK-1.7.
%package -n ant-%{name} %package -n ant-%{name}
Summary: Development files for Scala Summary: Development files for Scala
Group: Development/Libraries/Java
Requires: ant Requires: ant
Requires: scala = %{version}-%{release} Requires: scala = %{version}-%{release}
@ -139,29 +140,6 @@ Scala is a general purpose programming language for the JVM that blends
object-oriented and functional programming. This package enables support for object-oriented and functional programming. This package enables support for
the scala ant tasks. the scala ant tasks.
%if 0
%package examples
Summary: Examples for the Scala programming language
Requires: ant
Requires: scala = %{version}-%{release}
# Otherwise it will pick up some perl module
Autoprov: 0
%description examples
Scala is a general purpose programming language for the JVM that blends
object-oriented and functional programming. This package contains examples for
the Scala programming language
%package swing-examples
Summary: Examples for the Scala Swing library
Requires: ant
Requires: scala = %{version}-%{release}
%description swing-examples
This package contains examples for the Swing library of the Scala language which is required
to create GUI applications in the Scala programming language.
%endif
%prep %prep
%global _default_patch_fuzz 2 %global _default_patch_fuzz 2
@ -214,7 +192,6 @@ popd
cp -rf %{SOURCE31} . cp -rf %{SOURCE31} .
sed -i -e 's!@JLINE@!%{jline2_jar}!g' build.xml sed -i -e 's!@JLINE@!%{jline2_jar}!g' build.xml
echo echo $(head -n 1 %{SOURCE3}) > tools/get-scala-commit-sha echo echo $(head -n 1 %{SOURCE3}) > tools/get-scala-commit-sha
@ -260,14 +237,9 @@ for prog in scaladoc fsc scala scalac scalap; do
install -p -m 755 build/pack/bin/$prog %{buildroot}%{_bindir} install -p -m 755 build/pack/bin/$prog %{buildroot}%{_bindir}
done done
install -p -m 755 -d %{buildroot}%{scaladir}/lib install -dm 0755 %{buildroot}%{scaladir}/lib
install -dm 0755 %{buildroot}%{_javadir}/%{base_name}
# Add symlinks in lib directory install -dm 0755 %{buildroot}%{_mavenpomdir}
%{mvn_file} ':{*}:jar:' %{base_name}/@1 %{scaladir}/lib/@1
# Add compat symlinks to POMs because climbing-nemesis uses the old JPP naming convention
%{mvn_file} ':{*}:pom:' %{base_name}/@1 JPP.%{base_name}-@1
%{mvn_package} :scala-swing swing
# XXX: add scala-partest when it works again # XXX: add scala-partest when it works again
for libname in scala-compiler \ for libname in scala-compiler \
@ -278,20 +250,22 @@ for libname in scala-compiler \
sed -i "s|@VERSION@|%{fullversion}|" src/build/maven/$libname-pom.xml sed -i "s|@VERSION@|%{fullversion}|" src/build/maven/$libname-pom.xml
sed -i "s|@RELEASE_REPOSITORY@|%{release_repository}|" src/build/maven/$libname-pom.xml sed -i "s|@RELEASE_REPOSITORY@|%{release_repository}|" src/build/maven/$libname-pom.xml
sed -i "s|@SNAPSHOT_REPOSITORY@|%{snapshot_repository}|" src/build/maven/$libname-pom.xml sed -i "s|@SNAPSHOT_REPOSITORY@|%{snapshot_repository}|" src/build/maven/$libname-pom.xml
%{mvn_artifact} src/build/maven/$libname-pom.xml build/pack/lib/$libname.jar install -pm 0644 build/pack/lib/$libname.jar %{buildroot}%{_javadir}/%{base_name}/$libname.jar
ln -sf $(abs2rel %{_javadir}/%{base_name}/$libname.jar %{scaladir}/lib) %{buildroot}%{scaladir}/lib
# climbing-nemesis uses the old JPP naming convention
install -pm 0644 src/build/maven/$libname-pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{base_name}-$libname.pom
if [ $libname == scala-swing ]; then
%add_maven_depmap JPP.%{base_name}-$libname.pom %{base_name}/$libname.jar -f swing
else
%add_maven_depmap JPP.%{base_name}-$libname.pom %{base_name}/$libname.jar
fi
done done
ln -s $(abs2rel %{jline2_jar} %{scaladir}/lib) %{buildroot}%{scaladir}/lib ln -s $(abs2rel %{jline2_jar} %{scaladir}/lib) %{buildroot}%{scaladir}/lib
ln -s $(abs2rel %{jansi_jar} %{scaladir}/lib) %{buildroot}%{scaladir}/lib ln -s $(abs2rel %{jansi_jar} %{scaladir}/lib) %{buildroot}%{scaladir}/lib
%mvn_install
install -d %{buildroot}%{_sysconfdir}/ant.d install -d %{buildroot}%{_sysconfdir}/ant.d
install -p -m 644 %{SOURCE24} %{buildroot}%{_sysconfdir}/ant.d/scala install -p -m 644 %{SOURCE24} %{buildroot}%{_sysconfdir}/ant.d/scala
%if 0
cp -pr docs/examples %{buildroot}%{_datadir}/scala/
%endif
install -d %{buildroot}%{_datadir}/mime-info install -d %{buildroot}%{_datadir}/mime-info
install -p -m 644 %{SOURCE21} %{SOURCE22} %{buildroot}%{_datadir}/mime-info/ install -p -m 644 %{SOURCE21} %{SOURCE22} %{buildroot}%{_datadir}/mime-info/
@ -318,7 +292,8 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%{_bindir}/* %{_bindir}/*
%dir %{_datadir}/%{base_name} %dir %{_datadir}/%{base_name}
%dir %{_datadir}/%{base_name}/lib %dir %{_datadir}/%{base_name}/lib
%{_datadir}/%{base_name}/lib/j*.jar %{_datadir}/%{base_name}/lib/*.jar
%exclude %{_datadir}/%{base_name}/lib/scala-swing.jar
%{_datadir}/mime-info %{_datadir}/mime-info
%{_datadir}/mime/packages/* %{_datadir}/mime/packages/*
%{_mandir}/man1/* %{_mandir}/man1/*
@ -326,6 +301,7 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%files swing -f .mfiles-swing %files swing -f .mfiles-swing
%license docs/LICENSE %license docs/LICENSE
%{_datadir}/%{base_name}/lib/scala-swing.jar
%files -n ant-%{name} %files -n ant-%{name}
# Following is plain config because the ant task classpath could change from # Following is plain config because the ant task classpath could change from
@ -337,15 +313,4 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%doc build/scaladoc/library/* %doc build/scaladoc/library/*
%license docs/LICENSE %license docs/LICENSE
%if 0
%files examples
%{_datadir}/scala/examples
%exclude %{_datadir}/scala/examples/swing
%license docs/LICENSE
%files swing-examples
%{_datadir}/scala/examples/swing
%license docs/LICENSE
%endif
%changelog %changelog