[Jpackage-commits] rpms/free/osp osp-core-build.xml, NONE, 1.1 osp.spec, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Fri Jun 25 09:03:30 CEST 2010


Update of /home/projects/jpackage/cvs/rpms/free/osp
In directory ryu.zarb.org:/tmp/DkNUf6OG2z/rpms/free/osp

Added Files:
	osp-core-build.xml osp.spec 
Log Message:
1.2-1.jpp6

--- NEW FILE: osp.spec ---
# Copyright (c) 2000-2010, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

Name:           osp
Version:        1.2
Release:        1%{?dist}
Summary:        Open Source Physics Core Library

Group:          Development/Libraries
License:        GPL v2
URL:            http://www.compadre.org/osp/

Source0:        http://www.opensourcephysics.org/download/1.2/osp_core.zip
Source1:        osp-core-build.xml

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  ant >= 0:1.7.1
BuildRequires:  java-devel >= 0:1.6.0
BuildRequires:  jpackage-utils >= 0:5.0.0

Requires:       java >= 0:1.6.0
Requires:       jpackage-utils >= 0:5.0.0

Requires(post):    jpackage-utils >= 0:5.0.0
Requires(postun):  jpackage-utils >= 0:5.0.0

BuildArch:      noarch

%description
Open Source Physics core library.

%package javadoc
Summary:        Javadocs for %{name}
Group:          Documentation
Requires:       %{name} = %{version}-%{release}
Requires:       jpackage-utils >= 0:5.0.0

%description javadoc
This package contains the API documentation for %{name}.

%prep
%setup -q -c
for j in $(find . -name "*.jar"); do
    mv $j $j.no
done
mkdir build
cp %{SOURCE1} build/build.xml

%build
cd build
%ant jarfile docs


%install
%__rm -rf %{buildroot}

# jar
install -d -m 755 %{buildroot}%{_javadir}
install -m 644 build/build/jar/osp.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar

(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do \
%__ln_s ${jar} ${jar/-%{version}/}; done)

# javadoc
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}
%__cp -a build/docs/* %{buildroot}%{_javadocdir}/%{name}

%clean
%__rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%{_javadir}/*.jar

%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}

%changelog
* Thu Jun 24 2010 Ralph Apel <r.apel at r-apel.de> 1.2-1
- First JPP6 release


--- NEW FILE: osp-core-build.xml ---
<project name="osp" default="all" basedir=".\">
	<property name="jdk" value="C:\jdk1.5.0_7"/>
	<property name="build.dir" value=".\build\"/>
	<property name="classes.dir" value="${build.dir}\classes\"/>
	<property name="jar.dir" value="${build.dir}\jar\"/>
	<property name="docs.dir" value="${build.dir}\docs\"/>
	<property name="src.dir" value="..\src\"/>
	<property name="author" value="W.Christian"/>

  <tstamp>
     <format property="buildtime.isoformat" pattern="yyyy-MM-dd'T'HH:mm:ss"/>    
  </tstamp>


	<!--help: list important targets-->
	<target name="help">
		<echo>all - removes old builds compiles the Open Source Physics libraries</echo>
		<echo>compile - compiles the Open Source Physics libraries</echo>
		<echo>clean - removes old build files</echo>
                <echo>docs - creates javadoc documentation</echo>
                <echo>ydocs - creates javadoc documentation using ydoc</echo>
	</target>

	<!--init: create the directories-->
	<target name="init">
		<mkdir dir="${build.dir}"/>
		<mkdir dir="${jar.dir}"/>
		<mkdir dir="${docs.dir}"/>
		<mkdir dir="${classes.dir}"/>
       <mkdir dir="${classes.dir}/meta-inf"/>
	</target>

	<!--clean: clean the directories-->
	<target name="clean" depends="init">
		<delete dir="${jar.dir}"/>
		<delete dir="${classes.dir}"/>
		<delete dir="${docs.dir}"/>
		<delete dir="${build.dir}"/>
        <delete dir="${classes.dir}/meta-inf"/>
	</target>

	<!--compile: compiles the source files-->
	<target name="compile" depends="init">
		<javac srcdir="${src.dir}" destdir="${classes.dir}" source="1.5">
			<compilerarg value="-Xlint:-serial"/>
		</javac>
		<copy todir="${classes.dir}/org/opensourcephysics/resources">
 			<fileset dir="${src.dir}/org/opensourcephysics/resources"/>
		</copy>	
	</target>

	<!--all: removes old files and compiles the source files-->
	<target name="all" depends="compile,jarfile" >
	</target>

	<!--jarfile: creates the manifest-->
	<target name="manifest">
		<manifest file="${classes.dir}/meta-inf/Manifest.mf">
       		<attribute name="Built-By" value="${author}"/>
            <attribute name="Built-On" value="${buildtime.isoformat}"/>
            <attribute name="Main-Class" value="org.opensourcephysics.tools.LaunchBuilder"/>
       </manifest >
	</target>

	<!--jarfile: creates the jar file-->
	<target name="jarfile" depends="compile,manifest">
		<jar jarfile="${jar.dir}osp.jar" basedir="${classes.dir}"   manifest="${classes.dir}/meta-inf/Manifest.mf" />
        <copy todir="${build.dir}/../../lib">
 			<fileset dir="${jar.dir}"/>
		</copy>	
	</target>

	
	<!--docs: generates documentation-->
	<target name="docs">
		<javadoc 
			packagenames="org.opensourcephysics.*"
		    sourcepath="${src.dir}"
			destdir="docs">
  		</javadoc>
	</target>

</project>







More information about the JPackage-commits mailing list