Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:13.1
bsh
bsh.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bsh.spec of Package bsh
# # spec file for package bsh # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # 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/ # # icecream 0 %define name bsh %define Name BeanShell %define version 1.3.0 %define fversion 1.3.0 %define release 6jpp %define section free Name: bsh Version: 1.3.0 Release: 0 Summary: Lightweight Scripting for Java License: LGPL-2.1+ Group: Development/Libraries/Java Source0: %{name}-%{fversion}-src.tar.bz2 Source1: bsh-1.3.0.pom Source2: bsh-bsf-1.3.0.pom Patch0: %{name}-build.patch Patch2: %{name}-java14compat.patch BuildRequires: ant-trax BuildRequires: bsf BuildRequires: fdupes BuildRequires: java-devel BuildRequires: javapackages-tools BuildRequires: perl BuildRequires: servletapi5 BuildRequires: xalan-j2 PreReq: coreutils Requires: bsf Requires: javapackages-tools Url: http://www.beanshell.org/ BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description BeanShell is a small, free, embeddable Java source interpreter with object scripting language features written in Java. BeanShell executes standard Java statements and expressions in addition to obvious scripting commands and syntax. BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript(tm). You can use BeanShell interactively for Java experimentation and debugging or as a simple scripting engine for your applications. In short: BeanShell is dynamically interpreted Java, plus some useful stuff. Another way to describe it is to say that in many ways BeanShell is to Java as Tcl/Tk is to C: BeanShell is embeddable--you can call BeanShell from your Java applications to execute Java code dynamically at runtime or to provide scripting extensibility for your applications. Alternatively, you can call your Java applications and objects from BeanShell, working with Java objects and APIs dynamically. Because BeanShell is written in Java and runs in the same space as your application, you can freely pass references to "real live" objects into scripts and return them as results. %package manual Summary: Manual for bsh Group: Development/Libraries/Java %description manual BeanShell is a small, free, embeddable, Java source interpreter with object scripting language features, written in Java. This package contains the manual for BeanShell. %package javadoc PreReq: coreutils Summary: Javadoc for bsh Group: Development/Libraries/Java %description javadoc BeanShell is a small, free, embeddable, Java source interpreter with object scripting language features, written in Java. This package contains the javadoc documentation for BeanShell. %package demo Summary: Demonstration and sample files for bsh Group: Development/Libraries/Java AutoReqProv: no Requires: %{name} = %{version} Requires: coreutils %description demo BeanShell is a small, free, embeddable, Java source interpreter with object scripting language features, written in Java. This package contains sample and demonstration files for BeanShell. %prep %setup -q -n %{Name} %patch0 -p1 %patch2 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 # fix permissions find . -type 'f' | xargs chmod 0644 %build mkdir -p lib export CLASSPATH=$(build-classpath bsf servletapi5 xalan-j2) ant dist (cd docs/faq && ant) (cd docs/manual && ant) %install # jars install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -m 644 dist/%{name}-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar install -m 644 dist/%{name}-bsf-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-bsf-%{version}.jar install -m 644 dist/%{name}-classpath-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-classpath-%{version}.jar install -m 644 dist/%{name}-commands-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-commands-%{version}.jar install -m 644 dist/%{name}-core-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-core-%{version}.jar install -m 644 dist/%{name}-reflect-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-reflect-%{version}.jar install -m 644 dist/%{name}-util-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-util-%{version}.jar (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done) # poms install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} install -pm 644 %{SOURCE1} \ $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom install -pm 644 %{SOURCE2} \ $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}-bsf.pom %add_maven_depmap JPP-%{name}.pom %{name}.jar -a org.beanshell:%{name} %add_maven_depmap JPP-%{name}-bsf.pom %{name}-bsf.jar # manual find docs -name ".cvswrappers" -exec rm -f {} \; find docs -name "*.xml" -exec rm -f {} \; find docs -name "*.xsl" -exec rm -f {} \; find docs -name "*.log" -exec rm -f {} \; (cd docs/manual && mv html/* .) (cd docs/manual && rm -rf html) (cd docs/manual && rm -rf xsl) # javadoc install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -pr javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} # demo for i in `find tests -name \*.bsh`; do perl -p -i -e 's,^\n?#!(/(usr/)?bin/java bsh\.Interpreter|/bin/sh),#!/usr/bin/env %{_bindir}/%{name},' $i if head -1 $i | grep '#!/usr/bin/env %{_bindir}/%{name}' >/dev/null; then chmod 755 $i fi done chmod 755 tests/Template cat > one << EOF #!/bin/sh EOF cat tests/Interactive/reload/one >> one cat one > tests/Interactive/reload/one rm one cat > two << EOF #!/bin/sh EOF cat tests/Interactive/reload/two >> two cat two > tests/Interactive/reload/two rm two install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name} cp -pr tests $RPM_BUILD_ROOT%{_datadir}/%{name} install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/webapps install -m 644 dist/bshservlet.war $RPM_BUILD_ROOT%{_datadir}/%{name}/webapps install -m 644 dist/bshservlet-wbsh.war $RPM_BUILD_ROOT%{_datadir}/%{name}/webapps # 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 # Configuration MAIN_CLASS=bsh.Interpreter if [ -n "\$BSH_DEBUG" ]; then BASE_FLAGS=-Ddebug=true fi BASE_JARS="%{name}.jar" #if [ -f /usr/lib/libJavaReadline.so ]; then # BASE_FLAGS="$BASE_FLAGS -Djava.library.path=/usr/lib" # BASE_FLAGS="\$BASE_FLAGS -Dbsh.console.readlinelib=GnuReadline" # BASE_JARS="\$BASE_JARS libreadline-java.jar" #fi # Set parameters set_jvm set_classpath \$BASE_JARS set_flags \$BASE_FLAGS set_options \$BASE_OPTIONS # Let's start run "\$@" EOF cat > $RPM_BUILD_ROOT%{_bindir}/%{name}doc << EOF #!/usr/bin/env %{_bindir}/%{name} EOF cat scripts/bshdoc.bsh >> $RPM_BUILD_ROOT%{_bindir}/%{name}doc %fdupes ${RPM_BUILD_ROOT}/usr %files %defattr(-,root,root) %doc src/Changes.html src/License.txt src/README.txt %attr(0755,root,root) %{_bindir}/%{name} %attr(0755,root,root) %{_bindir}/%{name}doc %{_javadir}/* %dir %{_datadir}/%{name} %{_datadir}/%{name} %{_datadir}/%{name}/webapps %{_mavendepmapfragdir} %{_mavenpomdir}/* %exclude %{_datadir}/%{name}/tests %files manual %defattr(-,root,root) %doc docs/* %files javadoc %defattr(-,root,root) %{_javadocdir}/%{name} %files demo %defattr(-,root,root) %doc tests/README.txt tests/Interactive/README %{_datadir}/%{name}/tests %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor