264 lines
8.4 KiB
RPMSpec
264 lines
8.4 KiB
RPMSpec
|
%define majver %(echo %version | cut -d. -f 1-2)
|
||
|
Name: java-jeuclid
|
||
|
Version: 3.1.9
|
||
|
Release: 2mamba
|
||
|
Summary: MathML Rendering Solution
|
||
|
Group: Development/Libraries/Java
|
||
|
Vendor: openmamba
|
||
|
Distribution: openmamba
|
||
|
Packager: gil <puntogil@libero.it>
|
||
|
URL: http://jeuclid.sourceforge.net/
|
||
|
Source: http://downloads.sourceforge.net/project/jeuclid/%{majver}.x/%{version}/jeuclid-parent-%{version}-src.zip
|
||
|
# http://cvs.fedoraproject.org/viewvc/rpms/jeuclid/
|
||
|
# build script based on debian
|
||
|
Source1: java-jeuclid-3.1.8-build1.xml
|
||
|
Source2: jeuclid-mathviewer.desktop
|
||
|
Source3: java-jeuclid-3.1.9-mathviewer.sh
|
||
|
Source4: java-jeuclid-3.1.9-cli.sh
|
||
|
#Source5: java-jeuclid-3.1.8-mathviewer_it.properties
|
||
|
#Source6: maven2-2.2.0-settings.xml
|
||
|
Source7: java-jeuclid-3.1.9-core16-build.xml
|
||
|
Source8: java-jeuclid-3.1.9-core16-maven-build.xml
|
||
|
Source9: java-jeuclid-3.1.9-core16-maven-build.properties
|
||
|
# removes OSX dep
|
||
|
Patch0: java-jeuclid-3.1.8-removes-OSX-dep.patch
|
||
|
# compiling code that uses Apple EAWT without the lib
|
||
|
Patch1: java-jeuclid-3.1.8-AppleJavaExtensions.patch
|
||
|
|
||
|
License: Apache Software License 2.0
|
||
|
BuildRequires: apache-ant
|
||
|
BuildRequires: apache-batik = 1.7
|
||
|
BuildRequires: apache-fop == 0.95
|
||
|
BuildRequires: apache-log4j
|
||
|
BuildRequires: hicolor-icon-theme
|
||
|
BuildRequires: jakarta-commons-io
|
||
|
BuildRequires: jakarta-commons-lang24
|
||
|
BuildRequires: jakarta-commons-logging
|
||
|
#BuildRequires: jakarta-commons-logging-javadoc
|
||
|
BuildRequires: java-cip-annotations
|
||
|
#BuildRequires: java-cip-annotations-javadoc
|
||
|
BuildRequires: java-testng
|
||
|
#BuildRequires: java-testng-javadoc
|
||
|
BuildRequires: java-junit3
|
||
|
#BuildRequires: sun-java-javadoc
|
||
|
# xml-apis xml-apis-ext
|
||
|
BuildRequires: xml-commons-apis
|
||
|
BuildRequires: xmlgraphics-commons == 1.3.1
|
||
|
Requires: apache-batik = 1.7
|
||
|
Requires: jakarta-commons-logging
|
||
|
Requires: java-cip-annotations
|
||
|
Requires: jpackage-utils
|
||
|
Requires: xmlgraphics-commons == 1.3.1
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||
|
|
||
|
%description
|
||
|
JEuclid is a complete MathML rendering solution, consisting of:
|
||
|
|
||
|
* A MathViewer application
|
||
|
* Command line converters from MathML to other formats
|
||
|
* An ant task for automated conversion
|
||
|
* Display components for AWT and Swing
|
||
|
* A component for Apache Cocoon
|
||
|
|
||
|
%package cli
|
||
|
Group: Applications/Publishing
|
||
|
Summary: JEuclid Command line interface
|
||
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||
|
Requires: jakarta-commons-cli
|
||
|
Requires: jakarta-commons-io
|
||
|
Requires: jakarta-commons-lang24
|
||
|
|
||
|
%description cli
|
||
|
The %{name}-cli package provides a command line interface for %{name}.
|
||
|
|
||
|
%package fop
|
||
|
Group: Applications/Publishing
|
||
|
Summary: JEuclid plug-in for FOP
|
||
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||
|
Requires: apache-fop == 0.95
|
||
|
|
||
|
%description fop
|
||
|
The %{name}-fop package is a jeuclid plug-in for Apache FOP.
|
||
|
|
||
|
%package mathviewer
|
||
|
Group: Applications/Publishing
|
||
|
Summary: Viewer for MathML files
|
||
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||
|
Requires: hicolor-icon-theme
|
||
|
|
||
|
%description mathviewer
|
||
|
The %{name}-mathviewer package contains the Swing MathViewer application.
|
||
|
|
||
|
%prep
|
||
|
|
||
|
%setup -q -n jeuclid-parent-%{version}
|
||
|
|
||
|
chmod -R go=u-w *
|
||
|
|
||
|
cp %{SOURCE1} build.xml
|
||
|
cp %{SOURCE7} jeuclid-core16/build.xml
|
||
|
cp %{SOURCE8} jeuclid-core16/maven-build.xml
|
||
|
cp %{SOURCE9} jeuclid-core16/maven-build.properties
|
||
|
|
||
|
#cp %{SOURCE5} jeuclid-mathviewer/src/main/resources/intl/mathviewer_it.properties
|
||
|
%patch0 -p0
|
||
|
%patch1 -p1
|
||
|
|
||
|
# removes the FreeHep support
|
||
|
rm -f jeuclid-core/src/main/java/net/sourceforge/jeuclid/converter/FreeHep*;
|
||
|
|
||
|
sed 's/\r//' NOTICE > NOTICE.tmp
|
||
|
touch -r NOTICE NOTICE.tmp;
|
||
|
mv NOTICE.tmp NOTICE
|
||
|
|
||
|
|
||
|
for j in $(find . -name "*.jar" -o -name "*.class" ); do
|
||
|
rm -f $j
|
||
|
done
|
||
|
|
||
|
mkdir -p lib
|
||
|
pushd lib
|
||
|
# jeuclid-core
|
||
|
ln -sf $(build-classpath ant-1.7.1) ant.jar
|
||
|
ln -sf $(build-classpath batik-all) batik-all.jar
|
||
|
# commons-logging.jar
|
||
|
ln -sf $(build-classpath jcip-annotations) jcip-annotations.jar
|
||
|
ln -sf $(build-classpath xml-commons-apis) xml-apis.jar
|
||
|
# xml-apis-ext.jar
|
||
|
# xmlgraphics-commons.jar
|
||
|
|
||
|
# jeuclid-cli
|
||
|
ln -sf $(build-classpath commons-cli) commons-cli.jar
|
||
|
ln -sf $(build-classpath commons-lang24) commons-lang.jar
|
||
|
# jeuclid-core.jar
|
||
|
# xmlgraphics-commons.jar
|
||
|
|
||
|
# jeuclid-mathviewer
|
||
|
# AppleJavaExtensions.jar
|
||
|
ln -sf $(build-classpath commons-logging) commons-logging.jar
|
||
|
# jeuclid-core.jar
|
||
|
|
||
|
# jeuclid-fop
|
||
|
# batik-all.jar
|
||
|
# commons-logging.jar
|
||
|
ln -sf $(build-classpath fop) fop.jar
|
||
|
ln -sf $(build-classpath fop-hyph) fop-hyph.jar
|
||
|
# jeuclid-core.jar
|
||
|
# xml-apis.jar
|
||
|
ln -sf $(build-classpath xml-commons-apis-ext) xml-apis-ext.jar
|
||
|
ln -sf $(build-classpath xmlgraphics-commons) xmlgraphics-commons.jar
|
||
|
popd
|
||
|
|
||
|
%build
|
||
|
|
||
|
export JAVA_HOME=/usr/lib/jvm/jdk-sun
|
||
|
ant compile-core compile-mathviewer compile-cli compile-fop -verbose
|
||
|
|
||
|
cd jeuclid-core16
|
||
|
export CLASSPATH=""
|
||
|
CLASSPATH=$CLASSPATH:$(build-classpath batik-all commons-logging commons-io):$JAVA_HOME/jre/lib/rt.jar
|
||
|
CLASSPATH=$CLASSPATH:$(build-classpath xml-commons-apis xml-commons-apis-ext xmlgraphics-commons)
|
||
|
CLASSPATH=$CLASSPATH:../target/jeuclid-core.jar
|
||
|
CLASSPATH=$CLASSPATH:$(build-classpath junit-3.8.2 testng-jdk15):target/classes:target/test-classes
|
||
|
ant \
|
||
|
-Duser.home=$PWD \
|
||
|
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
||
|
-Dmaven.settings.offline=true \
|
||
|
-Dmaven.settings.interactiveMode=false \
|
||
|
-Dbuild.sysclasspath=first \
|
||
|
-Dmaven.test.skip=true \
|
||
|
jar
|
||
|
|
||
|
%install
|
||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
|
||
|
mkdir -p %{buildroot}%{_javadir}
|
||
|
install -pm 644 target/jeuclid-core.jar \
|
||
|
%{buildroot}%{_javadir}/jeuclid-core-%{version}.jar
|
||
|
install -pm 644 jeuclid-core16/target/jeuclid-core16-%{version}.jar \
|
||
|
%{buildroot}%{_javadir}/jeuclid-core16-%{version}.jar
|
||
|
install -pm 644 target/jeuclid-fop.jar \
|
||
|
%{buildroot}%{_javadir}/jeuclid-fop-%{version}.jar
|
||
|
install -pm 644 target/jeuclid-mathviewer.jar \
|
||
|
%{buildroot}%{_javadir}/jeuclid-mathviewer-%{version}.jar
|
||
|
install -pm 644 target/jeuclid-cli.jar \
|
||
|
%{buildroot}%{_javadir}/jeuclid-cli-%{version}.jar
|
||
|
|
||
|
(
|
||
|
cd %{buildroot}%{_javadir}
|
||
|
for jar in *-%{version}*; do
|
||
|
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
|
||
|
done
|
||
|
)
|
||
|
|
||
|
|
||
|
mkdir -p %{buildroot}%{_datadir}/applications
|
||
|
desktop-file-install %{SOURCE2} --mode=644 --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/jeuclid-mathviewer.desktop
|
||
|
|
||
|
mkdir -p %{buildroot}%{_bindir}
|
||
|
install -pm 755 %{SOURCE3} %{buildroot}%{_bindir}/jeuclid-mathviewer
|
||
|
install -pm 755 %{SOURCE4} %{buildroot}%{_bindir}/jeuclid-cli
|
||
|
|
||
|
for png in 48x48 256x256 512x512; do
|
||
|
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${png}/apps/
|
||
|
install -pm 644 src/icons/jeuclid_${png}.png \
|
||
|
%{buildroot}%{_datadir}/icons/hicolor/${png}/apps/jeuclid.png
|
||
|
done
|
||
|
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
|
||
|
install -pm 644 src/icons/jeuclid.svg \
|
||
|
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
|
||
|
%clean
|
||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||
|
|
||
|
%post mathviewer
|
||
|
%{_bindir}/update-desktop-database -q %{_datadir}/applications
|
||
|
touch --no-create %{_datadir}/icons/hicolor
|
||
|
|
||
|
%postun mathviewer
|
||
|
if [ $1 -eq 0 ]; then
|
||
|
touch --no-create %{_datadir}/icons/hicolor
|
||
|
%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
|
||
|
fi
|
||
|
|
||
|
%posttrans mathviewer
|
||
|
%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root)
|
||
|
%{_javadir}/jeuclid-core-%{version}.jar
|
||
|
%{_javadir}/jeuclid-core.jar
|
||
|
%{_javadir}/jeuclid-core16-%{version}.jar
|
||
|
%{_javadir}/jeuclid-core16.jar
|
||
|
%doc LICENSE.txt NOTICE README.*
|
||
|
|
||
|
%files cli
|
||
|
%defattr(-,root,root)
|
||
|
%{_bindir}/jeuclid-cli
|
||
|
%{_javadir}/jeuclid-cli-%{version}.jar
|
||
|
%{_javadir}/jeuclid-cli.jar
|
||
|
|
||
|
%files fop
|
||
|
%defattr(-,root,root)
|
||
|
%{_javadir}/jeuclid-fop-%{version}.jar
|
||
|
%{_javadir}/jeuclid-fop.jar
|
||
|
|
||
|
%files mathviewer
|
||
|
%defattr(-,root,root)
|
||
|
%{_bindir}/jeuclid-mathviewer
|
||
|
%{_javadir}/jeuclid-mathviewer-%{version}.jar
|
||
|
%{_javadir}/jeuclid-mathviewer.jar
|
||
|
%{_datadir}/applications/jeuclid-mathviewer.desktop
|
||
|
%{_datadir}/icons/hicolor/*x*/apps/jeuclid.png
|
||
|
%{_datadir}/icons/hicolor/scalable/apps/jeuclid.svg
|
||
|
|
||
|
%changelog
|
||
|
* Thu Dec 09 2010 gil <puntogil@libero.it> 3.1.9-2mamba
|
||
|
- rebuilt devel
|
||
|
|
||
|
* Fri Feb 26 2010 gil <puntogil@libero.it> 3.1.9-1mamba
|
||
|
- update to 3.1.9
|
||
|
- edit spec file added jeuclid-core16 jars
|
||
|
|
||
|
* Fri Nov 20 2009 gil <puntogil@libero.it> 3.1.8-1mamba
|
||
|
- package created by autospec
|
||
|
- added Italian translation
|