This commit is contained in:
parent
9ada25819a
commit
024f5ece3f
44
jython-dont-validate-pom.patch
Normal file
44
jython-dont-validate-pom.patch
Normal file
@ -0,0 +1,44 @@
|
||||
--- jython-svn-Release_2_2_1/maven/build.xml 2007-03-26 22:02:00.000000000 +0200
|
||||
+++ jython-svn-Release_2_2_1/maven/build.xml 2018-11-23 10:04:54.897037648 +0100
|
||||
@@ -85,8 +85,6 @@
|
||||
|
||||
<move file="${stage}/${install.name}.jar"
|
||||
tofile="${install.dir}/${install.name}.jar"/>
|
||||
- <move file="${stage}/${install.name}-sources.jar"
|
||||
- tofile="${install.dir}/${install.name}-sources.jar"/>
|
||||
|
||||
<checksum algorithm="SHA1" fileext=".sha1">
|
||||
<fileset dir="${install.dir}" excludes="*.sha1,*.md5,*.tmp"/>
|
||||
@@ -114,7 +112,7 @@
|
||||
<!--
|
||||
Performs Maven build staging
|
||||
-->
|
||||
- <target name="stage" depends="validate-pom">
|
||||
+ <target name="stage">
|
||||
<property name="stage" value="${build}/"/>
|
||||
<mkdir dir="${stage}"/>
|
||||
|
||||
@@ -135,23 +133,6 @@
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
- <!--
|
||||
- Performs POM Schema validation.
|
||||
- -->
|
||||
- <target name="validate-pom">
|
||||
- <xmlvalidate failonerror="true" file="maven/pom.xml">
|
||||
- <attribute name="http://xml.org/sax/features/validation"
|
||||
- value="true"/>
|
||||
- <attribute name="http://apache.org/xml/features/validation/schema"
|
||||
- value="true"/>
|
||||
- <attribute name="http://xml.org/sax/features/namespaces"
|
||||
- value="true"/>
|
||||
- <property
|
||||
- name="http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation"
|
||||
- value="maven/maven-v4_0_0.xsd"/>
|
||||
- </xmlvalidate>
|
||||
- </target>
|
||||
-
|
||||
<target name="build-jython" depends="clean">
|
||||
<ant antfile="build.xml" target="developer-build"/>
|
||||
</target>
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 23 09:23:44 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Distribute the maven pom file and generate the mvn(...) provides
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 18 12:27:08 UTC 2017 - fstrba@suse.com
|
||||
|
||||
|
106
jython.spec
106
jython.spec
@ -12,24 +12,22 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
|
||||
|
||||
%global pyver %(python -c 'import sys;print(sys.version[0:3])')
|
||||
%global cpython_version %{pyver}
|
||||
%global pyxml_version 0.8.3
|
||||
%global svn_tag Release_2_2_1
|
||||
%global _python_bytecompile_errors_terminate_build 0
|
||||
|
||||
Name: jython
|
||||
Version: 2.2.1
|
||||
Release: 0
|
||||
Summary: A Java implementation of the Python language
|
||||
License: Python-2.0 AND Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
Url: http://www.jython.org/
|
||||
URL: http://www.jython.org/
|
||||
# Use the included fetch-jython.sh script to generate the source drop
|
||||
# for jython 2.2.1
|
||||
# sh fetch-jython.sh \
|
||||
@ -49,24 +47,26 @@ Patch5: %{name}-cached-classes.patch
|
||||
Patch6: %{name}-sourcetarget.patch
|
||||
Patch7: %{name}-module.patch
|
||||
Patch8: %{name}-compareto.patch
|
||||
Requires: jakarta-oro
|
||||
Requires: javapackages-tools
|
||||
Requires: jline
|
||||
Requires: libreadline-java >= 0.8.0
|
||||
Requires: python >= %{cpython_version}
|
||||
Requires: servletapi5
|
||||
Recommends: mysql-connector-java
|
||||
Requires: java >= 1.8
|
||||
Patch9: %{name}-dont-validate-pom.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: jakarta-oro
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: jline
|
||||
BuildRequires: libreadline-java >= 0.8.0
|
||||
BuildRequires: mysql-connector-java
|
||||
BuildRequires: python >= %{cpython_version}
|
||||
BuildRequires: pyxml >= %{pyxml_version}
|
||||
BuildRequires: servletapi5
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: jakarta-oro
|
||||
Requires: java >= 1.8
|
||||
Requires: javapackages-local
|
||||
Requires: jline
|
||||
Requires: libreadline-java >= 0.8.0
|
||||
Requires: python >= %{cpython_version}
|
||||
Requires: servletapi5
|
||||
Recommends: mysql-connector-java
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
@ -113,8 +113,6 @@ programmer productivity. The seamless interaction between Python and
|
||||
Java allows developers to freely mix the two languages both during
|
||||
development and in shipping products.
|
||||
|
||||
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for jython
|
||||
Group: Development/Libraries/Java
|
||||
@ -140,8 +138,6 @@ programmer productivity. The seamless interaction between Python and
|
||||
Java allows developers to freely mix the two languages both during
|
||||
development and in shipping products.
|
||||
|
||||
|
||||
|
||||
%package demo
|
||||
Summary: Demonstration and samples for jython
|
||||
Group: Development/Libraries/Java
|
||||
@ -168,8 +164,6 @@ programmer productivity. The seamless interaction between Python and
|
||||
Java allows developers to freely mix the two languages both during
|
||||
development and in shipping products.
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-svn-%{svn_tag}
|
||||
%patch0 -p1
|
||||
@ -180,6 +174,7 @@ development and in shipping products.
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
|
||||
%build
|
||||
export CLASSPATH=$(build-classpath mysql-connector-java oro servlet jline)
|
||||
@ -194,7 +189,7 @@ ant \
|
||||
-Dht2html.dir=%{_datadir}/ht2html \
|
||||
-Dpython.lib=./CPythonLib \
|
||||
-Dpython.exe=%{_bindir}/python \
|
||||
-DPyXmlHome=%{_libdir}/python%pyver \
|
||||
-DPyXmlHome=%{_libdir}/python%{pyver} \
|
||||
-Dtargetver=1.3 \
|
||||
copy-dist
|
||||
|
||||
@ -206,38 +201,53 @@ pushd dist
|
||||
done
|
||||
popd
|
||||
|
||||
pushd maven
|
||||
# generate maven pom
|
||||
ant -Dproject.version=%{version} install
|
||||
popd
|
||||
|
||||
%install
|
||||
# jar
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
||||
install -d -m 755 %{buildroot}%{_javadir}
|
||||
install -m 644 dist/%{name}.jar \
|
||||
$RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
||||
%{buildroot}%{_javadir}/%{name}.jar
|
||||
# pom
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
install -m 644 build/maven/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a org.python:jython-standalone
|
||||
|
||||
# javadoc
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
cp -pr dist/Doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr dist/Doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
||||
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
||||
|
||||
# data
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
||||
# these are not supposed to be distributed
|
||||
find dist/Lib -type d -name test | xargs rm -rf
|
||||
|
||||
cp -pr dist/Lib $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
cp -pr dist/Tools $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
cp -pr dist/Lib %{buildroot}%{_datadir}/%{name}
|
||||
cp -pr dist/Tools %{buildroot}%{_datadir}/%{name}
|
||||
# demo
|
||||
cp -pr dist/Demo $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
cp -pr dist/Demo %{buildroot}%{_datadir}/%{name}
|
||||
fdupes -s %{buildroot}%{_datadir}/%{name}/Demo
|
||||
fdupes -s %{buildroot}%{_datadir}/%{name}/{Lib,Tools}
|
||||
# manual
|
||||
rm -rf dist/Doc/javadoc
|
||||
mv dist/Doc %{name}-manual-%{version}
|
||||
%fdupes -s %{name}-manual-%{version}
|
||||
|
||||
# registry
|
||||
install -m 644 registry $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
install -m 644 registry %{buildroot}%{_datadir}/%{name}
|
||||
# scripts
|
||||
install -d $RPM_BUILD_ROOT%{_bindir}
|
||||
install -d %{buildroot}%{_bindir}
|
||||
|
||||
cat > $RPM_BUILD_ROOT%{_bindir}/%{name} << EOF
|
||||
cat > %{buildroot}%{_bindir}/%{name} << EOF
|
||||
#!/bin/sh
|
||||
#
|
||||
# %{name} script
|
||||
# JPackage Project (http://jpackage.sourceforge.net)
|
||||
#
|
||||
#
|
||||
# Source functions library
|
||||
. %{_datadir}/java-utils/java-functions
|
||||
|
||||
@ -254,9 +264,9 @@ fi
|
||||
# Arch-specific location of dependency
|
||||
case \$(uname -m) in
|
||||
x86_64 | ia64 | s390x | ppc64 | sparc64 )
|
||||
JYTHONLIBDIR="/usr/lib64" ;;
|
||||
JYTHONLIBDIR="%{_libdir}" ;;
|
||||
* )
|
||||
JYTHONLIBDIR="/usr/lib" ;;
|
||||
JYTHONLIBDIR="%{_prefix}/lib" ;;
|
||||
esac
|
||||
|
||||
# Configuration
|
||||
@ -279,7 +289,7 @@ set_options \$BASE_OPTIONS
|
||||
run "\$@"
|
||||
EOF
|
||||
|
||||
cat > $RPM_BUILD_ROOT%{_bindir}/%{name}c << EOF
|
||||
cat > %{buildroot}%{_bindir}/%{name}c << EOF
|
||||
#!/bin/sh
|
||||
#
|
||||
# %{name}c script
|
||||
@ -288,33 +298,35 @@ cat > $RPM_BUILD_ROOT%{_bindir}/%{name}c << EOF
|
||||
%{_bindir}/%{name} %{_datadir}/%{name}/Tools/%{name}c/%{name}c.py "\$@"
|
||||
EOF
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc ACKNOWLEDGMENTS NEWS LICENSE.txt README.txt
|
||||
%license LICENSE.txt
|
||||
%doc ACKNOWLEDGMENTS NEWS README.txt
|
||||
%attr(0755,root,root) %{_bindir}/%{name}
|
||||
%attr(0755,root,root) %{_bindir}/%{name}c
|
||||
%{_javadir}/*
|
||||
%{_mavenpomdir}/*
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/%{name}/Lib
|
||||
%{_datadir}/%{name}/Tools
|
||||
%{_datadir}/%{name}/registry
|
||||
%if %{defined _maven_repository}
|
||||
%{_mavendepmapfragdir}/%{name}
|
||||
%else
|
||||
%{_datadir}/maven-metadata/%{name}.xml*
|
||||
%endif
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root)
|
||||
%doc LICENSE.txt
|
||||
%license LICENSE.txt
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%files manual
|
||||
%defattr(-,root,root)
|
||||
%doc LICENSE.txt README.txt
|
||||
%license LICENSE.txt
|
||||
%doc README.txt
|
||||
%doc %{name}-manual-%{version}
|
||||
|
||||
%files demo
|
||||
%defattr(-,root,root)
|
||||
%doc ACKNOWLEDGMENTS NEWS LICENSE.txt README.txt
|
||||
%license LICENSE.txt
|
||||
%doc ACKNOWLEDGMENTS NEWS README.txt
|
||||
%{_datadir}/%{name}/Demo
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user