- Update to 2.2.1 - this obsolete the pyxml patch
- merge with jython-2.2.1-6.fc16.src.rpm OBS-URL: https://build.opensuse.org/package/show/Java:packages/jython?expand=0&rev=5
This commit is contained in:
parent
baf67bed8f
commit
870d8d879d
35
fetch-jython.sh
Normal file
35
fetch-jython.sh
Normal file
@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Generate a source drop for jython from SVN
|
||||
|
||||
# Usage message
|
||||
usage="usage: $0 <project_name> <svn_root> <svn_tag>"
|
||||
|
||||
project_name=$1
|
||||
svn_root=$2
|
||||
svn_tag=$3
|
||||
|
||||
# Ensure we got all of the variables
|
||||
if [ "x$project_name"x = "xx" ]
|
||||
then
|
||||
echo >&2 "$usage"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "x$svn_root"x = "xx" ]
|
||||
then
|
||||
echo >&2 "$usage"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "x$svn_tag"x = "xx" ]
|
||||
then
|
||||
echo >&2 "$usage"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p temp && cd temp
|
||||
|
||||
svn export --username guest --password "" $svn_root/$project_name/tags/$svn_tag
|
||||
mv $svn_tag/$project_name $project_name-svn-$svn_tag
|
||||
tar jcf $project_name-fetched-src-$svn_tag.tar.bz2 $project_name-svn-$svn_tag
|
@ -1,11 +1,12 @@
|
||||
--- jython-20030113/org/python/core/PySystemState.java~ 2003-01-14 16:44:44.000000000 -0500
|
||||
+++ jython-20030113/org/python/core/PySystemState.java 2003-01-14 16:47:55.000000000 -0500
|
||||
@@ -459,7 +459,13 @@
|
||||
diff -ur jython-svn-Release_2_2beta1/src/org/python/core/PySystemState.java jython-svn-Release_2_2beta1.patched/src/org/python/core/PySystemState.java
|
||||
--- jython-svn-Release_2_2beta1/src/org/python/core/PySystemState.java 2007-02-07 02:19:53.000000000 -0500
|
||||
+++ jython-svn-Release_2_2beta1/src/org/python/core/PySystemState.java 2007-03-23 09:41:27.000000000 -0400
|
||||
@@ -534,7 +534,13 @@
|
||||
}
|
||||
cachedir = new File(props.getProperty("python.cachedir", "cachedir"));
|
||||
cachedir = new File(props.getProperty(PYTHON_CACHEDIR, CACHEDIR_DEFAULT_NAME));
|
||||
if (!cachedir.isAbsolute()) {
|
||||
- cachedir = new File(PySystemState.prefix, cachedir.getPath());
|
||||
+ File jythondir = new File(System.getProperty("user.home"), ".jython");
|
||||
+ File jythondir = new File(System.getProperty("user.home"), ".jython-cache");
|
||||
+
|
||||
+ if (!jythondir.isDirectory()) {
|
||||
+ jythondir.mkdirs();
|
||||
@ -15,16 +16,3 @@
|
||||
}
|
||||
}
|
||||
|
||||
--- jython/org/python/core/PySystemState.java~ 2004-02-16 17:27:22.000000000 -0500
|
||||
+++ jython/org/python/core/PySystemState.java 2004-02-16 17:29:05.000000000 -0500
|
||||
@@ -311,8 +311,8 @@
|
||||
}
|
||||
try {
|
||||
addRegistryFile(new File(prefix, "registry"));
|
||||
- File homeFile = new File(registry.getProperty("user.home"),
|
||||
- ".jython");
|
||||
+ File homeFile = new File(new File(registry.getProperty("user.home"),
|
||||
+ ".jython"), "registry");
|
||||
addRegistryFile(homeFile);
|
||||
} catch (Exception exc) {
|
||||
;
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:31098a53f8349cafccdbe20420e35ac5da1f6b92e936c92f8a0c643179fdfa08
|
||||
size 727159
|
3
jython-fetched-src-Release_2_2_1.tar.bz2
Normal file
3
jython-fetched-src-Release_2_2_1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:169a2b022faf7362a54591f06585a8f03e88a31df6063d39039f62facbb0854b
|
||||
size 2546326
|
@ -1,13 +0,0 @@
|
||||
Index: jython/build.xml
|
||||
===================================================================
|
||||
--- jython.orig/build.xml 2003-07-31 08:10:33.000000000 +0200
|
||||
+++ jython/build.xml 2011-02-22 11:59:08.815316571 +0100
|
||||
@@ -272,7 +272,7 @@
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
- <target name="copy-dist" depends="dist-prepare,jar,copy-xml">
|
||||
+ <target name="copy-dist" depends="dist-prepare,jar">
|
||||
<!-- Misc files -->
|
||||
<copy todir="${distDir}">
|
||||
<fileset dir="${sourceDir}" includes="
|
40
jython-nofullbuildpath.patch
Normal file
40
jython-nofullbuildpath.patch
Normal file
@ -0,0 +1,40 @@
|
||||
Index: jython-svn-Release_2_2_1/build.xml
|
||||
===================================================================
|
||||
--- jython-svn-Release_2_2_1.orig/build.xml 2007-10-13 20:44:01.000000000 +0200
|
||||
+++ jython-svn-Release_2_2_1/build.xml 2011-03-11 13:44:32.516562588 +0100
|
||||
@@ -551,7 +551,7 @@
|
||||
|
||||
|
||||
<!-- build the .html files using the ht2html tool -->
|
||||
- <target name="doc" depends="compile" if="full-build">
|
||||
+ <target name="doc" depends="compile">
|
||||
<fail unless="ht2html.dir" message="ht2html.dir is not set" />
|
||||
<copy todir="${dist.dir}/Doc" preservelastmodified="true">
|
||||
<fileset dir="Doc" includes="*.ht, **/*.gif" />
|
||||
@@ -572,7 +572,7 @@
|
||||
|
||||
|
||||
<!-- javadoc -->
|
||||
- <target name="javadoc" depends="compile" if="full-build">
|
||||
+ <target name="javadoc" depends="compile">
|
||||
<javadoc sourcepath="${source.dir}"
|
||||
destdir="${apidoc.dir}"
|
||||
source="${jdk.source.version}"
|
||||
@@ -588,7 +588,7 @@
|
||||
|
||||
|
||||
<!-- copy for full distribution -->
|
||||
- <target name="copy-full" if="full-build">
|
||||
+ <target name="copy-full">
|
||||
<!-- Misc files -->
|
||||
<echo>copy misc files from ${jython.base.dir}</echo>
|
||||
<copy todir="${dist.dir}" preservelastmodified="true">
|
||||
@@ -599,7 +599,7 @@
|
||||
|
||||
<!-- copy the CPython license -->
|
||||
<echo>copy CPython LICENSE from ${svn.checkout.dir}/python</echo>
|
||||
- <copy file="${svn.checkout.dir}/python/LICENSE" tofile="${dist.dir}/LICENSE_CPython.txt" preservelastmodified="true" />
|
||||
+ <copy file="LICENSE.txt" tofile="${dist.dir}/LICENSE_CPython.txt" preservelastmodified="true" />
|
||||
|
||||
<!-- sources: todir has to correspond with installer/**/JarInstaller.java -->
|
||||
<echo>copy sources from ${jython.base.dir}</echo>
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 11 13:01:53 UTC 2011 - mvyskocil@suse.cz
|
||||
|
||||
- Update to 2.2.1 - this obsolete the pyxml patch
|
||||
- merge with jython-2.2.1-6.fc16.src.rpm
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 22 11:06:57 UTC 2011 - coolo@novell.com
|
||||
|
||||
|
179
jython.spec
179
jython.spec
@ -13,36 +13,51 @@
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
%{expand: %%define 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
|
||||
BuildRequires: ant ht2html java2-devel-packages libreadline-java mysql-connector-java oro pyxml servletapi5
|
||||
%{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
|
||||
%define name jython
|
||||
%define version 2.2
|
||||
%define cpython_version 2.3
|
||||
%define cpythondir python%{cpython_version}
|
||||
%define pyxml_version 0.8.3
|
||||
%define release 0.a0.2jpp
|
||||
%define section free
|
||||
Version: 2.2
|
||||
Release: 326
|
||||
Summary: Java Source Interpreter
|
||||
License: Other uncritical OpenSource License ; Apache Software License
|
||||
Url: http://www.jython.org/
|
||||
Source0: %{name}-cvs.tar.bz2
|
||||
Source1: python-release22-maint-cvs.tar.bz2
|
||||
Patch0: %{name}-cachedir.patch
|
||||
Patch1: jython-new-xml.diff
|
||||
Requires: jpackage-utils >= 1.5
|
||||
Requires: oro
|
||||
Requires: servlet
|
||||
Group: Development/Libraries/Java
|
||||
BuildArch: noarch
|
||||
Version: 2.2.1
|
||||
Release: 1
|
||||
Summary: A Java implementation of the Python language
|
||||
License: ASL 1.1 and BSD and CNRI and JPython and Python
|
||||
URL: http://www.jython.org/
|
||||
Group: Development/Languages/Python
|
||||
# Use the included fetch-jython.sh script to generate the source drop
|
||||
# for jython 2.2.1
|
||||
# sh fetch-jython.sh \
|
||||
# jython https://jython.svn.sourceforge.net/svnroot Release_2_2_1
|
||||
#
|
||||
Source0: %{name}-fetched-src-%{svn_tag}.tar.bz2
|
||||
Source2: fetch-%{name}.sh
|
||||
Patch0: %{name}-cachedir.patch
|
||||
# Make javadoc and copy-full tasks not depend upon "full-build"
|
||||
# Also, copy python's license from source directory and not
|
||||
# ${python.home}
|
||||
Patch1: %{name}-nofullbuildpath.patch
|
||||
Requires: jpackage-utils >= 1.5
|
||||
Requires: jakarta-oro
|
||||
Requires: servletapi5
|
||||
Requires: python >= %{cpython_version}
|
||||
Requires: libreadline-java >= 0.8.0-16
|
||||
Requires: mysql-connector-java
|
||||
Requires: java >= 1.6.0
|
||||
BuildRequires: ant
|
||||
BuildRequires: ht2html
|
||||
BuildRequires: libreadline-java >= 0.8.0-16
|
||||
BuildRequires: mysql-connector-java
|
||||
BuildRequires: jakarta-oro
|
||||
BuildRequires: python >= %{cpython_version}
|
||||
BuildRequires: pyxml >= %{pyxml_version}
|
||||
BuildRequires: servletapi5
|
||||
BuildRequires: java-devel >= 1.6.0
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Jython is an implementation of the high-level, dynamic, object-oriented
|
||||
@ -63,10 +78,7 @@ 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 manual
|
||||
License: Other uncritical OpenSource License ; Apache Software License
|
||||
Summary: Manual for jython
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
@ -94,8 +106,6 @@ development and in shipping products.
|
||||
|
||||
|
||||
%package javadoc
|
||||
License: Other uncritical OpenSource License ; Apache Software License
|
||||
PreReq: coreutils
|
||||
Summary: Javadoc for jython
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
@ -123,7 +133,6 @@ development and in shipping products.
|
||||
|
||||
|
||||
%package demo
|
||||
License: Other uncritical OpenSource License ; Apache Software License
|
||||
Summary: Demonstration and samples for jython
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Group: Development/Libraries/Java
|
||||
@ -152,99 +161,117 @@ development and in shipping products.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}
|
||||
%setup -q -n %{name} -T -D -a 1
|
||||
%setup -q -n %{name}-svn-%{svn_tag}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
# remove all binary libs
|
||||
find . -name "*.jar" -exec rm -f {} \;
|
||||
# remove all CVS files
|
||||
for dir in `find . -type d -name CVS`; do rm -rf $dir; done
|
||||
for file in `find . -type f -name .cvsignore`; do rm -rf $file; done
|
||||
|
||||
%build
|
||||
export CLASSPATH=$(build-classpath libreadline-java mysql-connector-java oro servlet)
|
||||
export CLASSPATH=$(build-classpath mysql-connector-java oro servlet)
|
||||
# FIXME: fix jpackage-utils to handle multilib correctly
|
||||
export CLASSPATH=$CLASSPATH:%{_libdir}/libreadline-java/libreadline-java.jar
|
||||
|
||||
rm -rf org/apache
|
||||
if ! grep -q "javac.*source=" build.xml ; then
|
||||
perl -p -i -e 's|<javac |<javac source=\"1.4\" |' build.xml
|
||||
perl -p -i -e 's|<javadoc |<javadoc source=\"1.4\" |' build.xml
|
||||
fi
|
||||
if ! grep -q "javac.*source=" dist/build.xml ; then
|
||||
perl -p -i -e 's|<javac |<javac source=\"1.4\" |' dist/build.xml
|
||||
perl -p -i -e 's|<javadoc |<javadoc source=\"1.4\" |' dist/build.xml
|
||||
fi
|
||||
perl -p -i -e 's|execon|apply|g' build.xml
|
||||
#ant -Dpython.lib=/usr/%_lib/python%pyver -DPyXmlHome=/usr/%_lib/python%pyver copy-dist
|
||||
ant -Dpython.lib=./python/dist/src/Lib -DPyXmlHome=/usr/%_lib/python%pyver copy-dist
|
||||
ant -Dpython.home=%{_bindir} -Dht2html.dir=%{_datadir}/ht2html doc
|
||||
ant javadoc
|
||||
|
||||
ant \
|
||||
-Dpython.home=%{_bindir} \
|
||||
-Dht2html.dir=%{_datadir}/ht2html \
|
||||
-Dpython.lib=./CPythonLib \
|
||||
-Dpython.exe=%{_bindir}/python \
|
||||
-DPyXmlHome=%{_libdir}/python%pyver \
|
||||
-Dtargetver=1.3 \
|
||||
copy-dist
|
||||
|
||||
|
||||
# remove #! from python files
|
||||
pushd dist
|
||||
for f in `find . -name '*.py'`
|
||||
do
|
||||
sed --in-place "s:#!\s*/usr.*::" $f
|
||||
done
|
||||
popd
|
||||
|
||||
%install
|
||||
# jar
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
||||
install -m 644 dist/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
||||
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)
|
||||
# manual
|
||||
rm -f Doc/Makefile
|
||||
rm -rf Doc/api
|
||||
install -m 644 dist/%{name}.jar \
|
||||
$RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
||||
# javadoc
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
cp -pr dist/Doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
cp -pr dist/Doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
# data
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_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}
|
||||
# demo
|
||||
cp -pr dist/Demo $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
# manual
|
||||
rm -rf dist/Doc/javadoc
|
||||
mv dist/Doc %{name}-manual-%{version}
|
||||
|
||||
# registry
|
||||
install -m 644 registry $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
# scripts
|
||||
install -d $RPM_BUILD_ROOT%{_bindir}
|
||||
|
||||
cat > $RPM_BUILD_ROOT%{_bindir}/%{name} << EOF
|
||||
#!/bin/sh
|
||||
#
|
||||
# %{name} script
|
||||
# JPackage Project (http://jpackage.sourceforge.net)
|
||||
#
|
||||
# Source functions library
|
||||
. %{_datadir}/java-utils/java-functions
|
||||
|
||||
# Source system prefs
|
||||
if [ -f %{_sysconfdir}/%{name}.conf ] ; then
|
||||
. %{_sysconfdir}/%{name}.conf
|
||||
fi
|
||||
|
||||
# Source user prefs
|
||||
if [ -f \$HOME/.%{name}rc ] ; then
|
||||
. \$HOME/.%{name}rc
|
||||
fi
|
||||
|
||||
# Arch-specific location of dependency
|
||||
case \$(uname -m) in
|
||||
x86_64 | ia64 | s390x | ppc64 | sparc64 )
|
||||
JYTHONLIBDIR="/usr/lib64" ;;
|
||||
* )
|
||||
JYTHONLIBDIR="/usr/lib" ;;
|
||||
esac
|
||||
|
||||
# Configuration
|
||||
MAIN_CLASS=org.python.util.%{name}
|
||||
BASE_FLAGS=-Dpython.home=%{_datadir}/%{name}
|
||||
BASE_JARS="%{name} oro servlet"
|
||||
if [ -f %{_libdir}/libJavaReadline.so ]; then
|
||||
BASE_FLAGS="\$BASE_FLAGS -Dpython.console=org.python.util.ReadlineConsole"
|
||||
BASE_FLAGS="\$BASE_FLAGS -Djava.library.path=%{_libdir}"
|
||||
BASE_FLAGS="\$BASE_FLAGS -Dpython.console.readlinelib=GnuReadline"
|
||||
BASE_JARS="\$BASE_JARS libreadline-java"
|
||||
fi
|
||||
if [ -f %{_javadir}/mysql-connector-java.jar ]; then
|
||||
BASE_JARS="\$BASE_JARS mysql-connector-java"
|
||||
fi
|
||||
BASE_JARS="%{name} oro servlet mysql-connector-java"
|
||||
|
||||
BASE_FLAGS="\$BASE_FLAGS -Dpython.console=org.python.util.ReadlineConsole"
|
||||
BASE_FLAGS="\$BASE_FLAGS -Djava.library.path=\$JYTHONLIBDIR/libreadline-java"
|
||||
BASE_FLAGS="\$BASE_FLAGS -Dpython.console.readlinelib=Editline"
|
||||
|
||||
# Set parameters
|
||||
set_jvm
|
||||
CLASSPATH=$CLASSPATH:\$JYTHONLIBDIR/libreadline-java/libreadline-java.jar
|
||||
set_classpath \$BASE_JARS
|
||||
set_flags \$BASE_FLAGS
|
||||
set_options \$BASE_OPTIONS
|
||||
|
||||
# Let's start
|
||||
run "\$@"
|
||||
EOF
|
||||
|
||||
cat > $RPM_BUILD_ROOT%{_bindir}/%{name}c << EOF
|
||||
#!/bin/sh
|
||||
#
|
||||
# %{name}c script
|
||||
# JPackage Project (http://jpackage.sourceforge.net)
|
||||
|
||||
%{_bindir}/%{name} %{_datadir}/%{name}/Tools/%{name}c/%{name}c.py "\$@"
|
||||
EOF
|
||||
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/Lib/UserDict.py
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@ -260,16 +287,20 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/%{name}/Tools
|
||||
%{_datadir}/%{name}/registry
|
||||
|
||||
%files manual
|
||||
%defattr(-,root,root)
|
||||
%doc dist/Doc/*.html dist/Doc/images
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root)
|
||||
%{_javadocdir}/%{name}-%{version}
|
||||
%doc LICENSE.txt
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%files manual
|
||||
%defattr(-,root,root)
|
||||
%doc LICENSE.txt README.txt
|
||||
%doc %{name}-manual-%{version}
|
||||
|
||||
|
||||
%files demo
|
||||
%defattr(-,root,root)
|
||||
%doc ACKNOWLEDGMENTS NEWS LICENSE.txt README.txt
|
||||
%{_datadir}/%{name}/Demo
|
||||
|
||||
%changelog
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:58208b6e7df7204b87376b332b7942c69958ab7d8dcf162fa34358b6193e4138
|
||||
size 1405517
|
Loading…
x
Reference in New Issue
Block a user