jython/jython.spec

126 lines
4.5 KiB
RPMSpec
Raw Normal View History

%define jythonver %(echo %version | cut -d '.' -f -3)
%define javahome %{_jvmdir}/jdk
Name: jython
Version: 2.7.0
Release: 1mamba
Summary: A Java implementation of the Python language
Group: Development/Languages
Vendor: openmamba
Distribution: openmamba
Packager: Automatic Build System <autodist@mambasoft.it>
URL: http://www.jython.org/Project/
# use fetch-jython.sh script to generate the source drop
# sh fetch-jython.sh jython https://jython.svn.sourceforge.net/svnroot Release_2_2_1
Source: http://search.maven.org/remotecontent?filepath=org/python/jython-standalone/%{version}/jython-standalone-%{version}.jar
License: BSD, Python Software Foundation License
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
Requires: python
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Jython is an implementation of the high-level, dynamic, object-oriented language Python seamlessly integrated with the Java platform.
The predecessor to Jython, JPython, is certified as 100% Pure Java. Jython is freely available for both commercial and non-commercial use and is distributed with source code. Jython is complementary to Java and is especially suited for the following tasks: Embedded scripting - Java programmers can add the Jython libraries to their system to allow end users to write simple or complicated scripts that add functionality to the application. Interactive experimentation - Jython provides an interactive interpreter that can be used to interact with Java packages or with running Java applications. This allows programmers to experiment and debug any Java system using Jython. Rapid application development - Python programs are typically 2-10X shorter than the equivalent Java program.
This translates directly to increased 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 -c
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d -m 755 %{buildroot}%{_javadir}
install -m 644 %{SOURCE0} \
%{buildroot}%{_javadir}/%{name}-%{jythonver}.jar
ln -s %{name}-%{jythonver}.jar %{buildroot}%{_javadir}/%{name}.jar
# scripts
install -d %{buildroot}%{_bindir}
cat > %{buildroot}%{_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
# Configuration
MAIN_CLASS=org.python.util.%{name}
BASE_FLAGS=-Dpython.home=%{_datadir}/%{name}
BASE_JARS="%{name} oro servletapi5 mysql-connector-java"
BASE_FLAGS="\$BASE_FLAGS -Dpython.console=org.python.util.ReadlineConsole"
BASE_FLAGS="\$BASE_FLAGS -Djava.library.path=%{_libdir}/libreadline-java"
BASE_FLAGS="\$BASE_FLAGS -Dpython.console.readlinelib=Editline"
# Set parameters
set_jvm
CLASSPATH=$CLASSPATH:%{_libdir}/libreadline-java/libreadline-java.jar
set_classpath \$BASE_JARS
set_flags \$BASE_FLAGS
set_options \$BASE_OPTIONS
# Let's start
run "\$@"
EOF
cat > %{buildroot}%{_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
#%{_bindir}/aot-compile-rpm \
# --exclude %{_datadir}/%{name}/Demo/jreload \
# --exclude %{_datadir}/%{name}/Demo/jreload/example.jar
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/jython
%attr(0755,root,root) %{_bindir}/jythonc
%{_javadir}/jython-%{jythonver}.jar
%{_javadir}/jython.jar
%changelog
* Thu Oct 13 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7.0-1mamba
- update to 2.7.0
* Wed Jul 31 2013 Automatic Build System <autodist@mambasoft.it> 2.2.1.svn-6mamba
- rebuilt
* Mon Mar 28 2011 gil <puntogil@libero.it> 2.2.1.svn-5mamba
- rebuilt with java-gcj-compat support
* Tue May 18 2010 gil <puntogil@libero.it> 2.2.1.svn-4mamba
- rebuilt with sun-java 6u20 and python 2.6
* Mon Jan 04 2010 gil <puntogil@libero.it> 2.2.1.svn-3mamba
- rebuilt with java-mysql-connector java-subversion java-svnant postgresql-jdbc python-xml support
* Mon Mar 09 2009 gil <puntogil@libero.it> 2.2.1.svn-2mamba
- rebuilt with java-servletapi5
* Tue Jan 27 2009 gil <puntogil@libero.it> 2.2.1.svn-1mamba
- package created by autospec