[jspecview] Initial import.
Susi Lehtola
jussilehtola at fedoraproject.org
Tue May 14 11:54:32 UTC 2013
commit bcb6eafe8377cf3433a400339b117f5114688e7e
Author: Susi Lehtola <jussilehtola at fedoraproject.org>
Date: Tue May 14 14:54:31 2013 +0300
Initial import.
.gitignore | 1 +
jspecview-fedorabuild.patch | 54 ++++++++++++++++++++
jspecview-resources.patch | 22 ++++++++
jspecview.spec | 116 +++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
5 files changed, 194 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..7dd0b29 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/jspecview-1169svn.tar.bz2
diff --git a/jspecview-fedorabuild.patch b/jspecview-fedorabuild.patch
new file mode 100644
index 0000000..86304f0
--- /dev/null
+++ b/jspecview-fedorabuild.patch
@@ -0,0 +1,54 @@
+diff -up jspecview/JSpecView/build.xml.fedora jspecview/JSpecView/build.xml
+--- jspecview/JSpecView/build.xml.fedora 2013-05-14 00:46:38.000000000 +0300
++++ jspecview/JSpecView/build.xml 2013-05-14 14:50:31.200405006 +0300
+@@ -20,6 +20,7 @@
+ <property name="build.number" value="${build.major.number}.${build.minor.number}.${build.revision.number}"/>
+ <property name="src.dir" value="src"/>
+ <property name="lib.dir" value="libs"/>
++ <property name="syslib.dir" value="/usr/share/java"/>
+ <property name="bin.dir" value="bin"/>
+ <property name="build.dir" value="build"/>
+ <property name="build.app.dir" value="${build.dir}"/>
+@@ -30,7 +31,7 @@
+ <property name="dist.dir" value="dist" />
+ <property name="dist.zip" value="${dist.dir}/jspecview.zip" />
+ <property name="applet.jar" value="${build.dir}/jspecview.jar" />
+- <property name="itext.jar" value="${lib.dir}/itext-1.4.5-min.jar" />
++ <property name="itext.jar" value="${syslib.dir}/itext.jar" />
+
+ <path id="jspecviewlib.classpath">
+ <pathelement location="${jsvlib.dir}"/>
+@@ -38,7 +39,7 @@
+ <path id="jspecview.classpath">
+ <pathelement location="bin"/>
+ <pathelement location="libs/netscape.jar"/>
+- <pathelement location="libs/${itext.jar}"/>
++ <pathelement location="${itext.jar}"/>
+ <path refid="jspecviewlib.classpath"/>
+ </path>
+
+@@ -80,7 +81,6 @@
+ <unjar dest="${bin.dir}" src="${itext.jar}"/>
+ <jar destfile="${build.app.dir}/${ant.project.name}.app.${build.number}.jar">
+ <manifest>
+- <attribute name="Class-Path" value="."/>
+ <attribute name="Main-Class" value="${main-class}"/>
+ </manifest>
+ <fileset dir="${bin.dir}" />
+@@ -104,9 +104,6 @@
+ </copy>
+ <!--unjar dest="${bin.dir}" src="${itext.jar}"/ -->
+ <jar destfile="${build.applet.dir}/${ant.project.name}.applet.${build.number}.jar">
+- <manifest>
+- <attribute name="Class-Path" value=". netscape.jar"/>
+- </manifest>
+ <fileset dir="${bin.dir}">
+ <exclude name="jspecview/application/**"/>
+ <exclude name="com/lowagie/**"/>
+@@ -168,4 +165,4 @@
+ </delete>
+ </target>
+
+-</project>
+\ No newline at end of file
++</project>
diff --git a/jspecview-resources.patch b/jspecview-resources.patch
new file mode 100644
index 0000000..7c77f92
--- /dev/null
+++ b/jspecview-resources.patch
@@ -0,0 +1,22 @@
+diff -up jspecview/JSpecView/build.xml.orig jspecview/JSpecView/build.xml
+--- jspecview/JSpecView/build.xml.orig 2013-05-14 14:43:27.027508840 +0300
++++ jspecview/JSpecView/build.xml 2013-05-14 14:44:33.344617073 +0300
+@@ -74,6 +74,18 @@
+ </linecontains>
+ </filterchain>
+ </copy>
++
++ <copy todir="${bin.dir}/jspecview/application/resources" >
++ <fileset dir="src/jspecview/application/resources">
++ <include name="*" />
++ </fileset>
++ </copy>
++ <copy todir="${bin.dir}/jspecview/application/icons" >
++ <fileset dir="src/jspecview/application/icons">
++ <include name="*" />
++ </fileset>
++ </copy>
++
+ <unjar dest="${bin.dir}" src="${itext.jar}"/>
+ <jar destfile="${build.app.dir}/${ant.project.name}.app.${build.number}.jar">
+ <manifest>
diff --git a/jspecview.spec b/jspecview.spec
new file mode 100644
index 0000000..f59890d
--- /dev/null
+++ b/jspecview.spec
@@ -0,0 +1,116 @@
+%global svnrel 1169
+
+Name: jspecview
+Version: 2
+Release: 4.%{svnrel}svn%{?dist}
+Summary: JAVA applets for the display of JCAMP-DX and AnIML/CML spectral files
+
+Group: System Environment/Base
+License: LGPLv2
+URL: http://jspecview.sourceforge.net/
+# Upstream does not release stable source tarballs.
+# Tarball created with
+# svn checkout -r %{svnrel} http://svn.code.sf.net/p/jspecview/svn/dev2 jspecview
+# rm -rf jspecview/.svn
+# tar jcf jspecview-%{svnrel}svn.tar.bz2 jspecview
+Source0: jspecview-%{svnrel}svn.tar.bz2
+# Include missing resources in jar
+Patch0: jspecview-resources.patch
+# Use system libraries
+Patch1: jspecview-fedorabuild.patch
+BuildArch: noarch
+
+BuildRequires: jpackage-utils
+BuildRequires: java-devel
+BuildRequires: ant
+BuildRequires: itext
+BuildRequires: icedtea-web
+# Upstream has hardcoded stuff for eclipse setup
+BuildRequires: eclipse
+
+Requires: jpackage-utils
+Requires: java
+
+%description
+The JSpecView Project provides JAVA applets for the display of
+JCAMP-DX and AnIML/CML spectral files.
+
+%package javadoc
+Summary: Javadocs for %{name}
+Group: Documentation
+Requires: jpackage-utils
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+
+%prep
+%setup -q -n jspecview
+%patch0 -p1 -b .resources
+%patch1 -p1 -b .fedora
+
+# Fix EOL encodings
+for f in JSpecView/extras/{COPYRIGHT,LICENSE,README}.txt; do
+ sed 's/\r//' $f > $f.new && \
+ touch -r $f $f.new && \
+ mv $f.new $f
+done
+
+# Remove pre-existing binaries
+find -name '*.class' -exec rm -f '{}' \;
+find -name '*.jar' -exec rm -f '{}' \;
+
+# Install netscape.jar
+cp -a %{_datadir}/icedtea-web/plugin.jar JSpecView/libs/netscape.jar
+
+%build
+# Build library
+cd JSpecViewLib
+ant
+cd ..
+
+cd JSpecView
+ant make-application-jar make-applet-jar
+cd ..
+
+%install
+mkdir -p %{buildroot}%{_javadir}
+install -D -p -m 644 -t %{buildroot}%{_javadir}/ JSpecView/build/jspecview.app.*.jar
+install -D -p -m 644 -t %{buildroot}%{_javadir}/ JSpecView/build/jspecview.applet.*.jar
+
+# Install symlinks
+pushd %{buildroot}%{_javadir}
+ln -s jspecview.app.*.jar jspecview.app.jar
+ln -s jspecview.applet.*.jar jspecview.applet.jar
+popd
+
+# Javadoc
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -rp JSpecView/doc/ %{buildroot}%{_javadocdir}/%{name}
+
+%files
+%doc JSpecView/extras/README.txt JSpecView/extras/LICENSE.txt JSpecView/extras/COPYRIGHT.txt
+%{_javadir}/jspecview.*.jar
+
+%files javadoc
+%{_javadocdir}/%{name}/
+
+%changelog
+* Tue May 14 2013 Susi Lehtola <jussilehtola at fedoraproject.org> - 2-4.1169svn
+- Dropped classpaths from manifests.
+- Update to revision 1169.
+- Added missing resources.
+- Fixed EOL encodings.
+
+* Tue May 07 2013 Susi Lehtola <jussilehtola at fedoraproject.org> - 2-3.1166svn
+- Include license files as well.
+
+* Mon Apr 29 2013 Susi Lehtola <jussilehtola at fedoraproject.org> - 2-2.1166svn
+- Include javadoc.
+
+* Fri Apr 05 2013 Susi Lehtola <jussilehtola at fedoraproject.org> - 2-1.1166svn
+- Fixed the broken build system, patch sent upstream.
+- Update to 1166svn.
+
+* Mon Mar 25 2013 Susi Lehtola <jussilehtola at fedoraproject.org> - 2-1.1158svn
+- First release.
diff --git a/sources b/sources
index e69de29..9b03a08 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+5a00bd0db676688d2b7756eeeb2a7ce7 jspecview-1169svn.tar.bz2
More information about the scm-commits
mailing list